From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: nics: list dpdk ports ......................................................................
Patch Set 17: Code-Review-1
(4 comments)
https://gerrit.ovirt.org/#/c/72308/17/lib/vdsm/network/link/dpdk.py File lib/vdsm/network/link/dpdk.py:
PS17, Line 54: isDPDK why's the sudden uppercase? new module should have pep8-conforming names.
PS17, Line 56: NET_SYSFS + dev_name os.path.join is slightly safer
PS17, Line 92: not dev_name or not why is this special protection agains dev_name in (0, None, False) ?
https://gerrit.ovirt.org/#/c/72308/17/tests/network/dpdk_test.py File tests/network/dpdk_test.py:
Line 93: "configuration": { Line 94: "driver": "igb"}}]}]} Line 95: Line 96: num_ports = sum(1 for x in dpdk._device_ports(lshw_output)) Line 97: self.assertEqual(0, num_ports) we care about the content of the items, not only their number.
self.assertEqual([], list(dpdk._device_ports(lshw_output)))
is much clearer, and can be replaced in the other two places with the actual value expected from _device_ports.
vdsm-patches@lists.fedorahosted.org