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 <tsa...@redhat.com>
---
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/04/35604/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 e85b162..cfb23f4 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 2f8c848..6911f7d 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
@@ -975,6 +975,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 44081a1..e45290b 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -1143,6 +1143,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 d3cf521..4225688 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
@@ -3090,6 +3090,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 33de6db..a76b7b6 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
@@ -1112,6 +1112,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/35604
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85412ffc86be8f903b9a3f07fbc3a10641be8e71
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Tomer Saban <tsa...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to