Dudi Maroshi has uploaded a new change for review.

Change subject: Engine: Scheduling removal error message
......................................................................

Engine: Scheduling removal error message

When removing shceduling policy attached to cluster.
Provide the correct error message.

Bug-Url: https://bugzilla.redhat.com/1189096

Change-Id: I6a95c3a973b8ba9053727009983480ce79119f83
Signed-off-by: Dudi Maroshi <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/commands/RemoveClusterPolicyCommand.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, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/38574/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/commands/RemoveClusterPolicyCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/commands/RemoveClusterPolicyCommand.java
index 2051544..5652b55 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/commands/RemoveClusterPolicyCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/commands/RemoveClusterPolicyCommand.java
@@ -17,7 +17,7 @@
             return false;
         }
         if 
(SchedulingManager.getInstance().getClustersByClusterPolicyId(getParameters().getClusterPolicyId()).size()
 > 0) {
-            return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_POLICY_PARAMETERS_INVALID);
+            return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE);
         }
         return true;
     }
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 f651363..d3febf3 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -1241,7 +1241,7 @@
 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.
-ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE=Cannot ${action} ${type}. Scheduling 
Policy is attached to cluster(s), please assign these cluster(s) to other 
policy.
+ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE=Cannot ${action} ${type}. Scheduling 
Policy is attached to cluster(s), please unassign cluster(s).
 ACTION_TYPE_FAILED_CLUSTER_POLICY_UNKNOWN_POLICY_UNIT=Cannot ${action} 
${type}. Policy unit is unknown.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_FILTER_NOT_IMPLEMENTED=Cannot ${action} 
${type}. Policy unit doesn't implement Filtering.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_FUNCTION_NOT_IMPLEMENTED=Cannot ${action} 
${type}. Policy unit doesn't implement score function.
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 e66ea57..7fe7e04 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
@@ -3346,7 +3346,7 @@
     @DefaultStringValue("Cannot ${action} ${type}. Scheduling Policy is 
locked, and cannot be editable.")
     String ACTION_TYPE_FAILED_CLUSTER_POLICY_LOCKED();
 
-    @DefaultStringValue("Cannot ${action} ${type}. Scheduling Policy is 
attached to cluster(s), please assign these cluster(s) to other policy.")
+    @DefaultStringValue("Cannot ${action} ${type}. Scheduling Policy is 
attached to cluster(s), please unassign cluster(s).")
     String ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE();
 
     @DefaultStringValue("Cannot ${action} ${type}. Policy unit is unknown.")
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 dc00ce6..286eec2 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
@@ -1201,7 +1201,7 @@
 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.
-ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE=Cannot ${action} ${type}. Scheduling 
Policy is attached to cluster(s), please assign these cluster(s) to other 
policy.
+ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE=Cannot ${action} ${type}. Scheduling 
Policy is attached to cluster(s), please unassign cluster(s).
 ACTION_TYPE_FAILED_CLUSTER_POLICY_UNKNOWN_POLICY_UNIT=Cannot ${action} 
${type}. Policy unit is unknown.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_FILTER_NOT_IMPLEMENTED=Cannot ${action} 
${type}. Policy unit doesn't implement Filtering.
 ACTION_TYPE_FAILED_CLUSTER_POLICY_FUNCTION_NOT_IMPLEMENTED=Cannot ${action} 
${type}. Policy unit doesn't implement score function.


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a95c3a973b8ba9053727009983480ce79119f83
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Dudi Maroshi <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to