Change in vdsm[master]: gluster: storage devices list provides device size in Mib
tjeyasin at redhat.com
tjeyasin at redhat.com
Fri Mar 13 09:18:56 UTC 2015
Timothy Asir has uploaded a new change for review.
Change subject: gluster: storage devices list provides device size in Mib
......................................................................
gluster: storage devices list provides device size in Mib
Currently it returns unit size along with device size in
Kib/Mib/Gib.. based on the size. This patch fixes this issue
to return the values in Mib.
Change-Id: Ie56be6ff4e8ed5183f6c2111b007302473593361
Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=1201263
Signed-off-by: Timothy Asir Jeyasingh <tjeyasin at redhat.com>
---
M vdsm/gluster/storagedev.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/38707/1
diff --git a/vdsm/gluster/storagedev.py b/vdsm/gluster/storagedev.py
index 8d0f986..12b3063 100644
--- a/vdsm/gluster/storagedev.py
+++ b/vdsm/gluster/storagedev.py
@@ -24,7 +24,7 @@
def _getDeviceDict(device, createBrick=False):
info = {'name': device.name,
- 'size': '%s' % device.size,
+ 'size': '',
'devPath': device.path,
'devUuid': device.uuid or '',
'bus': device.bus or '',
@@ -33,6 +33,8 @@
'mountPoint': '',
'uuid': '',
'createBrick': createBrick}
+ if isinstance(device.size, blivet.size.Size):
+ info['size'] = '%s' % device.size.convertTo(spec="MiB")
if not info['bus'] and device.parents:
info['bus'] = device.parents[0].bus
if device.model:
--
To view, visit https://gerrit.ovirt.org/38707
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie56be6ff4e8ed5183f6c2111b007302473593361
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeyasin at redhat.com>
More information about the vdsm-patches
mailing list