Mike Kolesnik has posted comments on this change.

Change subject: Handle missing/invalid mac address on import Vm/Template
......................................................................


Patch Set 4: (5 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java
Line 184:             for (VmNetworkInterface iface : 
getParameters().getVmTemplate().getInterfaces()) {
Shouldn't this be iterating over getVmTemplate().getInterfaces()?

Why is the template taken from parameters?

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java
Line 53:     private static Pattern validMacAddress = 
Pattern.compile(VmNetworkInterface.VALID_MAC_ADDRESS_FORMAT);
Please mark final & change name to upper case

Line 331:             
iface.setMacAddress(MacPoolManager.getInstance().allocateNewMac());
Would you want to handle a case when allocate MAC failed?

Perhaps if there are not enough MAC addresses available then it should fail 
beforehand in can do action?

Please see the method used in http://gerrit.ovirt.org/#/c/5466/

....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmNetworkInterface.java
Line 19:     public static final String VALID_MAC_ADDRESS_FORMAT = 
"(\\p{XDigit}{2}:){5}\\p{XDigit}{2}";
Where is requirement to support it?

Currently the supported format is with :, any other format should be converted 
to this format as it is not our place to start converting formats.

....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
Line 260:     ACTION_TYPE_FAILED_NETWORK_INTERFACE_INVALID,
I think if you put MAC before INVALID it would mkae more sense, otherwise you 
might think the interface as a whole is invalid.

--
To view, visit http://gerrit.ovirt.org/5290
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I09dd86a352ecc17e80dceb8c331ec38f4fa96627
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to