Yair Zaslavsky has uploaded a new change for review.

Change subject: core: Fix some Error constants of Host Activation
......................................................................

core: Fix some Error constants of Host Activation

There is no reason the ACTIVATE word will be part of the constants.
As the $action and $type exist in these two messages, they can be
reused if needed for other operations on Host.

Change-Id: I65d5cd35c8ef4a1a318670a90ffdfb9bfce9ad8c
Signed-off-by: Yair Zaslavsky <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.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/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
6 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/48/16648/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.java
index 48a6734..45c7207 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.java
@@ -76,10 +76,10 @@
     @Override
     protected boolean canDoAction() {
         if (getVds() == null) {
-            return 
failCanDoAction(VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST);
+            return failCanDoAction(VdcBllMessages.VDS_DOES_NOT_EXIST);
         }
         if (getVds().getStatus() == VDSStatus.Up) {
-            return 
failCanDoAction(VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP);
+            return failCanDoAction(VdcBllMessages.VDS_ALREADY_UP);
         }
         return true;
     }
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 2e7083a..40c7f76 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
@@ -212,8 +212,8 @@
     VDS_CANNOT_MAINTENANCE_SPM_WITH_RUNNING_TASKS(ErrorType.CONFLICT),
     VDS_CANNOT_MAINTENANCE_SPM_CONTENDING(ErrorType.CONFLICT),
     VDS_CANNOT_MAINTENANCE_VDS_IS_IN_MAINTENANCE(ErrorType.CONFLICT),
-    VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP(ErrorType.CONFLICT),
-    VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST(ErrorType.BAD_PARAMETERS),
+    VDS_ALREADY_UP(ErrorType.CONFLICT),
+    VDS_DOES_NOT_EXIST(ErrorType.BAD_PARAMETERS),
     VDS_STATUS_NOT_VALID_FOR_STOP(ErrorType.CONFLICT),
     VDS_STATUS_NOT_VALID_FOR_START(ErrorType.CONFLICT),
     VDS_NO_VDS_PROXY_FOUND(ErrorType.CONFLICT),
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 ddae8b9..8515679 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -89,7 +89,7 @@
 VDS_STATUS_NOT_VALID_FOR_UPDATE=Cannot ${action} ${type}. Host parameters 
cannot be modified while Host is operational.\n\
        Please switch Host to Maintenance mode first.
 VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP=Cannot ${action} ${type}. Host in Up status.
-VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST=Cannot ${action} ${type}. Host does not 
exist.
+VDS_DOES_NOT_EXIST=Cannot ${action} ${type}. Host does not exist.
 VDS_INVALID_SERVER_ID=Cannot ${action} ${type}. Invalid Host Id.
 VDS_EMPTY_NAME_OR_ID=Cannot ${action} ${type}. Empty host name or id.
 VDS_CANNOT_INSTALL_EMPTY_PASSWORD=Cannot install Host with empty password.
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 2c8b258..b9ed2a7 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
@@ -206,10 +206,10 @@
     String VDS_STATUS_NOT_VALID_FOR_UPDATE();
 
     @DefaultStringValue("Cannot ${action} ${type}. Host in Up status.")
-    String VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP();
+    String VDS_ALREADY_UP();
 
     @DefaultStringValue("Cannot ${action} ${type}. Host does not exist.")
-    String VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST();
+    String VDS_DOES_NOT_EXIST();
 
     @DefaultStringValue("Cannot ${action} ${type}. Invalid Host Id.")
     String VDS_INVALID_SERVER_ID();
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index 2c92506..9a59604 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -78,7 +78,7 @@
 VDS_CANNOT_REMOVE_VDS_DETECTED_RUNNING_VM=Cannot ${action} ${type}. One or 
more VMs are still running on this Host. 
 VDS_CANNOT_REMOVE_VDS_GROUP_VDS_DETECTED=Cannot ${action} ${type}. Host 
Cluster contains one or more Hosts.
 VDS_CANNOT_REMOVE_VDS_STATUS_ILLEGAL=Cannot ${action} ${type}. Host is 
operational. Please switch Host to Maintenance mode first.
-VDS_NOT_EXIST=Cannot ${action} ${type}. Internal Error: Host does not exists 
in DB.
+VDS_DOES_NOT_EXIST=Cannot ${action} ${type}. Internal Error: Host does not 
exists in DB.
 VDS_PROTOCOL_ERROR=Internal error: Host protocol error.
 VDS_RESPONSE_ERROR=Internal error: Host response error
 VDS_STATUS_NOT_VALID_FOR_STOP=Cannot perform Stop operation, Host has to be in 
Maintenance mode in order to be stopped.
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 5b24ca6..990a34c 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
@@ -87,8 +87,8 @@
 VDS_FAILED_FENCE_VIA_PROXY_CONNECTION=Connection to Host via proxy failed. 
Please verify that power management is available, and that the provided 
connection parameters are correct.
 VDS_STATUS_NOT_VALID_FOR_UPDATE=Cannot ${action} ${type}. Host parameters 
cannot be modified while Host is operational.\n\
        Please switch Host to Maintenance mode first.
-VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP=Cannot ${action} ${type}. Host in Up status.
-VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST=Cannot ${action} ${type}. Host does not 
exist.
+VDS_ALREADY_UP=Cannot ${action} ${type}. Host in Up status.
+VDS_DOES_NOT_EXIST=Cannot ${action} ${type}. Host does not exist.
 VDS_INVALID_SERVER_ID=Cannot ${action} ${type}. Invalid Host Id.
 VDS_EMPTY_NAME_OR_ID=Cannot ${action} ${type}. Empty host name or id.
 VDS_CANNOT_INSTALL_EMPTY_PASSWORD=Cannot install Host with empty password.


-- 
To view, visit http://gerrit.ovirt.org/16648
To unsubscribe, visit http://gerrit.ovirt.org/settings

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

Reply via email to