Allon Mureinik has posted comments on this change.

Change subject: core: refactoring quota CRUD commands
......................................................................


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

(10 inline comments)

like the idea, have some queries/comments about the implementation - see inline.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/QuotaCRUDCommand.java
Line 16:     protected void executeCommand() {
why do you bother overriding it here?

Line 22:     public List<PermissionSubject> getPermissionCheckSubjects() {
this too

Line 36:         return DbFacade.getInstance().getQuotaDAO();
s/DbFacade.getInstance()/getDbFacade()/

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveQuotaCommand.java
Line 24:         setQuota(getQuotaDAO().getById(getParameters().getQuotaId()));
why do you need this in the constructor? why not in the executeCommand()?

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateQuotaCommand.java
Line 49:         
QuotaManager.getInstance().removeQuotaFromCache(getQuota().getStoragePoolId(), 
getQuota().getId());
why does updating infer removing from the cache?
is it because the quota is already persisted in the database?

Line 59:                 : getQuota().getId().getValue(),
This block seems to repeat itself quite often - consider moving it to the base 
class.

Line 86:                 quotaStorage.setQuotaId(getQuota().getId());
why not getQuotaId()?

Line 92:                 quotaVdsGroup.setQuotaId(getQuota().getId());
why not getQuotaId()?

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddQuotaCommandTest.java
Line 39:     private final Guid storagePoolUUID = Guid.NewGuid();
why final?

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveQuotaCommandTest.java
Line 61:         List<VM> newList = new ArrayList<VM>();
is this still needed?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I78124bce99bad0d716e711b6dd76e9c763affbc6
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to