Allon Mureinik has posted comments on this change.
Change subject: core: Quota refactor - test and commands I
......................................................................
Patch Set 6: I would prefer that you didn't submit this
(6 inline comments)
why are there changes to the QuotaManagerTest here?
they should be coupled to the changes in QuotaManager
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
Line 7:
Line 8: import org.apache.commons.lang.StringUtils;
Line 9: import
org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker;
Line 10: import org.ovirt.engine.core.bll.job.ExecutionHandler;
Line 11: import org.ovirt.engine.core.bll.quota.*;
use FQDN imports
Line 12: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 13: import org.ovirt.engine.core.bll.storage.StorageDomainCommandBase;
Line 14: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 15: import org.ovirt.engine.core.bll.utils.VmDeviceUtils;
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
Line 325: getParameters().setParentParameters(getParameters());
Line 326: }
Line 327:
Line 328: /**
Line 329: * The following method will determine if a provided vm/template
exists
why is removing the @param line part of this patch?
Line 330: * @return
Line 331: */
Line 332: private boolean canFindVmOrTemplate() {
Line 333: boolean retValue = true;
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/quota/QuotaManagerTest.java
Line 71:
Line 72: @Mock
Line 73: private QuotaDAO quotaDAO;
Line 74:
Line 75: private QuotaManagerAuditLogger quotaManagerAuditLogger =
Mockito.spy(new QuotaManagerAuditLogger());
Use the @Spy annotation.
Line 76: private QuotaManager quotaManager =
Mockito.spy(QuotaManager.getInstance());
Line 77: private storage_pool storage_pool = new storage_pool();
Line 78: private ArrayList<String> canDoActionMessages = new
ArrayList<String>();
Line 79: private QuotaConsumptionParametersWrapper parametersWrapper;
Line 377: assertNotEmptyCanDoActionMessage();
Line 378: assertAuditLogWritten();
Line 379: }
Line 380:
Line 381: // @Test
why?
Line 382: public void testRollbackQuota() throws Exception {
Line 383: List<StorageQuotaValidationParameter> parameters = new
ArrayList<StorageQuotaValidationParameter>();
Line 384:
Line 385: // ask for a valid consumption (116 out of 120 and 113 out of
120)
Line 456:
Line 457: // basic data
Line 458: Quota quota = new Quota();
Line 459: quota.setId(Guid.NewGuid());
Line 460: quota.setStoragePoolId(new
Guid("00000000-0000-0000-0000-000000001111"));
why?
Line 461: quota.setDescription("My Quota description");
Line 462: quota.setQuotaName("My Quota Name");
Line 463: quota.setGraceStoragePercentage(20);
Line 464: quota.setGraceVdsGroupPercentage(20);
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
Line 119: // VmPoolCommands
Line 120: AddVmPool(301, QuotaDependency.NONE),
Line 121: UpdateUserVm(303, QuotaDependency.NONE),
Line 122: AddVmPoolWithVms(304, ActionGroup.CREATE_VM_POOL,
QuotaDependency.STORAGE),
Line 123: UpdateVmPoolWithVms(305, ActionGroup.EDIT_VM_POOL_CONFIGURATION,
QuotaDependency.STORAGE),
why is this part of /this/ patch?
Line 124: AddVmAndAttachToPool(306, QuotaDependency.NONE),
Line 125: RemoveVmPool(307, ActionGroup.DELETE_VM_POOL,
QuotaDependency.NONE),
Line 126: DetachUserFromVmFromPool(312, QuotaDependency.NONE),
Line 127: AddVmToPool(313, QuotaDependency.NONE),
--
To view, visit http://gerrit.ovirt.org/9001
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I28dc5d1cf3a29d2f3314429e0081758bf3582f27
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Noam Slomianko <[email protected]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches