Maor Lipchuk has posted comments on this change.

Change subject: engine: Add Quota helper class
......................................................................


Patch Set 4: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/QuotaHelper.java
Line 69:             log.error("Unlimited Quota cannot be created, Storage pool 
is not valid ");
For now, new default quota will be created when ever a storage pool will be 
updated or created, so it's assured that the storage pool entity will be 
consistent.

The validation can be done as you suggested, but either way if storage pool is 
null it is a bug that the caller class should take in consider (whether by 
validating it before creating the quota or in the method it self)
But since this method behaves as an independent method, I like more to decouple 
it from the flow, and add this check, without throwing an exception since I 
can't be sure when it will be used.

I think its more elegant the caller class, will simply check if the quota != 
null, and if so, it will add an appropriate canDoAction message.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie67aad0501bbec91e47740e536eb371b62f42d44
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to