Francesco Romani has posted comments on this change. Change subject: clientIF: prepareVolumePath payload cleanup ......................................................................
Patch Set 2: (4 comments) http://gerrit.ovirt.org/#/c/24636/2/vdsm/clientIF.py File vdsm/clientIF.py: Line 297: elif (params.get('path', '') == '' and Line 298: # line above can be removed in future, when < 3.3 engine Line 299: # is not supported Line 300: drive.get('path', '') == ''): Line 301: volPath = '' > Please add test for this case. Nir: I believe this path is already covered by existing tests. I'll add the else clause as Dan suggested only for greater clarity. Line 302: Line 303: elif "path" in drive: Line 304: volPath = drive['path'] Line 305: Line 297: elif (params.get('path', '') == '' and Line 298: # line above can be removed in future, when < 3.3 engine Line 299: # is not supported Line 300: drive.get('path', '') == ''): Line 301: volPath = '' > do we intentionally fall out of the inner condition silently? if so, add Yes we intentionally fall out of the inner condition, so I'll add an else: pass clause. This case is handled by the base value set in line 290 above; then the code just looks if it should be overridden or not. Line 302: Line 303: elif "path" in drive: Line 304: volPath = drive['path'] Line 305: Line 339: > I guess the single quote slipped just in here. Not that this would a biggie Will fix Line 338: # This is so generic because supervdsm.ProxyCaller wraps a Line 339: # multiprocessing' RemoteError into a RuntimeError. Line 340: raise vm.VolumeError("Supervdsm call failed for %s in " Line 341: "drive: %s" % (device, drive)) Line 342: > I find the following implementation of the function much simpler, functiona Agree. Will fix the way you suggested. Line 343: return mkFsFunction(vmId, payload['file'], payload.get('volId')) Line 344: Line 345: def teardownVolumePath(self, drive): Line 346: res = {'status': doneCode} -- To view, visit http://gerrit.ovirt.org/24636 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I058206b7506ddbb5ec087c9ea0963a10ed57affb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Eduardo <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Martin Polednik <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
