You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2014/01/01 10:48:55 UTC

[3/3] git commit: updated refs/heads/4.3 to 0b643dd

CLOUDSTACK-5705: fixed the thumbnail not wrking for hyperv


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

Branch: refs/heads/4.3
Commit: 0b643ddf09f25b569d7219de026aeda144a3b33f
Parents: e74889a
Author: Anshul Gangwar <an...@citrix.com>
Authored: Wed Jan 1 14:42:19 2014 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Wed Jan 1 15:05:34 2014 +0530

----------------------------------------------------------------------
 .../src/com/cloud/servlet/ConsoleProxyServlet.java | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0b643ddf/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 a587337..8a55b39 100644
--- a/server/src/com/cloud/servlet/ConsoleProxyServlet.java
+++ b/server/src/com/cloud/servlet/ConsoleProxyServlet.java
@@ -361,7 +361,16 @@ public class ConsoleProxyServlet extends HttpServlet {
         String sid = vm.getVncPassword();
         String tag = String.valueOf(vm.getId());
         tag = _identityService.getIdentityUuid("vm_instance", tag);
-        String ticket = genAccessTicket(host, String.valueOf(portInfo.second()), sid, tag);
+
+        int port = -1;
+        if (portInfo.second() == -9) {
+            //for hyperv
+            port = Integer.parseInt(_ms.findDetail(hostVo.getId(), "rdp.server.port").getValue());
+        } else {
+            port = portInfo.second();
+        }
+
+        String ticket = genAccessTicket(parsedHostInfo.first(), String.valueOf(port), sid, tag);
 
         ConsoleProxyPasswordBasedEncryptor encryptor = new ConsoleProxyPasswordBasedEncryptor(getEncryptorPassword());
         ConsoleProxyClientParam param = new ConsoleProxyClientParam();
@@ -370,6 +379,12 @@ public class ConsoleProxyServlet extends HttpServlet {
         param.setClientHostPassword(sid);
         param.setClientTag(tag);
         param.setTicket(ticket);
+        if (portInfo.second() == -9) {
+            //For Hyperv Clinet Host Address will send Instance id
+            param.setHypervHost(host);
+            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());
             param.setClientTunnelSession(parsedHostInfo.third());