Alissa Bonas has posted comments on this change. Change subject: core: add validation to AddStorageServerConnection ......................................................................
Patch Set 3: (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(); why not? this is the connection received from parameters. 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()) { Sorry, I don't understand the question :(. What is enough? The name of the method is too long? There is another method you suggest to use? Please explain. 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 <abo...@redhat.com> Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches