cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject git commit: updated refs/heads/master to a5ede3a
Date Tue, 01 Oct 2013 05:48:51 GMT
Updated Branches:
  refs/heads/master b253d95de -> a5ede3af7


CLOUDSTACK-4696 Handle Netscaler Provider enable for both zones

Signed-off-by: venkataswamybabu budumuru <venkataswamybabu.budumuru@citrix.com>


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

Branch: refs/heads/master
Commit: a5ede3af7f5837f9e8a1fb80e2a1f20f24ecb870
Parents: b253d95
Author: Sowmya Krishnan <sowmya.krishnan@citrix.com>
Authored: Wed Sep 18 11:43:11 2013 +0530
Committer: venkataswamybabu budumuru <venkataswamybabu.budumuru@citrix.com>
Committed: Tue Oct 1 11:18:30 2013 +0530

----------------------------------------------------------------------
 .../component/test_netscaler_nw_off.py          | 45 +++-----------------
 1 file changed, 5 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5ede3af/test/integration/component/test_netscaler_nw_off.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_nw_off.py b/test/integration/component/test_netscaler_nw_off.py
index cb49dbe..3139257 100644
--- a/test/integration/component/test_netscaler_nw_off.py
+++ b/test/integration/component/test_netscaler_nw_off.py
@@ -408,13 +408,12 @@ class TestAddMultipleNSDiffZone(cloudstackTestCase):
         for zone in zones:
             if zone.networktype == 'Advanced':
                 zone_list.append(zone)
-
         self.assertGreater(
                            len(zone_list),
                            1,
                            "Atleast 2 advanced mode zones should be present for this test"
                            )
-
+        zoneid=zone_list[0].id
         physical_networks = PhysicalNetwork.list(
                                                  self.apiclient,
                                                  zoneid=zone_list[0].id
@@ -424,43 +423,12 @@ class TestAddMultipleNSDiffZone(cloudstackTestCase):
                 True,
                 "There should be atleast one physical network for advanced zone"
                 )
-        physical_network = physical_networks[0]
         self.debug("Adding netscaler device: %s" %
                                     self.services["netscaler_1"]["ipaddress"])
-        netscaler_1 = NetScaler.add(
-                                  self.apiclient,
-                                  self.services["netscaler_1"],
-                                  physicalnetworkid=physical_network.id
-                                  )
+        netscaler_1 = add_netscaler(self.apiclient, zoneid, self.services["netscaler_1"])
         self.cleanup.append(netscaler_1)
-        self.debug("Checking if Netscaler network service provider is enabled?")
-
-        nw_service_providers = NetworkServiceProvider.list(
-                                        self.apiclient,
-                                        name='Netscaler',
-                                        physicalnetworkid=physical_network.id
-                                        )
-        self.assertEqual(
-                         isinstance(nw_service_providers, list),
-                         True,
-                         "Network service providers list should not be empty"
-                         )
-        netscaler_provider = nw_service_providers[0]
-        if netscaler_provider.state != 'Enabled':
-            self.debug("Netscaler provider is not enabled. Enabling it..")
-            response = NetworkServiceProvider.update(
-                                          self.apiclient,
-                                          id=netscaler_provider.id,
-                                          state='Enabled'
-                                          )
-            self.assertEqual(
-                        response.state,
-                        "Enabled",
-                        "Network service provider should be in enabled state"
-                         )
-        else:
-            self.debug("Netscaler service provider is already enabled.")
 
+        physical_network = physical_networks[0]
         ns_list = NetScaler.list(
                                  self.apiclient,
                                  lbdeviceid=netscaler_1.lbdeviceid
@@ -492,6 +460,7 @@ class TestAddMultipleNSDiffZone(cloudstackTestCase):
                                                  self.apiclient,
                                                  zoneid=zone_list[1].id
                                                  )
+        zoneid=zone_list[1].id
         self.assertEqual(
                 isinstance(physical_networks, list),
                 True,
@@ -501,11 +470,7 @@ class TestAddMultipleNSDiffZone(cloudstackTestCase):
 
         self.debug("Adding netscaler device: %s" %
                                     self.services["netscaler_2"]["ipaddress"])
-        netscaler_2 = NetScaler.add(
-                                  self.apiclient,
-                                  self.services["netscaler_2"],
-                                  physicalnetworkid=physical_network.id
-                                  )
+        netscaler_2 = add_netscaler(self.apiclient, zoneid, self.services["netscaler_2"])
         self.cleanup.append(netscaler_2)
         ns_list = NetScaler.list(
                                  self.apiclient,


Mime
View raw message