Alissa Bonas has uploaded a new change for review.

Change subject: core: add constant instead of harcoded msg name
......................................................................

core: add constant instead of harcoded msg name

Add missing message code to VdcBllMessages for validation of storage
connection format - instead of putting a hardcoded message name.
In addition, align message code name in backend appErrors.properties to the 
frontend
appErrors.properties to use underscore and not dots.

Change-Id: I6b8c098f0cd8330b21bc7e5c47ebb0d5e8365354
Signed-off-by: Alissa Bonas <abo...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
3 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/10570/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
index 213a842..34bfdc5 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageServerConnectionCommand.java
@@ -58,7 +58,7 @@
         if (returnValue && paramConnection.getstorage_type() == StorageType.NFS
                 && !new 
NfsMountPointConstraint().isValid(paramConnection.getconnection(), null)) {
             returnValue = false;
-            addCanDoActionMessage("VALIDATION.STORAGE.CONNECTION.INVALID");
+            
addCanDoActionMessage(VdcBllMessages.VALIDATION_STORAGE_CONNECTION_INVALID);
         }
 
         if (getParameters().getVdsId().equals(Guid.Empty)) {
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
index eecdfe19..1df3388 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
@@ -635,6 +635,7 @@
     ACTION_TYPE_FAILED_DISK_NOT_EXIST,
     ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME,
     NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL,
+    VALIDATION_STORAGE_CONNECTION_INVALID,
 
     // Gluster Messages
     ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID,
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 257117a..e46023d 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -554,7 +554,7 @@
 MISSING_DIRECTORY_ELEMENT_ID=User/group ID cannot be empty.
 NETWORK_ILEGAL_NETWORK_NAME=Network name must be 1-15 long and can contain 
only 'A-Z', 'a-z', '0-9', '_' characters
 STORAGE_OPERATION_FAILED_SPM_NETWORK_PROBLEMS=Storage related operations can't 
be performed while the Storage Pool Manager is down.\nPlease make sure the 
Storage Pool Manager is up and running, and check network connectivity.
-VALIDATION.STORAGE.CONNECTION.INVALID=Mount path is illegal, please use 
[IP:/path or FQDN:/path] convention.
+VALIDATION_STORAGE_CONNECTION_INVALID=Mount path is illegal, please use 
[IP:/path or FQDN:/path] convention.
 VALIDATION.TAGS.INVALID_TAG_NAME=Invalid tag name. Only alphanumeric chars, 
'-' and '_' characters are valid
 VALIDATION.VM_POOLS.NAME.NOT_NULL=Pool name is required
 VALIDATION.ROLES.NAME.NOT_NULL=Role name is required


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b8c098f0cd8330b21bc7e5c47ebb0d5e8365354
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <abo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to