Tomer Saban has uploaded a new change for review. Change subject: webadmin: Fixed error message in new Storage QoS. ......................................................................
webadmin: Fixed error message in new Storage QoS. When giving some natural number value to each textbox in the new Stoage QoS, wrong error message appears that says missing values. Now the error message says that non-zero values was entered for total a long with a non-zero value in read/write (which is invalid). Change-Id: I85412ffc86be8f903b9a3f07fbc3a10641be8e71 Bug-Url: https://bugzilla.redhat.com/1163805 Signed-off-by: Tomer Saban <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/StorageQosValidator.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 5 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/01/35601/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/StorageQosValidator.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/StorageQosValidator.java index 59a9e12..d2f4836 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/StorageQosValidator.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/StorageQosValidator.java @@ -32,7 +32,7 @@ || missingCategoryValues(getQos().getMaxIops(), getQos().getMaxReadIops(), getQos().getMaxWriteIops())) { - return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_QOS_MISSING_VALUES); + return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_QOS_ILLEGAL_VALUES); } return ValidationResult.VALID; } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java index ec9962f..8ba43cf 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java @@ -990,6 +990,7 @@ QOS_NAME_NOT_NULL(ErrorType.BAD_PARAMETERS), QOS_NAME_TOO_LONG(ErrorType.BAD_PARAMETERS), QOS_NAME_INVALID(ErrorType.BAD_PARAMETERS), + ACTION_TYPE_FAILED_STORAGE_QOS_ILLEGAL_VALUES(ErrorType.BAD_PARAMETERS), ACTION_TYPE_FAILED_QOS_MISSING_VALUES(ErrorType.BAD_PARAMETERS), ACTION_TYPE_FAILED_QOS_NEGATIVE_VALUES(ErrorType.BAD_PARAMETERS), ACTION_TYPE_FAILED_QOS_NAME_EXIST(ErrorType.BAD_PARAMETERS), diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties index dc1a75a..b7930b8 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -1157,6 +1157,7 @@ QOS_NAME_NOT_NULL=QoS name cannot be empty. QOS_NAME_INVALID=Invalid QoS name (name must be formed of "a-z0-9A-Z" or "-_ ") QOS_NAME_TOO_LONG=QoS name length must be under 50 characters. +ACTION_TYPE_FAILED_STORAGE_QOS_ILLEGAL_VALUES=Cannot ${action} ${type}.\nQoS have non-zero total value with non-zero read/write for either throughput or IOps or both. ACTION_TYPE_FAILED_QOS_MISSING_VALUES=Cannot ${action} ${type}. QoS element has missing values. ACTION_TYPE_FAILED_QOS_NEGATIVE_VALUES=Cannot ${action} ${type}. QoS element cannot have negative values. ACTION_TYPE_FAILED_QOS_NAME_EXIST=Cannot ${action} ${type}. QoS element name already exists. diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java index 7be0ed4..0994793 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java @@ -3116,6 +3116,9 @@ @DefaultStringValue("QoS name length must be under 50 characters.") String QOS_NAME_TOO_LONG(); + @DefaultStringValue("Cannot ${action} ${type}.\nQoS have non-zero total value with non-zero read/write for either throughput or IOps or both.") + String ACTION_TYPE_FAILED_STORAGE_QOS_ILLEGAL_VALUES(); + @DefaultStringValue("Cannot ${action} ${type}. QoS element has missing values.") String ACTION_TYPE_FAILED_QOS_MISSING_VALUES(); diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index 48ed17a..268acef 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -1126,6 +1126,7 @@ QOS_NAME_NOT_NULL=QoS name cannot be empty. QOS_NAME_INVALID=Invalid QoS name (name must be formed of "a-z0-9A-Z" or "-_ ") QOS_NAME_TOO_LONG=QoS name length must be under 50 characters. +ACTION_TYPE_FAILED_STORAGE_QOS_ILLEGAL_VALUES=Cannot ${action} ${type}.\nQoS have non-zero total value with non-zero read/write for either throughput or IOps or both. ACTION_TYPE_FAILED_QOS_MISSING_VALUES=Cannot ${action} ${type}. QoS element has missing values. ACTION_TYPE_FAILED_QOS_NEGATIVE_VALUES=Cannot ${action} ${type}. QoS element cannot have negative values. ACTION_TYPE_FAILED_QOS_NAME_EXIST=Cannot ${action} ${type}. QoS element name already exists. -- To view, visit http://gerrit.ovirt.org/35601 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85412ffc86be8f903b9a3f07fbc3a10641be8e71 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomer Saban <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
