Dan Kenigsberg has uploaded a new change for review. Change subject: hotunplug: Identify a nic according to its alias ......................................................................
hotunplug: Identify a nic according to its alias MAC addresses may change. The "alias" is immutable. Change-Id: Iae7619c2547d667103e33777180e01b285f4b18d Bug-Url: https://bugzilla.redhat.com/919356 Signed-off-by: Dan Kenigsberg <[email protected]> --- M vdsm/libvirtvm.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/12892/1 diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index 39d1b5b..99bf548 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -1669,7 +1669,8 @@ # Find NIC object in vm's NICs list nic = None for dev in self._devices[vm.NIC_DEVICES][:]: - if dev.macAddr.lower() == nicParams['macAddr'].lower(): + if dev.alias == nicParams.get('alias') or \ + dev.macAddr.lower() == nicParams['macAddr'].lower(): nic = dev break -- To view, visit http://gerrit.ovirt.org/12892 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iae7619c2547d667103e33777180e01b285f4b18d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
