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 6334b73
Date Tue, 27 Aug 2013 06:47:46 GMT
Updated Branches:
  refs/heads/master bdbdfd401 -> 6334b738d


CLOUDSTACK-4491: Added missing NS setup

Signed-off-by: venkataswamybabu budumuru <venkataswamybabu.budumuru@citrix.com>
(cherry picked from commit 239281a401f09df9519bb8e8637c2060b9be019b)


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

Branch: refs/heads/master
Commit: 6334b738d048591c6ded39f9ad3f448a2454b03d
Parents: bdbdfd4
Author: Sowmya Krishnan <sowmya.krishnan@citrix.com>
Authored: Mon Aug 26 11:14:01 2013 +0530
Committer: venkataswamybabu budumuru <venkataswamybabu.budumuru@citrix.com>
Committed: Tue Aug 27 12:13:46 2013 +0530

----------------------------------------------------------------------
 .../component/test_netscaler_configs.py         | 47 +++++++++++---------
 1 file changed, 25 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6334b738/test/integration/component/test_netscaler_configs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_configs.py b/test/integration/component/test_netscaler_configs.py
index df4e707..c10f688 100644
--- a/test/integration/component/test_netscaler_configs.py
+++ b/test/integration/component/test_netscaler_configs.py
@@ -62,7 +62,7 @@ class Services:
                                     "protocol": 'TCP',
                                 },
                          "netscaler": {
-                   "ipaddress": '10.147.60.26',
+                                "ipaddress": '10.147.60.26',
                                 "username": 'nsroot',
                                 "password": 'nsroot',
                                 "networkdevicetype": 'NetscalerVPXLoadBalancer',
@@ -2095,6 +2095,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
+        cls._cleanup = []
         cls.api_client = super(
                                TestGuestNetworkShutDown,
                                cls
@@ -2108,30 +2109,32 @@ class TestGuestNetworkShutDown(cloudstackTestCase):
                             cls.zone.id,
                             cls.services["ostype"]
                             )
-
-        cls.network_offering = NetworkOffering.create(
+        try:
+           cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services)
+           cls._cleanup.append(cls.netscaler)
+           cls.network_offering = NetworkOffering.create(
                                             cls.api_client,
                                             cls.services["network_offering"],
                                             conservemode=True
                                             )
-        # Enable Network offering
-        cls.network_offering.update(cls.api_client, state='Enabled')
-        cls.services["virtual_machine"]["zoneid"] = cls.zone.id
-        cls.services["virtual_machine"]["template"] = cls.template.id
+           # Enable Network offering
+           cls.network_offering.update(cls.api_client, state='Enabled')
+           cls.services["virtual_machine"]["zoneid"] = cls.zone.id
+           cls.services["virtual_machine"]["template"] = cls.template.id
 
-        cls.service_offering = ServiceOffering.create(
+           cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
                                             cls.services["service_offering"]
                                             )
-        cls.account = Account.create(
+           cls.account = Account.create(
                                      cls.api_client,
                                      cls.services["account"],
                                      admin=True,
                                      domainid=cls.domain.id
                                      )
-
-        # Creating network using the network offering created
-        cls.network = Network.create(
+           cls._cleanup.insert(0,cls.account)
+           # Creating network using the network offering created
+           cls.network = Network.create(
                                     cls.api_client,
                                     cls.services["network"],
                                     accountid=cls.account.name,
@@ -2140,8 +2143,8 @@ class TestGuestNetworkShutDown(cloudstackTestCase):
                                     zoneid=cls.zone.id
                                     )
 
-        # Spawn few instances in that network
-        cls.vm_1 = VirtualMachine.create(
+           # Spawn few instances in that network
+           cls.vm_1 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
                                   accountid=cls.account.name,
@@ -2149,7 +2152,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase):
                                   serviceofferingid=cls.service_offering.id,
                                   networkids=[str(cls.network.id)]
                                   )
-        cls.vm_2 = VirtualMachine.create(
+           cls.vm_2 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
                                   accountid=cls.account.name,
@@ -2157,25 +2160,25 @@ class TestGuestNetworkShutDown(cloudstackTestCase):
                                   serviceofferingid=cls.service_offering.id,
                                   networkids=[str(cls.network.id)]
                                   )
-        cls.public_ip = PublicIPAddress.create(
+           cls.public_ip = PublicIPAddress.create(
                                 cls.api_client,
                                 accountid=cls.account.name,
                                 zoneid=cls.zone.id,
                                 domainid=cls.account.domainid,
                                 networkid=cls.network.id
                                 )
-        cls.lb_rule = LoadBalancerRule.create(
+           cls.lb_rule = LoadBalancerRule.create(
                                     cls.api_client,
                                     cls.services["lbrule"],
                                     ipaddressid=cls.public_ip.ipaddress.id,
                                     accountid=cls.account.name,
                                     networkid=cls.network.id
                                 )
-        cls.lb_rule.assign(cls.api_client, [cls.vm_1, cls.vm_2])
-        cls._cleanup = [
-                        cls.service_offering,
-                        cls.account
-                        ]
+           cls.lb_rule.assign(cls.api_client, [cls.vm_1, cls.vm_2])
+        except Exception as e:
+           cls.tearDownClass()
+           raise Exception ("Warning: Exception in setUpClass: %s" % e)
+
         return
 
     @classmethod


Mime
View raw message