Add volume_count to pool API data
This commit is contained in:
parent
185615e6e8
commit
593810e53e
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue