cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbatt...@apache.org
Subject [3/6] git commit: updated refs/heads/master to 62ef617
Date Thu, 23 Jan 2014 06:24:56 GMT
CLOUDSTACK-5703: putting rdp server port value in host details


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b2de225f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b2de225f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b2de225f

Branch: refs/heads/master
Commit: b2de225f54f80e48598c9327d19c276186682299
Parents: 3e2f7dd
Author: Anshul Gangwar <anshul.gangwar@citrix.com>
Authored: Wed Jan 1 14:15:31 2014 +0530
Committer: Rajesh Battala <rajesh.battala@citrix.com>
Committed: Thu Jan 23 10:54:08 2014 +0530

----------------------------------------------------------------------
 .../HypervResource/HypervResourceController.cs         |  1 +
 server/src/com/cloud/servlet/ConsoleProxyServlet.java  | 13 +++++--------
 2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2de225f/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
index 6daadee..76336e9 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
@@ -1921,6 +1921,7 @@ namespace HypervResource
                     string productVersion = System.Environment.OSVersion.Version.Major.ToString()
+ "." +
                         System.Environment.OSVersion.Version.Minor.ToString();
                     details.Add("product_version", productVersion);
+                    details.Add("rdp.server.port", 2179);
                 }
 
                 // Detect CPUs, speed, memory

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b2de225f/server/src/com/cloud/servlet/ConsoleProxyServlet.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/servlet/ConsoleProxyServlet.java b/server/src/com/cloud/servlet/ConsoleProxyServlet.java
index 5edd95d..a6b179a 100644
--- a/server/src/com/cloud/servlet/ConsoleProxyServlet.java
+++ b/server/src/com/cloud/servlet/ConsoleProxyServlet.java
@@ -395,25 +395,22 @@ public class ConsoleProxyServlet extends HttpServlet {
     private String composeConsoleAccessUrl(String rootUrl, VirtualMachine vm, HostVO hostVo)
{
         StringBuffer sb = new StringBuffer(rootUrl);
         String host = hostVo.getPrivateIpAddress();
-        String username = _ms.findDetail(hostVo.getId(), "username").getValue();
-        String password = _ms.findDetail(hostVo.getId(), "password").getValue();
 
         Pair<String, Integer> portInfo = _ms.getVncPort(vm);
         if (s_logger.isDebugEnabled())
             s_logger.debug("Port info " + portInfo.first());
 
         Ternary<String, String, String> parsedHostInfo = parseHostInfo(portInfo.first());
+
         int port = -1;
-        String sid;
-        
         if (portInfo.second() == -9) {
             //for hyperv
-            port = 2179;
+            port = Integer.parseInt(_ms.findDetail(hostVo.getId(), "rdp.server.port").getValue());
         } else {
             port = portInfo.second();
         }
 
-        sid = vm.getVncPassword();
+        String sid = vm.getVncPassword();
         UserVmDetailVO details = _userVmDetailsDao.findDetail(vm.getId(), "keyboard");
 
         String tag = vm.getUuid();
@@ -434,8 +431,8 @@ public class ConsoleProxyServlet extends HttpServlet {
         if (portInfo.second() == -9) {
             //For Hyperv Clinet Host Address will send Instance id
             param.setHypervHost(host);
-            param.setUsername(username);
-            param.setPassword(password);
+            param.setUsername(_ms.findDetail(hostVo.getId(), "username").getValue());
+            param.setPassword(_ms.findDetail(hostVo.getId(), "password").getValue());
         }
         if (parsedHostInfo.second() != null && parsedHostInfo.third() != null) {
             param.setClientTunnelUrl(parsedHostInfo.second());


Mime
View raw message