cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [02/22] git commit: updated refs/heads/4.5 to 78b9be0
Date Thu, 05 Feb 2015 11:51:38 GMT
CLOUDSTACK-7313 Fixed issues in provisioning vpx in SDX from CS

(cherry picked from commit 0f528df228ac51581b8ff6f63e8ffb6db3d94d39)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/4.5
Commit: 782adc106ec87f262997eed853997500d7b8e9b8
Parents: bd19019
Author: Rajesh Battala <rajesh.battala@citrix.com>
Authored: Sun Sep 28 09:20:13 2014 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Thu Feb 5 13:50:29 2015 +0530

----------------------------------------------------------------------
 .../src/com/cloud/network/resource/NetscalerResource.java    | 8 +++++---
 .../cloud/network/ExternalLoadBalancerDeviceManagerImpl.java | 8 +++++++-
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/782adc10/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java
b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java
index 485da8d..d95ab88 100644
--- a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java
+++ b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java
@@ -931,7 +931,7 @@ public class NetscalerResource implements ServerResource {
                         " as there are no admin profile to use for creating VPX."));
             }
             String profileName = profiles[0].get_name();
-            ns_obj.set_profile_name(profileName);
+            ns_obj.set_profile_name("ns_nsroot_profile");
 
             // use the first VPX image of the available VPX images on the SDX to create an
instance of VPX
             // TODO: should enable the option to choose the template while adding the SDX
device in to CloudStack
@@ -959,7 +959,7 @@ public class NetscalerResource implements ServerResource {
             // wait for VPX instance to start-up
             long startTick = System.currentTimeMillis();
             long startWaitMilliSeconds = 600000;
-            while (!newVpx.get_state().equalsIgnoreCase("up") && System.currentTimeMillis()
- startTick < startWaitMilliSeconds) {
+            while (!newVpx.get_instance_state().equalsIgnoreCase("up") && System.currentTimeMillis()
- startTick < startWaitMilliSeconds) {
                 try {
                     Thread.sleep(10000);
                 } catch (InterruptedException e) {
@@ -970,7 +970,7 @@ public class NetscalerResource implements ServerResource {
             }
 
             // if vpx instance never came up then error out
-            if (!newVpx.get_state().equalsIgnoreCase("up")) {
+            if (!newVpx.get_instance_state().equalsIgnoreCase("up")) {
                 return new Answer(cmd, new ExecutionException("Failed to start VPX instance
" + vpxName + " created on the netscaler SDX device " + _ip));
             }
 
@@ -981,6 +981,8 @@ public class NetscalerResource implements ServerResource {
             while (System.currentTimeMillis() - startTick < nsServiceWaitMilliSeconds)
{
                 try {
                     nitro_service _netscalerService = new nitro_service(cmd.getLoadBalancerIP(),
"https");
+                    _netscalerService.set_certvalidation(false);
+                    _netscalerService.set_hostnameverification(false);
                     _netscalerService.set_credential(username, password);
                     apiCallResult = _netscalerService.login();
                     if (apiCallResult.errorcode == 0) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/782adc10/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
index a608db8..d36c22d 100644
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
@@ -17,6 +17,7 @@
 package com.cloud.network;
 
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -519,8 +520,13 @@ public abstract class ExternalLoadBalancerDeviceManagerImpl extends AdapterBase
                                     null, false);
                             String publicIPNetmask = publicIp.getVlanNetmask();
                             String publicIPgateway = publicIp.getVlanGateway();
-                            String publicIPVlanTag = publicIp.getVlanTag();
                             String publicIP = publicIp.getAddress().toString();
+                            String publicIPVlanTag="";
+                            try {
+                                publicIPVlanTag = BroadcastDomainType.getValue(publicIp.getVlanTag());
+                            } catch (URISyntaxException e) {
+                                s_logger.error("Failed to parse public ip vlan tag" + e.getMessage());
+                            }
 
                             String url =
                                 "https://" + lbIP + "?publicinterface=" + publicIf + "&privateinterface="
+ privateIf + "&lbdevicededicated=" + dedicatedLb +


Mime
View raw message