Use only one element in OSD state

This commit is contained in:
Joshua Boniface 2019-07-26 11:57:14 -04:00
parent 1da7462e0d
commit b7960cd221
1 changed files with 3 additions and 3 deletions

View File

@ -567,10 +567,10 @@ def ceph_osd_state(osd):
else:
retcode = 400
in_state = retdata['stats']['in']
up_state = retdata['stats']['up']
in_state = retdata[0]['stats']['in']
up_state = retdata[0]['stats']['up']
return flask.jsonify([{ "id": osd, "in": in_state, "up": up_state }]), retcode
return flask.jsonify({ "id": osd, "in": in_state, "up": up_state }), retcode
def ceph_osd_add(node, device, weight):
"""