Sharad Mishra has posted comments on this change.

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


Patch Set 3: (3 inline comments)

New to ovirt. Trying to learn by code review. 
Please look at my inline comments.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
Line 342:                 retVal = validateMacAddress(iface);
Since you are looping here. I assume that it is possible to have multiple 
entries. But when the loop exits, retVal will only represent the result of last 
entry. So 'canDo' will only log if last mac is invalid and ignore the rest.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java
Line 186:                 retVal = validateMacAddress(iface);
retVal on loop exit will only represent the result of last mac address 
validation.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java
Line 330:         if (StringHelper.isNullOrEmpty(iface.getMacAddress())) {
In validateMacAddress(), we check against VALID_MAC_ADDRESS_FORMAT, so it makes 
sense to do the same check here instead of checking for null or empty.

--
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: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[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