Doron Fediuck has posted comments on this change.
Change subject: core: Fix storage quota release on stopStatelessVm
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java
Line 232: }
Line 233: return list;
Line 234: }
Line 235:
Line 236: public List<QuotaConsumptionParameter>
getQuotaStorageConsumptionParameters() {
How about putting here:
if (!getVm().getis_stateless()) {
return null;
}
so below you'll have one nesting level removed?
Line 237: List<QuotaConsumptionParameter> list = new
ArrayList<QuotaConsumptionParameter>();
Line 238: //if runAsStateless
Line 239: if (getVm().getis_stateless()) {
Line 240: for (DiskImage image : getVm().getDiskList()) {
Line 239: if (getVm().getis_stateless()) {
Line 240: for (DiskImage image : getVm().getDiskList()) {
Line 241: if (image.getQuotaId() != null) {
Line 242: list.add(new
QuotaStorageConsumptionParameter(image.getQuotaId(), null,
Line 243:
QuotaConsumptionParameter.QuotaAction.CONSUME,
Maybe QuotaConsumptionParameter.QuotaAction.RELEASE is better than consume ?
Line 244: image.getstorage_ids().get(0),
image.getActualSize()));
Line 245: }
Line 246: }
Line 247: }
--
To view, visit http://gerrit.ovirt.org/9470
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7088b94cd716bb93b2a4813963a980f4eab9e597
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches