Change in vdsm[master]: gluster: Added volume size info to glusterVolumeStatus.
dnarayan at redhat.com
dnarayan at redhat.com
Thu Jun 12 10:09:14 UTC 2014
Darshan N has uploaded a new change for review.
Change subject: gluster: Added volume size info to glusterVolumeStatus.
......................................................................
gluster: Added volume size info to glusterVolumeStatus.
glusterVolumeStatus verb is enhanced to include volume stats info
along with the existing status information when the statusOption
is set as detail.
Change-Id: I2db5badffbb171a9b1489506b1a4b42a100efc71
Signed-off-by: darshan n <dnarayan at redhat.com>
---
M vdsm/gluster/api.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/48/28648/1
diff --git a/vdsm/gluster/api.py b/vdsm/gluster/api.py
index 950ddbe..065ca9c 100644
--- a/vdsm/gluster/api.py
+++ b/vdsm/gluster/api.py
@@ -209,6 +209,18 @@
options=None):
status = self.svdsmProxy.glusterVolumeStatus(volumeName, brick,
statusOption)
+ if statusOption == 'detail':
+ data = self.svdsmProxy.glusterVolumeStatvfs(volumeName)
+ total = (data.f_blocks - (
+ data.f_bfree - data.f_bavail
+ )) * data.f_bsize
+ free = data.f_bavail * data.f_bsize
+ used = total - free
+ status[
+ 'volumeStatsInfo'
+ ] = {'sizeTotal': str(total),
+ 'sizeFree': str(free),
+ 'sizeUsed': str(used)}
return {'volumeStatus': status}
@exportAsVerb
--
To view, visit http://gerrit.ovirt.org/28648
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2db5badffbb171a9b1489506b1a4b42a100efc71
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Darshan N <dnarayan at redhat.com>
More information about the vdsm-patches
mailing list