cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject git commit: updated refs/heads/marvin to f866bb2
Date Thu, 10 Apr 2014 09:07:30 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/marvin 8df1c71b6 -> f866bb21e


CLOUDSTACK-6316: Fixed component and smoke test failures-third pass


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

Branch: refs/heads/marvin
Commit: f866bb21e6fe8a754db1986d9fe3fd5e31db4228
Parents: 8df1c71
Author: SrikanteswaraRao Talluri <talluri@apache.org>
Authored: Thu Apr 10 13:18:32 2014 +0530
Committer: SrikanteswaraRao Talluri <talluri@apache.org>
Committed: Thu Apr 10 13:20:13 2014 +0530

----------------------------------------------------------------------
 .../component/test_allocation_states.py         | 24 ++++--
 .../component/test_dynamic_compute_offering.py  | 27 +++---
 .../component/test_ip_reservation.py            | 86 ++++++++++++--------
 .../component/test_multiple_ips_per_nic.py      | 41 ++++++----
 .../component/test_non_contiguous_vlan.py       |  2 +-
 .../component/test_persistent_networks.py       | 53 +++++++-----
 test/integration/component/test_portable_ip.py  | 26 ++++--
 test/integration/component/test_region_vpc.py   | 30 ++++---
 test/integration/component/test_tags.py         | 18 ++--
 .../test_vpc_distributed_routing_offering.py    | 27 +++---
 .../smoke/test_VirtualRouter_alerts.py          | 11 ++-
 .../smoke/test_deploy_vgpu_enabled_vm.py        |  9 +-
 .../smoke/test_deploy_vm_root_resize.py         |  8 +-
 .../integration/smoke/test_over_provisioning.py |  6 +-
 test/integration/smoke/test_vm_iam.py           |  4 +-
 tools/marvin/marvin/config/test_data.py         |  4 +
 16 files changed, 229 insertions(+), 147 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_allocation_states.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_allocation_states.py b/test/integration/component/test_allocation_states.py
index 98f3a03..9ba246f 100644
--- a/test/integration/component/test_allocation_states.py
+++ b/test/integration/component/test_allocation_states.py
@@ -23,8 +23,8 @@ from marvin.lib.base import (Host,
                              Zone,
                              Cluster,
                              StoragePool)
-from marvin.lib.common import get_zone
-
+from marvin.lib.common import get_zone, get_template
+from marvin.codes import FAILED
 class Services:
     """Test Resource Limits Services
     """
