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/15/39415/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 61e6c9a..2da8453 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
@@ -848,6 +848,7 @@
     ACTION_TYPE_FAILED_VDS_HA_NOT_CONFIGURED(ErrorType.BAD_PARAMETERS),
     // Cluster 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 ece031f..d8af935 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -1178,6 +1178,7 @@
 # cluster policy errors
 ACTION_TYPE_FAILED_CLUSTER_POLICY_PARAMETERS_INVALID=Cannot ${action} ${type}. 
Parameters are invalid.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_DUPLICATE_POLICY_UNIT=Cannot ${action} 
${type}. policy unit already exists in Cluster Policy.
+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_NAME_INUSE=Cannot ${action} ${type}. Name is 
in use.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_LOCKED=Cannot ${action} ${type}. Cluster 
Policy is locked, and cannot be editable.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE=Cannot ${action} ${type}. Cluster 
Policy is attached to cluster(s), please assign these cluster(s) to other 
policy.
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 667bfd3..e489870 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
@@ -3189,6 +3189,9 @@
     @DefaultStringValue("Cannot ${action} ${type}. policy unit already exists 
in Cluster Policy.")
     String ACTION_TYPE_FAILED_CLUSTER_POLICY_DUPLICATE_POLICY_UNIT();
 
+    @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}. Name is in use.")
     String ACTION_TYPE_FAILED_CLUSTER_POLICY_NAME_INUSE();
 
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 8a761d7..5a60dcc 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
@@ -1147,6 +1147,7 @@
 # cluster policy errors
 ACTION_TYPE_FAILED_CLUSTER_POLICY_PARAMETERS_INVALID=Cannot ${action} ${type}. 
Parameters are invalid.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_DUPLICATE_POLICY_UNIT=Cannot ${action} 
${type}. policy unit already exists in Cluster Policy.
+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_NAME_INUSE=Cannot ${action} ${type}. Name is 
in use.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_LOCKED=Cannot ${action} ${type}. Cluster 
Policy is locked, and cannot be editable.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE=Cannot ${action} ${type}. Cluster 
Policy is attached to cluster(s), please assign these cluster(s) to other 
policy.


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ce89d69e2f60c4ca6c88dd860a1910fcb693ee8
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