From b7960cd221f439a70a71b9dd2491d78470be307e Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 26 Jul 2019 11:57:14 -0400 Subject: [PATCH] Use only one element in OSD state --- client-api/api_lib/pvcapi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client-api/api_lib/pvcapi.py b/client-api/api_lib/pvcapi.py index 08d8e017..ed2ad536 100755 --- a/client-api/api_lib/pvcapi.py +++ b/client-api/api_lib/pvcapi.py @@ -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): """