Ryan Barry has uploaded a new change for review. Change subject: Bridge.slave_for_nic needs to exclude vnet devices ......................................................................
Bridge.slave_for_nic needs to exclude vnet devices The original patch relied on sorting the list of devices to ensure that e.* ethernet devices and bonds appeared at the list, but just exclude vnet devices, and we will only get one result Change-Id: Ib84b539b32a8a78b3bd35bd39b2ca8ae7a87e1fa Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1280241 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1300188 Signed-off-by: Ryan Barry <[email protected]> --- M src/ovirt/node/utils/network.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/84/53684/1 diff --git a/src/ovirt/node/utils/network.py b/src/ovirt/node/utils/network.py index 6220d96..398219c 100755 --- a/src/ovirt/node/utils/network.py +++ b/src/ovirt/node/utils/network.py @@ -885,7 +885,8 @@ def slave_for_bridge(self, nic): try: - slave = os.listdir("/sys/class/net/%s/brif" % nic.ifname)[0] + slave = [n for n in os.listdir("/sys/class/net/%s/brif" + % nic.ifname) if "vnet" not in n].pop() nic = NIC(slave) except IndexError: # No slaves. ;vdsmdummy; ? -- To view, visit https://gerrit.ovirt.org/53684 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib84b539b32a8a78b3bd35bd39b2ca8ae7a87e1fa Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Ryan Barry <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
