Change in ovirt-engine[master]: core: handle nic ordering when adding or importing a VM

oourfali at redhat.com oourfali at redhat.com
Tue Dec 24 10:04:29 UTC 2013


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 <oourfali at 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 <oourfali at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkolesni at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list