Change in vdsm[master]: hsm: Support GUID list param in GetDeviceList

frolland at redhat.com frolland at redhat.com
Mon May 25 16:00:47 UTC 2015


Freddy Rolland has posted comments on this change.

Change subject: hsm: Support GUID list param in GetDeviceList
......................................................................


Patch Set 5:

(9 comments)

https://gerrit.ovirt.org/#/c/40661/5/client/vdsClient.py
File client/vdsClient.py:

Line 720
Line 721
Line 722
Line 723
Line 724
> Can you send a cleanup patch on top of this series, renaming "devices" to "
I will


https://gerrit.ovirt.org/#/c/40661/5/vdsm/API.py
File vdsm/API.py:

Line 1611: 
Line 1612:     def getLVMVolumeGroups(self, storageType=None):
Line 1613:         return self._irs.getVGList(storageType)
Line 1614: 
Line 1615:     def getDeviceList(self, storageType=None, guids=None):
> Please use guids=() everywhere, so we can assume that guides is *always* a 
Done
Line 1616:         return self._irs.getDeviceList(storageType, guids)
Line 1617: 
Line 1618:     def getDevicesVisibility(self, guidList):
Line 1619:         return self._irs.getDevicesVisibility(guidList)


https://gerrit.ovirt.org/#/c/40661/5/vdsm/rpc/BindingXMLRPC.py
File vdsm/rpc/BindingXMLRPC.py:

Line 963:     def vgsGetList(self, storageType=None, options=None):
Line 964:         api = API.Global()
Line 965:         return api.getLVMVolumeGroups(storageType)
Line 966: 
Line 967:     def devicesGetList(self, storageType=None, guids=None, options=None):
> guids=()
Done
Line 968:         api = API.Global()
Line 969:         return api.getDeviceList(storageType, guids)
Line 970: 
Line 971:     def devicesGetVisibility(self, guids, options=None):


https://gerrit.ovirt.org/#/c/40661/5/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 2013
Line 2014
Line 2015
Line 2016
Line 2017
> guids=()
Done


Line 2040
Line 2041
Line 2042
Line 2043
Line 2044
> guides=guids
I don't understand the comment.


Line 1997:                 con['password'] = "******"
Line 1998:         return logableDevs
Line 1999: 
Line 2000:     @public(logger=logged(resPrinter=partial(_logResp_getDeviceList, None)))
Line 2001:     def getDeviceList(self, storageType=None, guids=None, options={}):
> guids=()
Done
Line 2002:         """
Line 2003:         List all Block Devices.
Line 2004: 
Line 2005:         :param storageType: Filter by storage type.


Line 2012:                   type specified.
Line 2013:         :rtype: dict
Line 2014:         """
Line 2015:         vars.task.setDefaultException(se.BlockDeviceActionError())
Line 2016:         devices = self._getDeviceList(storageType, guids)
> Both of these are optional parameters, so they do *not* have a position, an
Done
Line 2017:         return dict(devList=devices)
Line 2018: 
Line 2019:     def _getDeviceList(self, storageType=None, guids=None):
Line 2020:         sdCache.refreshStorage()


https://gerrit.ovirt.org/#/c/40661/5/vdsm/storage/multipath.py
File vdsm/storage/multipath.py:

Line 200
Line 201
Line 202
Line 203
Line 204
> filterGuids=()
Done


Line 201:     return HBTL(*hbtl[0].split(":"))
Line 202: 
Line 203: 
Line 204: def pathListIter(filterGuids=None):
Line 205:     filterLen = len(filterGuids) if filterGuids else -1
> We don't need this check If we use a default value of (), and make sure tha
Actually it is needed , otherwise the loop will break right at the beginning in case the guids are empty: devsFound = filterLen = 0
Line 206:     devsFound = 0
Line 207: 
Line 208:     knownSessions = {}
Line 209: 


-- 
To view, visit https://gerrit.ovirt.org/40661
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic173d94a132e617ae97353d38520a86bede657d7
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Fred Rolland <frolland at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list