Improve debug output and use ceph df util data

This commit is contained in:
2020-06-06 22:49:47 -04:00
parent 9b65d3271a
commit 654a3cb7fa
4 changed files with 16 additions and 11 deletions

View File

@ -2489,7 +2489,7 @@ class API_Storage_Ceph_Utilization(Resource):
type: string
description: The raw output data
"""
return api_helper.ceph_radosdf()
return api_helper.ceph_util()
api.add_resource(API_Storage_Ceph_Utilization, '/storage/ceph/utilization')
# /storage/ceph/option

View File

@ -984,12 +984,12 @@ def ceph_status():
return retdata, retcode
def ceph_radosdf():
def ceph_util():
"""
Get the current Ceph cluster utilization.
"""
zk_conn = pvc_common.startZKConnection(config['coordinators'])
retflag, retdata = pvc_ceph.get_radosdf(zk_conn)
retflag, retdata = pvc_ceph.get_util(zk_conn)
pvc_common.stopZKConnection(zk_conn)
if retflag: