Muli Salem has posted comments on this change.
Change subject: engine: Support Duplicate Mac Addresses
......................................................................
Patch Set 4: (5 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
Line 49: import org.ovirt.engine.core.common.businessentities.VmTemplate;
Line 50: import org.ovirt.engine.core.common.businessentities.VmTemplateStatus;
Line 51: import org.ovirt.engine.core.common.businessentities.storage_domains;
Line 52: import org.ovirt.engine.core.common.businessentities.network.Network;
Line 53: import
org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface;
Done
Line 54: import org.ovirt.engine.core.common.errors.VdcBLLException;
Line 55: import
org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters;
Line 56: import
org.ovirt.engine.core.common.queries.GetStorageDomainsByVmTemplateIdQueryParameters;
Line 57: import
org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters;
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/MacPoolManager.java
Line 173: return availableMacs.size();
Line 174: }
Line 175:
Line 176: public void freeMac(VmNetworkInterface iface) {
Line 177: if (iface == null || iface.getMacAddress() == null) {
Done
Line 178: log.infoFormat("MacPoolManager::freeMac(iface or mac =
null, exiting without freeing mac)");
Line 179: return;
Line 180: }
Line 181:
Line 174: }
Line 175:
Line 176: public void freeMac(VmNetworkInterface iface) {
Line 177: if (iface == null || iface.getMacAddress() == null) {
Line 178: log.infoFormat("MacPoolManager::freeMac(iface or mac =
null, exiting without freeing mac)");
Done
Line 179: return;
Line 180: }
Line 181:
Line 182: String mac = iface.getMacAddress();
Line 194: lockObj.writeLock().unlock();
Line 195: }
Line 196: }
Line 197:
Line 198: private boolean otherIfaceWithSameMacExists(VmNetworkInterface
iface) {
Done
Line 199: NGuid ifaceId = iface.getId();
Line 200: if (ifaceId != null) {
Line 201: for (Guid ifaceFromList :
getVmNetworkInterfaceDao().getVmInterfacesByMac(iface.getMacAddress())) {
Line 202: if (!ifaceId.equals(ifaceFromList)) {
Line 277: @SuppressWarnings("serial")
Line 278: private class MacPoolExceededMaxException extends
RuntimeException {
Line 279: }
Line 280:
Line 281: private boolean getAllowDuplicate() {
Done
Line 282: return Config.<Boolean>
GetValue(ConfigValues.AllowDuplicateMacAddresses);
Line 283: }
Line 284:
Line 285: private VmNetworkInterfaceDao getVmNetworkInterfaceDao() {
--
To view, visit http://gerrit.ovirt.org/10698
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie96eda19de2d3a44e24806095fb690e4eba41165
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Muli Salem <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Muli Salem <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches