Nir Soffer has posted comments on this change.

Change subject: clientIF: prepareVolumePath payload cleanup
......................................................................


Patch Set 5:

(2 comments)

Looks good, but another comment can be removed, and temporary variable for pep8 
is not really needed.

http://gerrit.ovirt.org/#/c/24636/5/vdsm/clientIF.py
File vdsm/clientIF.py:

Line 280: 
Line 281:             # cdrom and floppy drives
Line 282:             elif (device in ('cdrom', 'floppy') and 'specParams' in 
drive):
Line 283:                 # vmPayload is a special case for those devices
Line 284:                 # which needs to be handled first.
It is clear that we handle the vmPayload case first, the comment does add 
anything, so it can be removed.
Line 285:                 params = drive['specParams']
Line 286:                 if 'vmPayload' in params:
Line 287:                     # pep8 1.4.6 complains otherwise
Line 288:                     payload = params['vmPayload']


Line 287:                     # pep8 1.4.6 complains otherwise
Line 288:                     payload = params['vmPayload']
Line 289:                     volPath = self._prepareVolumePathFromPayload(vmId,
Line 290:                                                                  
device,
Line 291:                                                                  
payload)
Pep8 allows this:

    if 'vmPayload' in params:
        volPath = self._prepareVolumePathFromPayload(
            vmId, device, params['vmPayload'])
Line 292:                 # next line can be removed in future, when < 3.3 
engine
Line 293:                 # is not supported
Line 294:                 elif (params.get('path', '') == '' and
Line 295:                       drive.get('path', '') == ''):


-- 
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: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Eduardo <ewars...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Martin Polednik <mpole...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to