diff --git a/api-daemon/pvcapid/flaskapi.py b/api-daemon/pvcapid/flaskapi.py index 4896c3dc..0e5aa1a5 100755 --- a/api-daemon/pvcapid/flaskapi.py +++ b/api-daemon/pvcapid/flaskapi.py @@ -3316,6 +3316,9 @@ class API_Storage_Ceph_Pool_Root(Resource): name: type: string description: The name of the pool + volume_count: + type: integer + description: The number of volumes in the pool stats: type: object properties: diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index 9e991c1b..152c1e7e 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -347,9 +347,11 @@ def getPoolInformation(zk_conn, pool): # Parse the stats data pool_stats_raw = zkhandler.readdata(zk_conn, '/ceph/pools/{}/stats'.format(pool)) pool_stats = dict(json.loads(pool_stats_raw)) + volume_count = len(getCephVolumes(zk_conn, pool)) pool_information = { 'name': pool, + 'volume_count': volume_count, 'stats': pool_stats } return pool_information