Omer Frenkel has uploaded a new change for review.

Change subject: Core, UI: Allow '-' in network name
......................................................................

Core, UI: Allow '-' in network name

Engine now allows '-' in logical network name.

Change-Id: I2c5bf32dd510c386faff2ee1d041621451f2e352
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=910215
Signed-off-by: Omer Frenkel <[email protected]>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/19/41019/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java
index 83a74e4..be02f1a 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/Network.java
@@ -27,7 +27,7 @@
 
     private Guid id;
 
-    @Pattern(regexp = "^[_a-zA-Z0-9]{1,15}$", message = 
"NETWORK_ILEGAL_NETWORK_NAME", groups = { CreateEntity.class,
+    @Pattern(regexp = "^[-_a-zA-Z0-9]{1,15}$", message = 
"NETWORK_ILEGAL_NETWORK_NAME", groups = { CreateEntity.class,
             UpdateEntity.class })
     @Size(min = 1, max = BusinessEntitiesDefinitions.NETWORK_NAME_SIZE)
     private String name;
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java
index 75e338e..5ee1f33 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java
@@ -473,7 +473,7 @@
     private boolean validate()
     {
         RegexValidation tempVar = new RegexValidation();
-        tempVar.setExpression("^[A-Za-z0-9_]{1,15}$"); //$NON-NLS-1$
+        tempVar.setExpression("^[A-Za-z0-9_-]{1,15}$"); //$NON-NLS-1$
         
tempVar.setMessage(ConstantsManager.getInstance().getConstants().nameMustContainAlphanumericMaxLenMsg());
         RegexValidation tempVar2 = new RegexValidation();
         tempVar2.setIsNegate(true);
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
index c65a519..19efc64 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
@@ -852,7 +852,7 @@
     @DefaultStringValue("You haven't configured Power Management for this 
Host. Are you sure you want to continue?")
     String youHavntConfigPmMsg();
 
-    @DefaultStringValue("Name must contain alphanumeric characters or '_' 
(maximum length 15 characters).")
+    @DefaultStringValue("Name must contain alphanumeric characters, '-' or '_' 
(maximum length 15 characters).")
     String nameMustContainAlphanumericMaxLenMsg();
 
     @DefaultStringValue("Network name shouldn't start with 'bond'.")


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

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

Reply via email to