Gilad Chaplik has posted comments on this change.

Change subject: core: Add CRUD commands and queries for QoS objects (storage)
......................................................................


Patch Set 21:

(2 comments)

new patch to follow.

http://gerrit.ovirt.org/#/c/27096/21/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/qos/QosCommandBase.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/qos/QosCommandBase.java:

Line 75:     }
Line 76: 
Line 77:     @Override
Line 78:     public List<PermissionSubject> getPermissionCheckSubjects() {
Line 79:         return Collections.singletonList(new 
PermissionSubject(getStoragePoolId(),
> if getStoragePoolId is null we should return super.getPermissionsCHeckSubje
we probably have 2 different POV.

I will explain mine, and let see if we can agree:
let say you need to have a permission to an object, and you provide null; the 
infra should easily spot it and alert the user. I should not call super (the 
operation may succeed), and null won't help me with anything.

in this case storage pool id will be null: means the operation will fail on 
missing element of type storage pool for the command. imo better than you 2 
options (calling super - again which may succeed, or passing null, which won't 
give any information on what went wrong).
Line 80:                 VdcObjectType.StoragePool, 
getActionType().getActionGroup()));
Line 81:     }
Line 82: 
Line 83:     protected abstract QosDao<T> getQosDao();


http://gerrit.ovirt.org/#/c/27096/21/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/QosValidator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/QosValidator.java:

Line 51:      * Verify that the QoS entity has the same DC ID as the one stored 
in the database.
Line 52:      */
Line 53:     public ValidationResult consistentDataCenter() {
Line 54:         return (getOldQos() == null || 
!qos.getStoragePoolId().equals(getOldQos().getStoragePoolId()))
Line 55:                 ? new 
ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_QOS_STORAGE_POOL_NOT_EXIST)
> the message here is wrong, the datacenter is changed..not "NOT EXIST"
Done
Line 56:                 : ValidationResult.VALID;
Line 57:     }
Line 58: 
Line 59:     /**


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1a9af59277b5055453159f002f19046c00522ddb
Gerrit-PatchSet: 21
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Kobi Ianko <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to