ofri masad has posted comments on this change.
Change subject: core: Quota refactor
......................................................................
Patch Set 7: (7 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 381: }
Line 382: break;
Line 383: case NEW_ENTITY_ID:
Line 384: daoForEntity.remove(snapshotData);
Line 385: break;
Done
Line 386: }
Line 387: }
Line 388:
Line 389: cleanUpCompensationData();
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
Line 386:
Line 387: @Override
Line 388: public List<QuotaConsumptionParameter>
getQuotaStorageConsumptionParameters() {
Line 389: List<QuotaConsumptionParameter> list = new
ArrayList<QuotaConsumptionParameter>();
Line 390: // If source and destination are in the same quota - do
nothing and return true
Done
Line 391: if (getImage().getQuotaId() != null &&
getImage().getQuotaId().equals(getDestinationQuotaId())) {
Line 392: return list;
Line 393: }
Line 394:
Line 398: QuotaConsumptionParameter.QuotaAction.CONSUME,
Line 399: getParameters().getStorageDomainId(),
Line 400: (double)getImage().getSizeInGigabytes()));
Line 401:
Line 402: if
(ImageOperation.Move.equals(getParameters().getOperation())) {
Done
Line 403: if (getImage().getQuotaId() != null &&
!Guid.Empty.equals(getImage().getQuotaId())) {
Line 404: list.add(new QuotaStorageConsumptionParameter(
Line 405: getImage().getQuotaId(),
Line 406: null,
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
Line 779: isVmInterfacesAttachedToVmNetworks(clusterNetworks,
interfaceNetworkNames);
Line 780: }
Line 781:
Line 782: /**
Line 783: * @param interfacesMap
Done
Line 784: * VM interface network names
Line 785: * @return true if all VM network interfaces are attached to
existing cluster networks
Line 786: */
Line 787: private boolean isVmInterfacesConfigured(Map<String,
VmNetworkInterface> interfacesMap) {
Line 792: return true;
Line 793: }
Line 794:
Line 795: /**
Line 796: * @param clusterNetworkNames
Done
Line 797: * cluster logical networks names
Line 798: * @param interfaceNetworkNames
Line 799: * VM interface network names
Line 800: * @return true if all VM network interfaces are attached to
existing cluster networks
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
Line 351: @Override
Line 352: public List<QuotaConsumptionParameter>
getQuotaVdsConsumptionParameters() {
Line 353: List<QuotaConsumptionParameter> list = new
ArrayList<QuotaConsumptionParameter>();
Line 354: list.add(new
QuotaSanityParameter(getParameters().getVmStaticData().getQuotaId(), null));
Line 355: return list;
I prefer leaving the returned list mutable. command base is using the return
value and can addAll() to it. (in the future)
Line 356: }
Line 357:
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
Line 116: @Override
Line 117: public List<QuotaConsumptionParameter>
getQuotaVdsConsumptionParameters() {
Line 118: List<QuotaConsumptionParameter> list = new
ArrayList<QuotaConsumptionParameter>();
Line 119: list.add(new
QuotaSanityParameter(getParameters().getVmTemplateData().getQuotaId(), null));
Line 120: return list;
I prefer leaving the returned list mutable. command base is using the return
value and can addAll() to it. (in the future)
Line 121: }
--
To view, visit http://gerrit.ovirt.org/9180
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I109ae8ae0191f46abaa1be21a7ecfebe50b9993f
Gerrit-PatchSet: 7
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: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches