Allon Mureinik has posted comments on this change.

Change subject: core: add validation non empty connection field
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(1 inline comment)

I don't think the validation is done in the right place.

At the very least, it should be done in the two commands' shared ancestor 
(StorageServerConnectionCommandBase).
Even better - consider extracting it to a validator, as this validation 
essentially checks the business entity, not the command flow.

E.g., no NFS connection is ever valid if it doesn't have a path. As oposed to a 
completely valid NFS connection object which would be fine as a parameter for 
adding a connection but not for updating an iSCSI connection.

....................................................
File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
Line 589: STORAGE_OPERATION_FAILED_SPM_NETWORK_PROBLEMS=Storage related 
operations can't be performed while the Storage Pool Manager is down.\nPlease 
make sure the Storage Pool Manager is up and running, and check network 
connectivity.
Line 590: VALIDATION_STORAGE_CONNECTION_INVALID=Mount path is illegal, please 
use [IP:/path or FQDN:/path] convention.
Line 591: VALIDATION_STORAGE_CONNECTION_EMPTY_VFSTYPE=VFS type cannot be empty.
Line 592: VALIDATION_STORAGE_CONNECTION_EMPTY_IQN=Target details are empty.
Line 593: VALIDATION_STORAGE_CONNECTION_EMPTY_CONNECTION=${fieldName} field is 
empty.
How about some context?
Line 594: VALIDATION.TAGS.INVALID_TAG_NAME=Invalid tag name. Only alphanumeric 
chars, '-' and '_' characters are valid
Line 595: VALIDATION.VM_POOLS.NAME.NOT_NULL=Pool name is required
Line 596: VALIDATION.ROLES.NAME.NOT_NULL=Role name is required
Line 597: VALIDATION.ROLES.ID.NOT_NULL=Role ID is required


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0d9d133faa54e74a9c4c14a93edb6bd16a9ee796
Gerrit-PatchSet: 2
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: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[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