Ravi Nori has uploaded a new change for review.

Change subject: webadmin: Cannot add hypervisor host when use chinese support
......................................................................

webadmin: Cannot add hypervisor host when use chinese support

When adding a new host using chinese locale the
root user name gets localized leading to error
in user name when trying to establish an ssh
session

Change-Id: Ifdc4a332a297bca1b7c99bc6ede5a5aeacbc6431
Bug-Url: https://bugzilla.redhat.com/1045471
Signed-off-by: Ravi Nori <rn...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/InstallModel.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
3 files changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/22590/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
index d5475dd..8a3348a 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
@@ -57,6 +57,7 @@
     public static final String PmSlotKey = "slot"; //$NON-NLS-1$
     public static final String BeginTestStage = "BeginTest"; //$NON-NLS-1$
     public static final String EndTestStage = "EndTest"; //$NON-NLS-1$
+    public static final String RootUserName = "root"; //$NON-NLS-1$
 
     private UICommand privateTestCommand;
     UIConstants constants = ConstantsManager.getInstance().getConstants();
@@ -854,7 +855,7 @@
         setAuthSshPort(new EntityModel());
         getAuthSshPort().setEntity(constants.defaultHostSSHPort());
         setUserName(new EntityModel());
-        getUserName().setEntity(constants.defaultUserName());
+        getUserName().setEntity(RootUserName);
         // TODO: remove setIsChangable when configured ssh username is enabled
         getUserName().setIsChangable(false);
         setFetchSshFingerprint(new EntityModel());
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/InstallModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/InstallModel.java
index 738c26c..de0bdcd 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/InstallModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/InstallModel.java
@@ -117,7 +117,7 @@
         setOverrideIpTables(new EntityModel());
         getOverrideIpTables().setEntity(false);
         setUserName(new EntityModel());
-        getUserName().setEntity(constants.defaultUserName());
+        getUserName().setEntity(HostModel.RootUserName);
         // TODO: remove setIsChangable when configured ssh username is enabled
         getUserName().setIsChangable(false);
         setPublicKey(new EntityModel());
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 4014184..8eb06b6 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
@@ -2025,9 +2025,6 @@
     @DefaultStringValue("22")
     String defaultHostSSHPort();
 
-    @DefaultStringValue("root")
-    String defaultUserName();
-
     @DefaultStringValue("Remove Network QoS")
     String removeNetworkQoSTitle();
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdc4a332a297bca1b7c99bc6ede5a5aeacbc6431
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to