@@ -85,13 +85,23 @@ class TestAllocationState(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(
-                               TestAllocationState,
-                               cls
-                               ).getClsTestClient().getApiClient()
+        cls.testClient = super(TestAllocationState, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
         cls.services = Services().services
+
         # Get Zone, Domain and templates
-        cls.zone = get_zone(cls.api_client, cls.services)
+
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+        cls.template = get_template(
+                            cls.api_client,
+                            cls.zone.id,
+                            cls.services["ostype"]
+                            )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
+
+
         cls.services['mode'] = cls.zone.networktype
         cls._cleanup = []
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_dynamic_compute_offering.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_dynamic_compute_offering.py b/test/integration/component/test_dynamic_compute_offering.py
index 542b637..1636aad 100644
--- a/test/integration/component/test_dynamic_compute_offering.py
+++ b/test/integration/component/test_dynamic_compute_offering.py
@@ -38,21 +38,22 @@ class TestDynamicServiceOffering(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestDynamicServiceOffering,cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-
-        # Fill services from the external config file
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestDynamicServiceOffering, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
-        cls.mode = str(cls.zone.networktype).lower()
-        cls.template = get_template(
-                            cls.api_client,
-                            cls.zone.id,
-                            cls.services["ostype"]
-                            )
+        domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+        cls.services['mode'] = cls.zone.networktype
+
+        template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+        if template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
         cls._cleanup = []

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_ip_reservation.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_ip_reservation.py b/test/integration/component/test_ip_reservation.py
index 392ad98..f3476b2 100644
--- a/test/integration/component/test_ip_reservation.py
+++ b/test/integration/component/test_ip_reservation.py
@@ -80,18 +80,22 @@ class TestIpReservation(cloudstackTestCase):
     """
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestIpReservation, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        # Fill test data from the external config file
-        cls.testData = cloudstackTestClient.getConfigParser().parsedDict
+        cls.testClient = super(TestIpReservation, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
+        # Fill services from the external config file
+        cls.services = cls.testClient.getConfigParser().parsedDict
+
         # Get Zone, Domain and templates
         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,
-                            cls.testData["ostype"]
+                            cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.testData["domainid"] = cls.domain.id
         cls.testData["zoneid"] = cls.zone.id
         cls.testData["virtual_machine"]["zoneid"] = cls.zone.id
@@ -524,18 +528,22 @@ class TestRestartNetwork(cloudstackTestCase):
     """
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestRestartNetwork, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        # Fill test data from the external config file
-        cls.testData = cloudstackTestClient.getConfigParser().parsedDict
+        cls.testClient = super(TestRestartNetwork, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
+        # Fill services from the external config file
+        cls.services = cls.testClient.getConfigParser().parsedDict
+
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.testData)
-        cls.zone = get_zone(cls.api_client, cls.testData)
+        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,
-                            cls.testData["ostype"]
+                            cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.testData["domainid"] = cls.domain.id
         cls.testData["zoneid"] = cls.zone.id
         cls.testData["virtual_machine"]["zoneid"] = cls.zone.id
@@ -645,18 +653,22 @@ class TestUpdateIPReservation(cloudstackTestCase):
     """
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestUpdateIPReservation, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        # Fill test data from the external config file
-        cls.testData = cloudstackTestClient.getConfigParser().parsedDict
+        cls.testClient = super(TestUpdateIPReservation, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
+        # Fill services from the external config file
+        cls.services = cls.testClient.getConfigParser().parsedDict
+
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.testData)
-        cls.zone = get_zone(cls.api_client, cls.testData)
+        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,
-                            cls.testData["ostype"]
+                            cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.testData["domainid"] = cls.domain.id
         cls.testData["zoneid"] = cls.zone.id
         cls.testData["virtual_machine"]["zoneid"] = cls.zone.id
@@ -791,18 +803,22 @@ class TestRouterOperations(cloudstackTestCase):
     """
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestRouterOperations, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        # Fill test data from the external config file
-        cls.testData = cloudstackTestClient.getConfigParser().parsedDict
+        cls.testClient = super(TestRouterOperations, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
+        # Fill services from the external config file
+        cls.services = cls.testClient.getConfigParser().parsedDict
+
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.testData)
-        cls.zone = get_zone(cls.api_client, cls.testData)
+        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,
-                            cls.testData["ostype"]
+                            cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.testData["domainid"] = cls.domain.id
         cls.testData["zoneid"] = cls.zone.id
         cls.testData["virtual_machine"]["zoneid"] = cls.zone.id
@@ -957,18 +973,22 @@ class TestFailureScnarios(cloudstackTestCase):
     """
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestFailureScnarios, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        # Fill test data from the external config file
-        cls.testData = cloudstackTestClient.getConfigParser().parsedDict
+        cls.testClient = super(TestFailureScnarios, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
+        # Fill services from the external config file
+        cls.services = cls.testClient.getConfigParser().parsedDict
+
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.testData)
-        cls.zone = get_zone(cls.api_client, cls.testData)
+        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,
-                            cls.testData["ostype"]
+                            cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.testData["domainid"] = cls.domain.id
         cls.testData["zoneid"] = cls.zone.id
         cls.testData["virtual_machine"]["zoneid"] = cls.zone.id

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_multiple_ips_per_nic.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_multiple_ips_per_nic.py b/test/integration/component/test_multiple_ips_per_nic.py
index d061cd2..3b83366 100644
--- a/test/integration/component/test_multiple_ips_per_nic.py
+++ b/test/integration/component/test_multiple_ips_per_nic.py
@@ -119,21 +119,23 @@ class TestBasicOperations(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestBasicOperations,cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
+        cls.testClient = super(TestBasicOperations, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
 
         # Fill services from the external config file
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        cls.services = cls.testClient.getConfigParser().parsedDict
 
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
-        cls.mode = str(cls.zone.networktype).lower()
+        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,
                             cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
+
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
         cls.service_offering = ServiceOffering.create(
@@ -468,21 +470,23 @@ class TestNetworkRules(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestNetworkRules,cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
+        cls.testClient = super(TestNetworkRules, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
 
         # Fill services from the external config file
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        cls.services = cls.testClient.getConfigParser().parsedDict
 
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
-        cls.mode = str(cls.zone.networktype).lower()
+        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,
                             cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
+
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
         cls.service_offering = ServiceOffering.create(
@@ -841,21 +845,22 @@ class TestVmNetworkOperations(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestVmNetworkOperations,cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
+        cls.testClient = super(TestVmNetworkOperations, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
 
         # Fill services from the external config file
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        cls.services = cls.testClient.getConfigParser().parsedDict
 
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
-        cls.mode = str(cls.zone.networktype).lower()
+        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,
                             cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
         cls.service_offering = ServiceOffering.create(

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_non_contiguous_vlan.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_non_contiguous_vlan.py b/test/integration/component/test_non_contiguous_vlan.py
index b323782..4609af9 100644
--- a/test/integration/component/test_non_contiguous_vlan.py
+++ b/test/integration/component/test_non_contiguous_vlan.py
@@ -125,7 +125,7 @@ class TestNonContiguousVLANRanges(cloudstackTestCase):
 
     def setUp(self):
         self.apiclient = self.testClient.getApiClient()
-        self.vlan = self.services["vlan_new"]
+        self.vlan = self.services["vlan_nc"]
         self.apiClient = self.testClient.getApiClient()
 
         self.physicalnetwork, self.vlan = setNonContiguousVlanIds(self.apiclient, self.zone.id)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_persistent_networks.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_persistent_networks.py b/test/integration/component/test_persistent_networks.py
index e29599c..51a91ec 100644
--- a/test/integration/component/test_persistent_networks.py
+++ b/test/integration/component/test_persistent_networks.py
@@ -21,7 +21,7 @@ from marvin.lib.base import *
 from marvin.lib.common import *
 import netaddr
 from nose.plugins.attrib import attr
-from marvin.codes import PASS, FAIL
+from marvin.codes import PASS, FAIL, FAILED
 from marvin.sshClient import SshClient
 from marvin.cloudstackTestCase import cloudstackTestCase, unittest
 from ddt import ddt, data
@@ -57,7 +57,7 @@ class TestPersistentNetworks(cloudstackTestCase):
         cls.services["virtual_machine"]["template"] = cls.template.id
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
-                                            cls.services["service_offering"]
+                                            cls.services["service_offerings"]["small"]
                                             )
         cls.isolated_persistent_network_offering = cls.createNetworkOffering("nw_off_isolated_persistent")
         cls.isolated_persistent_network_offering_netscaler = cls.createNetworkOffering("nw_off_isolated_persistent_netscaler")
@@ -922,20 +922,22 @@ class TestAssignVirtualMachine(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestAssignVirtualMachine,cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
+        cls.testClient = super(TestAssignVirtualMachine, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
 
         # Fill services from the external config file
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        cls.services = cls.testClient.getConfigParser().parsedDict
 
         # 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,
                             cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
         cls.service_offering = ServiceOffering.create(
@@ -1076,20 +1078,22 @@ class TestProjectAccountOperations(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestProjectAccountOperations,cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
+        cls.testClient = super(TestProjectAccountOperations, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
 
         # Fill services from the external config file
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        cls.services = cls.testClient.getConfigParser().parsedDict
 
         # 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,
                             cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
         cls.service_offering = ServiceOffering.create(
@@ -1231,20 +1235,22 @@ class TestRestartPersistentNetwork(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestRestartPersistentNetwork,cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
+        cls.testClient = super(TestRestartPersistentNetwork, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
 
         # Fill services from the external config file
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        cls.services = cls.testClient.getConfigParser().parsedDict
 
         # 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,
                             cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
         cls.service_offering = ServiceOffering.create(
@@ -1487,20 +1493,23 @@ class TestVPCNetworkOperations(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestVPCNetworkOperations,cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
+        cls.testClient = super(TestVPCNetworkOperations, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
 
         # Fill services from the external config file
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        cls.services = cls.testClient.getConfigParser().parsedDict
 
         # 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,
                             cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
+
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
         cls.service_offering = ServiceOffering.create(

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_portable_ip.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py
index bf37447..65a4eed 100644
--- a/test/integration/component/test_portable_ip.py
+++ b/test/integration/component/test_portable_ip.py
@@ -130,6 +130,14 @@ class Services:
                                   "protocol": 'TCP',
                         },
                         "ostype": 'CentOS 5.3 (64-bit)',
+                        "portableIpRange": {
+                            "gateway" : "10.223.252.195",
+                            "netmask" : "255.255.255.192",
+                            "startip" : "10.223.252.196",
+                            "endip"   : "10.223.252.197",
+                            "vlan"    : "1001"
+                        }
+
           }
 
 class TestCreatePortablePublicIpRanges(cloudstackTestCase):
@@ -187,7 +195,7 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
         # 1. Create new portable ip range with root admin api
         # 2. Portable ip range should be created successfully
 
-        portable_ip_range_services = get_portable_ip_range_services(self.config)
+        portable_ip_range_services = get_portable_ip_range_services(self.services)
 
         self.debug(portable_ip_range_services)
 
@@ -231,7 +239,7 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
                                             DomainName=self.account.domain
                                             )
 
-        portable_ip_range_services = get_portable_ip_range_services(self.config)
+        portable_ip_range_services = get_portable_ip_range_services(self.services)
 
         if portable_ip_range_services is None:
             self.skipTest('Failed to read config values related to portable ip range')
@@ -253,7 +261,7 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
         # 1. Try to create new portable ip range with invalid region id
         # 2. Portable ip range creation should fail
 
-        portable_ip_range_services = get_portable_ip_range_services(self.config)
+        portable_ip_range_services = get_portable_ip_range_services(self.services)
 
         if portable_ip_range_services is None:
             self.skipTest('Failed to read config values related to portable ip range')
@@ -307,7 +315,7 @@ class TestDeletePortablePublicIpRanges(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
 
-        portable_ip_range_services = get_portable_ip_range_services(self.config)
+        portable_ip_range_services = get_portable_ip_range_services(self.services)
 
         if portable_ip_range_services is None:
             self.skipTest('Failed to read config values related to portable ip range')
@@ -482,7 +490,7 @@ class TestListPortablePublicIpRanges(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
 
         #create new portable ip range
-        self.portable_ip_range_services = get_portable_ip_range_services(self.config)
+        self.portable_ip_range_services = get_portable_ip_range_services(self.services)
 
         if self.portable_ip_range_services is None:
             self.skipTest('Failed to read config values related to portable ip range')
@@ -645,7 +653,7 @@ class TestAssociatePublicIp(cloudstackTestCase):
 
         self.cleanup = []
 
-        portable_ip_range_services = get_portable_ip_range_services(self.config)
+        portable_ip_range_services = get_portable_ip_range_services(self.services)
 
         if portable_ip_range_services is None:
             self.skipTest('Failed to read config values related to portable ip range')
@@ -989,7 +997,7 @@ class TestDisassociatePublicIp(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.cleanup = []
 
-        portable_ip_range_services = get_portable_ip_range_services(self.config)
+        portable_ip_range_services = get_portable_ip_range_services(self.services)
 
         if portable_ip_range_services is None:
             self.skipTest('Failed to read config values related to portable ip range')
@@ -1211,7 +1219,7 @@ class TestDeleteAccount(cloudstackTestCase):
                             )
         self.cleanup = []
 
-        portable_ip_range_services = get_portable_ip_range_services(self.config)
+        portable_ip_range_services = get_portable_ip_range_services(self.services)
 
         if portable_ip_range_services is None:
             self.skipTest('Failed to read config values related to portable ip range')
@@ -1488,7 +1496,7 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
 
         #create new portable ip range
-        self.portable_ip_range_services = get_portable_ip_range_services(self.config)
+        self.portable_ip_range_services = get_portable_ip_range_services(self.services)
 
         if self.portable_ip_range_services is None:
             self.skipTest('Failed to read config values related to portable ip range')

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_region_vpc.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_region_vpc.py b/test/integration/component/test_region_vpc.py
index f68d6eb..947c62f 100644
--- a/test/integration/component/test_region_vpc.py
+++ b/test/integration/component/test_region_vpc.py
@@ -159,19 +159,25 @@ class TestRegionVpcOffering(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(
-                               TestRegionVpcOffering,
-                               cls
-                               ).getClsTestClient().getApiClient()
-        cls.services = Services().services
+        testClient = super(TestRegionVpcOffering, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
-        cls.template = get_template(
-                            cls.api_client,
-                            cls.zone.id,
-                            cls.services["ostype"]
-                            )
+        domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+        cls.services['mode'] = cls.zone.networktype
+
+
+        template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+        if template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
+
+
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_tags.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_tags.py b/test/integration/component/test_tags.py
index 1ee2f77..41a75c3 100644
--- a/test/integration/component/test_tags.py
+++ b/test/integration/component/test_tags.py
@@ -178,23 +178,23 @@ class TestResourceTags(cloudstackTestCase):
         cls.api_client = cls.testClient.getApiClient()
 
         cls.services = Services().services
-        # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client)
-        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
 
-        cls.account = Account.create(
-                            cls.api_client,
-                            cls.services["account"],
-                            admin=True,
-                            )
-        cls.zone = get_zone(cls.api_client, cls.services)
+        # Get Zone, Domain and templates
 
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,
                             cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
 
+        cls.account = Account.create(
+                            cls.api_client,
+                            cls.services["account"],
+                            admin=True,
+                            )
         # Create service offerings, disk offerings etc
         cls.service_offering = ServiceOffering.create(
                                     cls.api_client,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/component/test_vpc_distributed_routing_offering.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_distributed_routing_offering.py b/test/integration/component/test_vpc_distributed_routing_offering.py
index 0af90aa..5deb6a3 100644
--- a/test/integration/component/test_vpc_distributed_routing_offering.py
+++ b/test/integration/component/test_vpc_distributed_routing_offering.py
@@ -154,19 +154,22 @@ class TestVPCDistributedRouterOffering(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(
-                               TestVPCDistributedRouterOffering,
-                               cls
-                               ).getClsTestClient().getApiClient()
-        cls.services = Services().services
+        testClient = super(TestVPCDistributedRouterOffering, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
+
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
-        cls.template = get_template(
-                            cls.api_client,
-                            cls.zone.id,
-                            cls.services["ostype"]
-                            )
+        domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+        cls.services['mode'] = cls.zone.networktype
+
+        template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+        if template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/smoke/test_VirtualRouter_alerts.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_VirtualRouter_alerts.py b/test/integration/smoke/test_VirtualRouter_alerts.py
index a106725..be327bb 100644
--- a/test/integration/smoke/test_VirtualRouter_alerts.py
+++ b/test/integration/smoke/test_VirtualRouter_alerts.py
@@ -24,6 +24,7 @@ from marvin.lib.utils import *
 from marvin.lib.base import *
 from marvin.lib.common import *
 from nose.plugins.attrib import attr
+from marvin.codes import FAILED
 import time
 
 
@@ -96,12 +97,13 @@ class Services:
 class TestVRServiceFailureAlerting(cloudstackTestCase):
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(TestVRServiceFailureAlerting, cls).getClsTestClient().getApiClient()
+        cls.testClient = super(TestVRServiceFailureAlerting, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
         cls.services = Services().services
 
         # Get Zone, Domain and templates
-        domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+        domain = get_domain(cls.api_client)
         cls.services['mode'] = cls.zone.networktype
 
         template = get_template(
@@ -109,6 +111,9 @@ class TestVRServiceFailureAlerting(cloudstackTestCase):
             cls.zone.id,
             cls.services["ostype"]
         )
+
+        if template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% cls.services["ostype"]
         # Set Zones and disk offerings ??
         cls.services["small"]["zoneid"] = cls.zone.id
         cls.services["small"]["template"] = template.id

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
index f07226b..1627653 100644
--- a/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
+++ b/test/integration/smoke/test_deploy_vgpu_enabled_vm.py
@@ -31,8 +31,11 @@ from marvin.lib.utils import cleanup_resources
 #common - commonly used methods for all tests are listed here
 from marvin.lib.common import get_zone, get_domain, get_template
 
+from marvin.codes import FAILED
+
 from nose.plugins.attrib import attr
 
+
 class Services:
     """Test VM Life Cycle Services
     """
@@ -116,12 +119,14 @@ class TestDeployvGPUenabledVM(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
 
         # Get Zone, Domain and Default Built-in template
-        self.domain = get_domain(self.apiclient, self.services)
-        self.zone = get_zone(self.apiclient, self.services)
+        self.domain = get_domain(self.apiclient)
+        self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
         self.services["mode"] = self.zone.networktype
         # Before running this test, register a windows template with ostype as 'Windows 7
(32-bit)'
         self.template = get_template(self.apiclient, self.zone.id, self.services["ostype"],
templatetype='USER')
 
+        if self.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% self.services["ostype"]
         #create a user account
         self.account = Account.create(
             self.apiclient,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/smoke/test_deploy_vm_root_resize.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vm_root_resize.py b/test/integration/smoke/test_deploy_vm_root_resize.py
index 737b2cf..e758ffd 100644
--- a/test/integration/smoke/test_deploy_vm_root_resize.py
+++ b/test/integration/smoke/test_deploy_vm_root_resize.py
@@ -31,6 +31,8 @@ from marvin.lib.utils import cleanup_resources
 #common - commonly used methods for all tests are listed here
 from marvin.lib.common import get_zone, get_domain, get_template, list_volumes
 
+from marvin.codes import FAILED
+
 from nose.plugins.attrib import attr
 
 class TestData(object):
@@ -74,10 +76,12 @@ class TestDeployVM(cloudstackTestCase):
         self.hypervisor = self.testClient.getHypervisorInfo()
 
         # Get Zone, Domain and Default Built-in template
-        self.domain = get_domain(self.apiclient, self.testdata)
-        self.zone = get_zone(self.apiclient, self.testdata)
+        self.domain = get_domain(self.apiclient)
+        self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
         self.testdata["mode"] = self.zone.networktype
         self.template = get_template(self.apiclient, self.zone.id, self.testdata["ostype"])
+        if self.template == FAILED:
+            assert False, "get_template() failed to return template with description %s"
% self.services["ostype"]
 #       for testing with specific template
 #        self.template = get_template(self.apiclient, self.zone.id, self.testdata["ostype"],
templatetype='USER', services = {"template":'31f52a4d-5681-43f7-8651-ad4aaf823618'})
         

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/smoke/test_over_provisioning.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_over_provisioning.py b/test/integration/smoke/test_over_provisioning.py
index eac397d..45d803e 100644
--- a/test/integration/smoke/test_over_provisioning.py
+++ b/test/integration/smoke/test_over_provisioning.py
@@ -67,7 +67,7 @@ class TestUpdateOverProvision(cloudstackTestCase):
 
         self.poolId = pool.id
         """ list overprovisioning factor for storage pool """
-        factorOld = float(pool.overprovisionfactor)
+        factorOld = float(str(pool.overprovisionfactor))
         factorNew = str(factorOld + 1.0)
 
         """ update setting for the pool"""
@@ -85,7 +85,7 @@ class TestUpdateOverProvision(cloudstackTestCase):
                                 id = self.poolId
                                 )
         pool = storage_pools[0]
-        factorNew = float(pool.overprovisionfactor)
+        factorNew = float(str(pool.overprovisionfactor))
         self.assertNotEqual(int(factorNew), int(factorOld)," Check if overprovision factor
of storage pool has changed")
         self.assertEqual(int(factorNew), int(factorOld + 1.0)," Check if overprovision factor
of storage pool has increased by 1")
 
@@ -100,7 +100,7 @@ class TestUpdateOverProvision(cloudstackTestCase):
         pool = storage_pools[0]
         updateConfigurationCmd = updateConfiguration.updateConfigurationCmd()
         updateConfigurationCmd.name = "storage.overprovisioning.factor"
-        factorOld = float(pool.overprovisionfactor)
+        factorOld = float(str(pool.overprovisionfactor))
         factorNew = str(factorOld - 1.0)
         updateConfigurationCmd.value = factorNew
         updateConfigurationCmd.storageid = pool.id

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/test/integration/smoke/test_vm_iam.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_iam.py b/test/integration/smoke/test_vm_iam.py
index 51aa883..662c7df 100644
--- a/test/integration/smoke/test_vm_iam.py
+++ b/test/integration/smoke/test_vm_iam.py
@@ -23,6 +23,7 @@ from marvin.cloudstackAPI import *
 from marvin.lib.utils import *
 from marvin.lib.base import *
 from marvin.lib.common import *
+from marvin.codes import FAILED
 from nose.plugins.attrib import attr
 #Import System modules
 import time
@@ -103,7 +104,8 @@ class TestVMIam(cloudstackTestCase):
 
     @classmethod
     def setUpClass(self):
-        self.apiclient = super(TestVMIam, self).getClsTestClient().getApiClient()
+        testClient = super(TestVMIam, self).getClsTestClient()
+        self.apiclient = testClient.getApiClient()
         self.services = Services().services
         
         # backup default apikey and secretkey

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f866bb21/tools/marvin/marvin/config/test_data.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py
index 926d157..fb7e5fa 100644
--- a/tools/marvin/marvin/config/test_data.py
+++ b/tools/marvin/marvin/config/test_data.py
@@ -158,6 +158,10 @@ test_data = {
                 "type": "host anti-affinity",
             },
         },
+        "virtual_machine2" : {
+             "name" : "testvm2",
+             "displayname" : "Test VM2",
+        },
         "server_without_disk": {
             "displayname": "Test VM-No Disk",
             "username": "root",


Mime
View raw message