Moti Asayag has posted comments on this change.

Change subject: engine: Change iteration to foreach (#849971)
......................................................................


Patch Set 1: Looks good to me, approved

(3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateNetworkToVdsInterfaceCommand.java
Line 165:         // check that interface exists
Line 166:         for (final VdsNetworkInterface i : 
getParameters().getInterfaces()) {
Line 167:             for (VdsNetworkInterface iface : interfaces) {
Line 168:                 if (iface.getName().equals(i.getName())) {
Line 169:                     updatedIface = iface;
this is a refactor which will be in used on the next patch - in order to solve 
the current bug.
Line 170:                 }
Line 171:             }
Line 172:             if (updatedIface == null) {
Line 173:                 
addCanDoActionMessage(VdcBllMessages.NETWORK_INTERFACE_NOT_EXISTS);


Line 170:                 }
Line 171:             }
Line 172:             if (updatedIface == null) {
Line 173:                 
addCanDoActionMessage(VdcBllMessages.NETWORK_INTERFACE_NOT_EXISTS);
Line 174:                 return false;
no, since we indicated an interface which doesn't exists on engine (therefore 
doesn't exist on the host) and we should prevent any action on it.
Line 175:             }
Line 176:             ifaceGateway = updatedIface.getGateway();
Line 177:         }
Line 178: 


Line 172:             if (updatedIface == null) {
Line 173:                 
addCanDoActionMessage(VdcBllMessages.NETWORK_INTERFACE_NOT_EXISTS);
Line 174:                 return false;
Line 175:             }
Line 176:             ifaceGateway = updatedIface.getGateway();
agree on that - but this is unrelated to the current patch. The gateway should 
also be examined but there are no known issues about it, since the only case 
where the gateway is allowed to be updated is when editing the management 
network and it is being blocked by a later validation on this function.
Line 177:         }
Line 178: 
Line 179:         boolean managementNetworkUpdated =
Line 180:                 
StringUtils.equals(getParameters().getNetwork().getname(), 
NetworkUtils.getEngineNetwork());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2fbb9bf14ed5f94b2e74ab6bfde39e959300b31d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to