Allon Mureinik has posted comments on this change.
Change subject: core: Reuse default quota on DC update
......................................................................
Patch Set 2: (3 inline comments)
Answering lpeer's comments
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java
Line 67: && getStoragePool().getQuotaEnforcementType() ==
QuotaEnforcementTypeEnum.DISABLED) {
I agree this is not the best way to go (and I use the tem "not the best" as a
gross understatement), but I needed some way to distinguish if the default
quota is new or used.
The options I thought of:
1. Using the (deprecated) RefObject
2. Querying to see if the quotaID of the object I got exists in the database -
disgusting and expensive
3. Setting some fictive parameter on the Quota object to indicate it's new
4. returning a Pair<Quota,Boolean> from the QuotaHelper instead of just the
Quota object - don't think it's any more/less readable than the RefObject
solution.
if you have a prefered option, or a different, better one I did not imagine -
please share.
Line 68: RefObject<Boolean> reuseQuota = new
RefObject<Boolean>(true);
Sorry, but I don't understand this comment.
Can you elaborate and/or give an example of how this could be done better?
Line 70: if (reuseQuota.argvalue) {
Done
--
To view, visit http://gerrit.ovirt.org/3426
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iab62ef006c8f572210abba97393cc2e601235e40
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches