Liron Ar has posted comments on this change.

Change subject: core: improve CDA of AddStorageServerConnection
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
Line 76:             return 
failCanDoAction(VdcBllMessages.VALIDATION_STORAGE_CONNECTION_EMPTY_VFSTYPE);
Line 77:         }
Line 78: 
Line 79:         if (getParameters().getVdsId().equals(Guid.Empty)) {
Line 80:             if (!InitializeVds()) {
i agree.
Line 81:                 return false;
Line 82:             }
Line 83:         } else if (getVds() == null) {
Line 84:             return 
failCanDoAction(VdcBllMessages.VDS_INVALID_SERVER_ID);


Line 85:         } else if (getVds().getStatus() != VDSStatus.Up) {
Line 86:             return 
failCanDoAction(VdcBllMessages.VDS_ADD_STORAGE_SERVER_STATUS_MUST_BE_UP);
Line 87:         }
Line 88: 
Line 89:         return super.canDoAction();
please this call move it to be the first as you can- in general it will save db 
queries, we don't need to check for host statuses, etc..if one of the "Basic" 
check won't pass (like existence of vds/pool in the db) - it might be annoying 
to the end user
Line 90:     }
Line 91: 
Line 92:     @Override
Line 93:     protected List<Class<?>> getValidationGroups() {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I00a46aac7d642128c287ef633c492f3c1b85f572
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to