Edward Haas has posted comments on this change. Change subject: net: native ovs: check for nic existence ......................................................................
Patch Set 6: (2 comments) Small nit https://gerrit.ovirt.org/#/c/56448/6/lib/vdsm/network/ovs/validator.py File lib/vdsm/network/ovs/validator.py: PS6, Line 53: if nic is not None: : if nic not in kernel_nics I think you can use: if not nic and nic not in kernel_nics https://gerrit.ovirt.org/#/c/56448/6/tests/network/ovs_test.py File tests/network/ovs_test.py: Line 56: Line 57: def test_add_network_with_non_existing_nic(self): Line 58: fake_running_networks = {} Line 59: fake_kernel_nics = [] Line 60: with self.assertRaises(ne.ConfigNetworkError): A general note for all exceptions checks: we should check the exact failure code. Line 61: ovs_validator.validate_net_configuration( Line 62: 'net1', {'nic': 'eth0', 'switch': 'ovs'}, Line 63: fake_running_networks, fake_kernel_nics) Line 64: -- To view, visit https://gerrit.ovirt.org/56448 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icd1ae02f7e65f305f2f21101fae0303baafe1ea6 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <phora...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Edward Haas <edwa...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček <phora...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches