Mike Kolesnik has posted comments on this change.

Change subject: engine: Extended error for pinned host missing non required 
network
......................................................................


Patch Set 10: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java
Line 107:         if (!returnValue) {
Line 108:             if (privateVm.getMigrationSupport() == 
MigrationSupport.PINNED_TO_HOST) {
Line 109:                 // This message should be the first one cause it has 
high priority
Line 110:                 messages.add(0, 
VdcBllMessages.VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS.toString());
Line 111:                 String hostName = getDestinationVdsId() != null ? 
DbFacade.getInstance()
Would you mind changing it to positive condition?

getDestinationVdsId() == null ? null : ....
Line 112:                         .getVdsDao()
Line 113:                         .get(getDestinationVdsId())
Line 114:                         .getName() : null;
Line 115: 


Line 112:                         .getVdsDao()
Line 113:                         .get(getDestinationVdsId())
Line 114:                         .getName() : null;
Line 115: 
Line 116:                 if (hostName != null) {
This can be inlined:

messages.add(1, hostName == null ?
    VdcBllMessages.HOST_NAME_NOT_AVAILABLE.toString() : String.format("$VdsName 
%1$s", hostName));
Line 117:                     messages.add(1,
Line 118:                             String.format("$VdsName %1$s", hostName));
Line 119:                 } else {
Line 120:                     messages.add(1, 
VdcBllMessages.HOST_NAME_NOT_AVAILABLE.toString());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf9703ae06b06be96c6508d48306d8bd6b8bcfbb
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to