Gilad Chaplik has posted comments on this change.

Change subject: core+webadmin: Fix aggregate unlimited quota
......................................................................


Patch Set 1: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java
Line 930:             } else {
Line 931:                 for (QuotaStorage quotaStorage : 
quota.getQuotaStorages()) {
Line 932:                     if (storageLimit == QuotaStorage.UNLIMITED
Line 933:                             || 
QuotaStorage.UNLIMITED.equals(quotaStorage.getStorageSizeGB())) {
Line 934:                         storageLimit = QuotaStorage.UNLIMITED;
use break, no need to iterate once storageLimit == QuotaStorage.UNLIMITED;
Line 935:                     } else {
Line 936:                         storageLimit += 
quotaStorage.getStorageSizeGB();
Line 937:                     }
Line 938:                     storageUsage += 
quotaStorage.getStorageSizeGBUsage();


Line 948:             } else {
Line 949:                 for (QuotaVdsGroup quotaVdsGroup : 
quota.getQuotaVdsGroups()) {
Line 950:                     if (memLimit == QuotaVdsGroup.UNLIMITED_MEM
Line 951:                             || 
QuotaVdsGroup.UNLIMITED_MEM.equals(quotaVdsGroup.getMemSizeMB())) {
Line 952:                         memLimit = QuotaVdsGroup.UNLIMITED_MEM;
set memLimit only once.
Line 953:                     } else {
Line 954:                         memLimit += quotaVdsGroup.getMemSizeMB();
Line 955:                     }
Line 956:                     memUsage += quotaVdsGroup.getMemSizeMBUsage();


Line 956:                     memUsage += quotaVdsGroup.getMemSizeMBUsage();
Line 957: 
Line 958:                     if (cpuLimit == QuotaVdsGroup.UNLIMITED_VCPU
Line 959:                             || 
QuotaVdsGroup.UNLIMITED_VCPU.equals(quotaVdsGroup.getVirtualCpu())) {
Line 960:                         cpuLimit = QuotaVdsGroup.UNLIMITED_VCPU;
same.
Line 961:                     } else {
Line 962:                         cpuLimit += quotaVdsGroup.getVirtualCpu();
Line 963:                     }
Line 964:                     cpuUsage += quotaVdsGroup.getVirtualCpuUsage();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If8f5eb7b2ad1fd5264039ede728c746b0a3cf1b3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <oma...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: ofri masad <oma...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to