Noam Slomianko has uploaded a new change for review. Change subject: webadmin: Add vm name to quota message ......................................................................
webadmin: Add vm name to quota message When a VM was created with no quota in an audit/enforcing DC (using REST for instance), the error message did not include the name of the offending vm Change-Id: I5a55b549f0127fde8b0afd6daae2ac06e0218e3d Bug-Url: https://bugzilla.redhat.com/949576 Signed-off-by: Noam Slomianko <nslom...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/37/20437/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java index 25f8a25..53fb3e5 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaManager.java @@ -692,6 +692,9 @@ throws InvalidQuotaParametersException { if(param.getQuotaGuid() == null || Guid.Empty.equals(param.getQuotaGuid())) { parameters.getCanDoActionMessages().add(VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID.toString()); + parameters.getCanDoActionMessages().add(String.format("$VmName %1$s", + parameters.getAuditLogable() + .getVmName())); auditLogPair.setFirst(param.getParameterType() == QuotaConsumptionParameter.ParameterType.STORAGE ? AuditLogType.MISSING_QUOTA_STORAGE_PARAMETERS_PERMISSIVE_MODE : AuditLogType.MISSING_QUOTA_CLUSTER_PARAMETERS_PERMISSIVE_MODE); diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties index 67439c7..764b8be 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties @@ -127,7 +127,7 @@ USER_EXCEEDED_QUOTA_STORAGE_THRESHOLD=Storage-Quota ${QuotaName} is about to exceed. Utilization: ${CurrentStorage}% QUOTA_STORAGE_RESIZE_LOWER_THEN_CONSUMPTION=Storage-Quota ${QuotaName}: the new size set for this quota is less than current disk utilization. MISSING_QUOTA_STORAGE_PARAMETERS_PERMISSIVE_MODE=Missing Quota for Disk, proceeding since in Permissive (Audit) mode. -MISSING_QUOTA_CLUSTER_PARAMETERS_PERMISSIVE_MODE=Missing Quota for VM, proceeding since in Permissive (Audit) mode. +MISSING_QUOTA_CLUSTER_PARAMETERS_PERMISSIVE_MODE=Missing Quota for VM ${VmName}, proceeding since in Permissive (Audit) mode. USER_MOVED_VM=VM ${VmName} moving to Domain ${StorageDomainName} was initiated by ${UserName}. USER_MOVED_VM_FINISHED_SUCCESS=Moving VM ${VmName} to Domain ${StorageDomainName} has been completed. USER_MOVED_VM_FINISHED_FAILURE=Failed to complete moving of VM ${VmName} to Domain ${StorageDomainName}. -- To view, visit http://gerrit.ovirt.org/20437 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a55b549f0127fde8b0afd6daae2ac06e0218e3d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.3 Gerrit-Owner: Noam Slomianko <nslom...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches