Change in vdsm[master]: hostdev: add is_assignable flag

mzamazal at redhat.com mzamazal at redhat.com
Fri Apr 22 08:28:29 UTC 2016


Milan Zamazal has posted comments on this change.

Change subject: hostdev: add is_assignable flag
......................................................................


Patch Set 3:

(1 comment)

I can't judge the technical side, but codewise fine, except for wondering about one style issue.

https://gerrit.ovirt.org/#/c/56291/4/lib/vdsm/hostdev.py
File lib/vdsm/hostdev.py:

Line 152:     if name != 'computer':
Line 153:         params['parent'] = devXML.find('parent').text
Line 154: 
Line 155:     params['is_assignable'] = str(_pci_header_type(name) == 0).lower()
Line 156: 
I'd prefer if...else for clarity. Also, must params values be strings, couldn't we just set the boolean value here without converting it to the string and back?
Line 157:     try:
Line 158:         driver_name = devXML.find('./driver/name').text
Line 159:     except AttributeError:
Line 160:         # No driver exposed by libvirt/sysfs.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6fd0d39e777c6bc0f3175b737ace9be92df4cca0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list