Add volume_count to pool API data

This commit is contained in:
2020-12-01 03:39:26 -05:00
parent 185615e6e8
commit 593810e53e
2 changed files with 5 additions and 0 deletions

View File

@ -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