Tomer Saban has uploaded a new change for review.

Change subject: webadmin: Added cluster policy attached error
......................................................................

webadmin: Added cluster policy attached error

Added a new cluster policy attached to cluster error message that
better describes the situation when a user tries to remove a cluster
policy which is being used by a cluster.

(The old message said "Invalid parameters" which doesn't explain to
the user what exactly is the problem).

Change-Id: I4ce89d69e2f60c4ca6c88dd860a1910fcb693ee8
Bug-Url: https://bugzilla.redhat.com/1118503
Signed-off-by: Tomer Saban <tsa...@redhat.com>
---
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
4 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/39413/1

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 8c9935c..b11b84f 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
@@ -897,6 +897,7 @@
     ACTION_TYPE_FAILED_VDS_HA_NOT_CONFIGURED(ErrorType.BAD_PARAMETERS),
     // Scheduling Policy messages
     
ACTION_TYPE_FAILED_CLUSTER_POLICY_PARAMETERS_INVALID(ErrorType.BAD_PARAMETERS),
+    ACTION_TYPE_FAILED_CLUSTER_POLICY_ATTACHED_TO_CLUSTER(ErrorType.CONFLICT),
     
ACTION_TYPE_FAILED_CLUSTER_POLICY_DUPLICATE_POLICY_UNIT(ErrorType.BAD_PARAMETERS),
     ACTION_TYPE_FAILED_CLUSTER_POLICY_NAME_INUSE(ErrorType.BAD_PARAMETERS),
     ACTION_TYPE_FAILED_CLUSTER_POLICY_LOCKED(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 b50afe7..baf7c48 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -1258,6 +1258,7 @@
 
 # cluster policy errors
 ACTION_TYPE_FAILED_CLUSTER_POLICY_PARAMETERS_INVALID=Cannot ${action} ${type}. 
Parameters are invalid.
+ACTION_TYPE_FAILED_CLUSTER_POLICY_ATTACHED_TO_CLUSTER=Cannot ${action} 
${type}. Cluster policy still attached to cluster. Ensure the cluster policy 
has been removed from all clusters and retry.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_DUPLICATE_POLICY_UNIT=Cannot ${action} 
${type}. policy unit already exists in Scheduling Policy.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_NAME_INUSE=Cannot ${action} ${type}. Name is 
in use.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_LOCKED=Cannot ${action} ${type}. Scheduling 
Policy is locked, and cannot be editable.
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 2291d85..8b8ccfe 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
@@ -3412,6 +3412,9 @@
     @DefaultStringValue("Cannot ${action} ${type}. Parameters are invalid.")
     String ACTION_TYPE_FAILED_CLUSTER_POLICY_PARAMETERS_INVALID();
 
+    @DefaultStringValue("Cannot ${action} ${type}. Cluster policy still 
attached to cluster. Ensure the cluster policy has been removed from all 
clusters and retry.")
+    String ACTION_TYPE_FAILED_CLUSTER_POLICY_ATTACHED_TO_CLUSTER();
+
     @DefaultStringValue("Cannot ${action} ${type}. policy unit already exists 
in Scheduling Policy.")
     String ACTION_TYPE_FAILED_CLUSTER_POLICY_DUPLICATE_POLICY_UNIT();
 
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 5bd6673..42835b4 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
@@ -1213,6 +1213,7 @@
 
 # cluster policy errors
 ACTION_TYPE_FAILED_CLUSTER_POLICY_PARAMETERS_INVALID=Cannot ${action} ${type}. 
Parameters are invalid.
+ACTION_TYPE_FAILED_CLUSTER_POLICY_ATTACHED_TO_CLUSTER=Cannot ${action} 
${type}. Cluster policy still attached to cluster. Ensure the cluster policy 
has been removed from all clusters and retry.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_DUPLICATE_POLICY_UNIT=Cannot ${action} 
${type}. policy unit already exists in Scheduling Policy.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_NAME_INUSE=Cannot ${action} ${type}. Name is 
in use.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_LOCKED=Cannot ${action} ${type}. Scheduling 
Policy is locked, and cannot be editable.


-- 
To view, visit https://gerrit.ovirt.org/39413
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ce89d69e2f60c4ca6c88dd860a1910fcb693ee8
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
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