Muli Salem has submitted this change and it was merged.
Change subject: engine: Support Duplicate Mac Addresses
......................................................................
engine: Support Duplicate Mac Addresses
This patch adds support to duplicate Mac addresses.
It changes the cache in MacPoolManager to use
Maps instead of Sets. These Maps hold counters
per Mac address.
When adding an existing Mac, if AllowDuplicateMacAddresses
is enabled, we increment the counter. When freeing a Mac
we either decrement the counter, or remove it from the
Map entirely in case this is the only one.
The patch also adds a new method forceAddMac(), that
is meant for cases when Mac needs to be added to a MacMap,
regardless of it already being use (for example, upon
initialization).
Change-Id: Ie96eda19de2d3a44e24806095fb690e4eba41165
Signed-off-by: Muli Salem <msalem(a)redhat.com>
---
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/vm/UpdateVmInterfaceCommand.java
2 files changed, 111 insertions(+), 23 deletions(-)
Approvals:
Muli Salem: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/10698
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie96eda19de2d3a44e24806095fb690e4eba41165
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Muli Salem <msalem(a)redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkolesni(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Muli Salem <msalem(a)redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk(a)redhat.com>