cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject [1/4] CLOUDSTACK-5925: Changes to regression tests as per new get_zone, get_pod etc definitions
Date Wed, 26 Feb 2014 11:43:45 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/marvin 4a0e95cf5 -> d70ef2a27


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d70ef2a2/test/integration/component/test_vpc_network_lbrules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network_lbrules.py b/test/integration/component/test_vpc_network_lbrules.py
index d411c63..9b5af64 100644
--- a/test/integration/component/test_vpc_network_lbrules.py
+++ b/test/integration/component/test_vpc_network_lbrules.py
@@ -181,14 +181,13 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
         # We want to fail quicker if it's failure
         socket.setdefaulttimeout(60)
 
-        cls.api_client = super(
-                            TestVPCNetworkLBRules,
-                            cls
-                            ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVPCNetworkLBRules, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d70ef2a2/test/integration/component/test_vpc_network_pfrules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network_pfrules.py b/test/integration/component/test_vpc_network_pfrules.py
index ebeffaa..510b881 100644
--- a/test/integration/component/test_vpc_network_pfrules.py
+++ b/test/integration/component/test_vpc_network_pfrules.py
@@ -182,14 +182,13 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
         # We want to fail quicker if it's failure
         socket.setdefaulttimeout(60)
 
-        cls.api_client = super(
-                                        TestVPCNetworkPFRules,
-                                        cls
-                                        ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVPCNetworkPFRules, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                                     cls.api_client,
                                     cls.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d70ef2a2/test/integration/component/test_vpc_network_staticnatrule.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network_staticnatrule.py b/test/integration/component/test_vpc_network_staticnatrule.py
index 5733bf9..fa6785b 100644
--- a/test/integration/component/test_vpc_network_staticnatrule.py
+++ b/test/integration/component/test_vpc_network_staticnatrule.py
@@ -182,14 +182,13 @@ class TestVPCNetworkPFRules(cloudstackTestCase):
         # We want to fail quicker if it's failure
         socket.setdefaulttimeout(60)
 
-        cls.api_client = super(
-                                        TestVPCNetworkPFRules,
-                                        cls
-                                        ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVPCNetworkPFRules, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                                     cls.api_client,
                                     cls.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d70ef2a2/test/integration/component/test_vpc_offerings.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_offerings.py b/test/integration/component/test_vpc_offerings.py
index 36694b1..0ae0459 100644
--- a/test/integration/component/test_vpc_offerings.py
+++ b/test/integration/component/test_vpc_offerings.py
@@ -137,14 +137,13 @@ class TestVPCOffering(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(
-                               TestVPCOffering,
-                               cls
-                               ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVPCOffering, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d70ef2a2/test/integration/component/test_vpc_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_routers.py b/test/integration/component/test_vpc_routers.py
index bb10bff..e7e4a8b 100644
--- a/test/integration/component/test_vpc_routers.py
+++ b/test/integration/component/test_vpc_routers.py
@@ -169,14 +169,13 @@ class TestVPCRoutersBasic(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.apiclient = super(
-                               TestVPCRoutersBasic,
-                               cls
-                               ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVPCRoutersBasic, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.apiclient, cls.services)
-        cls.zone = get_zone(cls.apiclient, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.apiclient,
                             cls.zone.id,
@@ -594,15 +593,14 @@ class TestVPCRouterOneNetwork(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.apiclient = super(
-                               TestVPCRouterOneNetwork,
-                               cls
-                               ).getClsTestClient().getApiClient()
         cls._cleanup = []
+        cls.testClient = super(TestVPCRoutersBasic, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.apiclient, cls.services)
-        cls.zone = get_zone(cls.apiclient, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.apiclient,
                             cls.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d70ef2a2/test/integration/component/test_vpc_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py
index 2235983..ac3d545 100644
--- a/test/integration/component/test_vpc_vm_life_cycle.py
+++ b/test/integration/component/test_vpc_vm_life_cycle.py
@@ -211,14 +211,13 @@ class TestVMLifeCycleVPC(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(
-                               TestVMLifeCycleVPC,
-                               cls
-                               ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVMLifeCycleVPC, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,
@@ -894,14 +893,13 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(
-                               TestVMLifeCycleSharedNwVPC,
-                               cls
-                               ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVMLifeCycleSharedNwVPC, cls).getClsTestClient()
+	cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,
@@ -1698,14 +1696,13 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(
-                               TestVMLifeCycleBothIsolated,
-                               cls
-                               ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVMLifeCycleBothIsolated, cls).getClsTestClient()
+	cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,
@@ -2033,14 +2030,13 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(
-                               TestVMLifeCycleStoppedVPCVR,
-                               cls
-                               ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVMLifeCycleStoppedVPCVR, cls).getClsTestClient()
+	cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,
@@ -2736,14 +2732,13 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase):
     def setUpClass(cls):
         try:
 
-            cls.api_client = super(
-                               TestVMLifeCycleDiffHosts,
-                               cls
-                               ).getClsTestClient().getApiClient()
+            cls.testClient = super(TestVMLifeCycleDiffHosts, cls).getClsTestClient()
+	    cls.api_client = cls.testClient.getApiClient()
+
             cls.services = Services().services
             # Get Zone, Domain and templates
-            cls.domain = get_domain(cls.api_client, cls.services)
-            cls.zone = get_zone(cls.api_client, cls.services)
+            cls.domain = get_domain(cls.api_client)
+            cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
             cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d70ef2a2/test/integration/component/test_vpc_vms_deployment.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vms_deployment.py b/test/integration/component/test_vpc_vms_deployment.py
index ce3d9e7..b32011b 100644
--- a/test/integration/component/test_vpc_vms_deployment.py
+++ b/test/integration/component/test_vpc_vms_deployment.py
@@ -166,14 +166,13 @@ class TestVMDeployVPC(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(
-                               TestVMDeployVPC,
-                               cls
-                               ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVMDeployVPC, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d70ef2a2/test/integration/component/test_vpn_users.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpn_users.py b/test/integration/component/test_vpn_users.py
index 4306d30..9553ff4 100644
--- a/test/integration/component/test_vpn_users.py
+++ b/test/integration/component/test_vpn_users.py
@@ -19,7 +19,7 @@
 """
 # Import Local Modules
 from nose.plugins.attrib import attr
-from marvin.cloudstackException import cloudstackAPIException
+from marvin.cloudstackException import CloudstackAPIException
 from marvin.cloudstackTestCase import cloudstackTestCase
 from marvin.lib.base import (
                                         Account,
@@ -94,12 +94,13 @@ class Services:
 class TestVPNUsers(cloudstackTestCase):
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(TestVPNUsers,
-            cls).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVPNUsers, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
 
         cls.services["mode"] = cls.zone.networktype
 
@@ -155,7 +156,7 @@ class TestVPNUsers(cloudstackTestCase):
                                                services=self.services["virtual_machine"]
                                                )
             return
-        except cloudstackAPIException as e:
+        except CloudstackAPIException as e:
                 self.tearDown()
                 raise e
 


Mime
View raw message