Vered Volansky has posted comments on this change.
Change subject: core: add validation to AddStorageServerConnection
......................................................................
Patch Set 3: Looks good to me, but someone else must approve
(2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
Line 72:
Line 73: @Override
Line 74: protected boolean canDoAction() {
Line 75: boolean returnValue = true;
Line 76: StorageServerConnections paramConnection = getConnection();
Please ignore.
Line 77: // if an id was sent - it's not ok since only the backend
should allocate ids
Line 78: if (StringUtils.isNotEmpty(paramConnection.getid())) {
Line 79: return
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ID_NOT_EMPTY);
Line 80: }
Line 87: if (paramConnection.getstorage_type() == StorageType.POSIXFS
Line 88: &&
(StringUtils.isEmpty(paramConnection.getVfsType()))) {
Line 89: return
failCanDoAction(VdcBllMessages.VALIDATION_STORAGE_CONNECTION_EMPTY_VFSTYPE);
Line 90: }
Line 91: if (isConnWithSameDetailsExists()) {
It's a good name, and if length is necessary I'm all for it, but it seems to me
there's TMI in the name and a shorted version is preferable, assuming it still
conveys the meaning. It really is just a suggestion.
Line 92: return
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ALREADY_EXISTS);
Line 93: }
Line 94:
Line 95: if (getParameters().getVdsId().equals(Guid.Empty)) {
--
To view, visit http://gerrit.ovirt.org/15388
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If9bcef8a413589654d36db8d878c844550ae6066
Gerrit-PatchSet: 3
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: Cheryn Tan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches