Gilad Chaplik has posted comments on this change.

Change subject: core: Enable remove quota when quota is not enforced
......................................................................


Patch Set 3: (3 inline comments)

what about changing AppErrors.java?

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveQuotaCommand.java
Line 37:             return false;
Line 38:         }
Line 39: 
Line 40:         // If the quota is in use by ether VM or image - return false
Line 41:         if (getQuotaDAO().isQuotaInUse(quota) && 
!QuotaEnforcementTypeEnum.DISABLED.equals(quota.getQuotaEnforcementType())) {
please switch clauses in AND operator. if quotaMode == disable, you should not 
invoke dao.
Line 42:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IN_USE_BY_VM_OR_DISK);
Line 43:             return false;
Line 44:         }
Line 45: 


....................................................
File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
Line 664: ACTION_TYPE_FAILED_QUOTA_NAME_ALREADY_EXISTS=Cannot ${action} 
${type}. Quota with same name already exists.
Line 665: ACTION_TYPE_FAILED_QUOTA_NAME_RESERVED_FOR_DEFAULT=Cannot ${action} 
${type}. The prefix DefaultQuota is reserved for the default quota.
Line 666: ACTION_TYPE_FAILED_QUOTA_CAN_NOT_HAVE_DEFAULT_INDICATION=Cannot 
${action} ${type}. Quota can not have default indication.
Line 667: 
ACTION_TYPE_FAILED_QUOTA_WITH_DEFAULT_INDICATION_CAN_NOT_BE_REMOVED_=Cannot 
${action} ${type}. Quota with default indication can not be removed while Data 
Center is at disable mode.
Line 668: ACTION_TYPE_FAILED_QUOTA_IN_USE_BY_VM_OR_DISK=Cannot ${action} 
${type}. Quota is still in use by a VM or a disk and Data Center's Quota 
enforcement is enabled.
enabled or audit?
Line 669: ACTION_TYPE_FAILED_DATA_CENTER_MUST_HAVE_AT_LEAST_ONE_QUOTA=Cannot 
${action} ${type}. Data Center must have at least one quota associated with it. 
Please try to add another Quota, or change the existing one.
Line 670: ACTION_TYPE_FAILED_QUOTA_STORAGE_LIMIT_EXCEEDED=Cannot ${action} 
${type}. Quota has no sufficient storage resources.
Line 671: ACTION_TYPE_FAILED_QUOTA_VDS_GROUP_LIMIT_EXCEEDED=Cannot ${action} 
${type}. Quota has no sufficient cluster resources.
Line 672: 


....................................................
File 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
Line 658: ACTION_TYPE_FAILED_QUOTA_NAME_ALREADY_EXISTS=Cannot ${action} 
${type}. Quota with same name already exists.
Line 659: ACTION_TYPE_FAILED_QUOTA_NAME_RESERVED_FOR_DEFAULT=Cannot ${action} 
${type}. The prefix DefaultQuota is reserved for the default quota.
Line 660: ACTION_TYPE_FAILED_QUOTA_CAN_NOT_HAVE_DEFAULT_INDICATION=Cannot 
${action} ${type}. Quota can not have default indication.
Line 661: 
ACTION_TYPE_FAILED_QUOTA_WITH_DEFAULT_INDICATION_CAN_NOT_BE_REMOVED=Cannot 
${action} ${type}. Quota with default indication can not be removed while Data 
Center is at disable mode.
Line 662: ACTION_TYPE_FAILED_QUOTA_IN_USE_BY_VM_OR_DISK=Cannot ${action} 
${type}. Quota is still in use by a VM or a disk and Data Center's Quota 
enforcement is enabled.
same
Line 663: ACTION_TYPE_FAILED_DATA_CENTER_MUST_HAVE_AT_LEAST_ONE_QUOTA=Cannot 
${action} ${type}. Data Center must have at least one quota associated with it. 
Please try to add another Quota, or change the existing one.
Line 664: ACTION_TYPE_FAILED_QUOTA_STORAGE_LIMIT_EXCEEDED=Cannot ${action} 
${type}. Quota has no sufficient storage resources.
Line 665: ACTION_TYPE_FAILED_QUOTA_VDS_GROUP_LIMIT_EXCEEDED=Cannot ${action} 
${type}. Quota has no sufficient cluster resources.
Line 666: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I95ff993b0db21a17e62e3258338bd524c5c8b957
Gerrit-PatchSet: 3
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]>
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to