Oved Ourfali has submitted this change and it was merged. Change subject: core: handle nic ordering when adding or importing a VM ......................................................................
core: handle nic ordering when adding or importing a VM This patch handles the NIC ordering when creating or importing a VM, as follows: 1. When creating a VM from template a. If the template has PCI addresses, then sort the NICs according to that, allocating MAC addresses with the same ordering b. If the template doesn't contain PCI addresses, allocate MAC addresses with an ordering identical to the naming of the NICs 2. When creating a VM from snapshot a. Follow logic in 1a. b. If the snapshot doesn't contain PCI addresses, but it does contain the MAC addresses, allocate new MAC addresses with the same ordering as in the original snapshot c. If no PCI and no MAC addresses are available, order by the NIC name 3. When importing a VM - same as VM creation (but no template in this case, just the exported VM is the reference to compare to). Change-Id: I46b4ffc4ecaab824b90bf8b8ecdfe4ebad3074bf Bug-Url: https://bugzilla.redhat.com/1040630 Signed-off-by: Oved Ourfali <oourf...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/MacPoolManager.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/SnapshotsManager.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/VmInterfaceManagerTest.java 6 files changed, 117 insertions(+), 29 deletions(-) Approvals: Oved Ourfali: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/22411 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46b4ffc4ecaab824b90bf8b8ecdfe4ebad3074bf Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Livnat Peer <lp...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches