Timothy Asir has posted comments on this change.
Change subject: Provide device details using python-blivet module ......................................................................
Patch Set 5:
(5 comments)
http://gerrit.ovirt.org/#/c/35028/5//COMMIT_MSG Commit Message:
Line 3: AuthorDate: 2014-11-11 16:34:46 +0530 Line 4: Commit: Timothy Asir tjeyasin@redhat.com Line 5: CommitDate: 2014-11-18 21:37:18 +0530 Line 6: Line 7: Provide device details using python-blivet module
Please add clear commit message like
Done Line 8: Line 9: This provides list of disks details of the host. Line 10: The details are name, size, devPath, devUuid, fsName, Line 11: mountPoint, fsUuid, formatedd or not.
http://gerrit.ovirt.org/#/c/35028/5/client/vdsClientGluster.py File client/vdsClientGluster.py:
Line 430: pp.pprint(status) Line 431: return status['status']['code'], status['status']['message'] Line 432: Line 433: def do_glusterStorageDeviceList(self, args): Line 434: status = self.s.glusterStorageDeviceList()
Change glusterStorageDeviceList to glusterStorageDevicesList everywhere
Done Line 435: pp.pprint(status) Line 436: return status['status']['code'], status['status']['message'] Line 437: Line 438:
http://gerrit.ovirt.org/#/c/35028/5/vdsm/gluster/apiwrapper.py File vdsm/gluster/apiwrapper.py:
Line 77: Line 78: def list(self): Line 79: return self._gluster.hostsList() Line 80: Line 81: def deviceList(self, options=None):
Is it called like gluster.host.deviceList()? If so, please change function
yes, i will change Line 82: return self._gluster.storageDeviceList() Line 83: Line 84: Line 85: class GlusterService(GlusterApiBase):
http://gerrit.ovirt.org/#/c/35028/5/vdsm/gluster/storagedev.py File vdsm/gluster/storagedev.py:
Line 22: from . import makePublic Line 23: Line 24: Line 25: @makePublic Line 26: def storageDeviceList():
Add unit test
Done Line 27: blivetEnv = blivet.Blivet() Line 28: blivetEnv.reset() Line 29: deviceList = [] Line 30: for device in blivetEnv.devices:
Line 39: if device.format: Line 40: info['fsType'] = device.format.type or '' Line 41: if hasattr(device.format, 'mountpoint'): Line 42: info['mountPoint'] = device.format.mountpoint Line 43: if info['fsType'] or device.kids > 0 or \
Add new line before/after this if block as it deals with other properties.
yes, i will add new line after the if block Line 44: device.type in ['lvmvg', 'lvmthinpool']: Line 45: info['formatted'] = True Line 46: deviceList.append(info)