You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@apache.org on 2014/01/28 06:46:24 UTC

[2/2] git commit: updated refs/heads/marvin to 7305063

CLOUDSTACK-5925: get_*() functionality changed in marvin, changed BVT too.


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

Branch: refs/heads/marvin
Commit: 7305063fb4f508f4b97d7000c5e25068aa681a60
Parents: edfd2b6
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Tue Jan 28 11:12:24 2014 +0530
Committer: Girish Shilamkar <gi...@clogeny.com>
Committed: Tue Jan 28 11:12:24 2014 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_affinity_groups.py  | 36 ++++++----
 test/integration/smoke/test_deploy_vm.py        |  8 ++-
 .../smoke/test_deploy_vm_with_userdata.py       | 13 ++--
 ...deploy_vms_with_varied_deploymentplanners.py | 15 ++--
 test/integration/smoke/test_disk_offerings.py   | 16 ++---
 test/integration/smoke/test_guest_vlan_range.py | 11 +--
 test/integration/smoke/test_hosts.py            |  7 +-
 test/integration/smoke/test_internal_lb.py      | 13 ++--
 test/integration/smoke/test_iso.py              | 35 ++++-----
 test/integration/smoke/test_loadbalance.py      | 32 +++++----
 .../smoke/test_multipleips_per_nic.py           | 10 ++-
 test/integration/smoke/test_network.py          | 74 ++++++++++---------
 test/integration/smoke/test_network_acl.py      | 12 ++--
 test/integration/smoke/test_nic.py              | 12 ++--
 .../smoke/test_non_contigiousvlan.py            |  1 +
 .../integration/smoke/test_portable_publicip.py | 43 +++++------
 test/integration/smoke/test_primary_storage.py  |  5 +-
 test/integration/smoke/test_public_ip_range.py  | 13 ++--
 test/integration/smoke/test_regions.py          | 17 ++---
 .../smoke/test_reset_vm_on_reboot.py            | 26 ++++---
 test/integration/smoke/test_resource_detail.py  | 23 +++---
 test/integration/smoke/test_routers.py          | 26 ++++---
 test/integration/smoke/test_scale_vm.py         | 28 ++++----
 .../integration/smoke/test_secondary_storage.py |  4 +-
 .../integration/smoke/test_service_offerings.py | 34 +++++----
 test/integration/smoke/test_snapshots.py        | 24 ++++---
 test/integration/smoke/test_ssvm.py             |  3 +-
 test/integration/smoke/test_templates.py        | 75 +++++++++++---------
 test/integration/smoke/test_vm_life_cycle.py    | 49 +++++++------
 test/integration/smoke/test_vm_snapshots.py     | 20 +++---
 test/integration/smoke/test_volumes.py          | 63 ++++++++--------
 test/integration/smoke/test_vpc_vpn.py          | 23 +++---
 tools/marvin/marvin/integration/lib/common.py   | 12 ++--
 33 files changed, 446 insertions(+), 337 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_affinity_groups.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_affinity_groups.py b/test/integration/smoke/test_affinity_groups.py
index 346a4a4..5c0ff7d 100644
--- a/test/integration/smoke/test_affinity_groups.py
+++ b/test/integration/smoke/test_affinity_groups.py
@@ -16,6 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.integration.lib.utils import *
@@ -32,25 +33,30 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.test_client = super(TestDeployVmWithAffinityGroup, cls).getClsTestClient()
-        zone_name = cls.test_client.getZoneForTests() 
-        cls.api_client = cls.test_client.getApiClient()
-        cls.services = cls.test_client.getConfigParser().parsedDict
+        cls.testClient = super(TestDeployVmWithAffinityGroup, cls).getClsTestClient()
+        zone_name = cls.testClient.getZoneForTests()
+        cls.domain = get_domain(cls.apiclient) 
+        cls.apiclient = cls.testClient.getApiClient()
+        cls.services = cls.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.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+                            
         cls.template = get_template(
-            cls.api_client,
+            cls.apiclient,
             cls.zone.id,
             cls.services["ostype"]
         )
+        
+        if cls.template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+            
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
 
         cls.services["template"] = cls.template.id
         cls.services["zoneid"] = cls.zone.id
 
         cls.account = Account.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["account"],
             domainid=cls.domain.id
         )
@@ -58,11 +64,11 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
         cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["service_offerings"]
         )
 
-        cls.ag = AffinityGroup.create(cls.api_client, cls.services["virtual_machine"]["affinity"],
+        cls.ag = AffinityGroup.create(cls.apiclient, cls.services["virtual_machine"]["affinity"],
             account=cls.services["account"], domainid=cls.domain.id)
 
         cls._cleanup = [
@@ -82,7 +88,7 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
         """
         #deploy VM1 in affinity group created in setUp
         vm1 = VirtualMachine.create(
-            self.api_client,
+            self.apiclient,
             self.services["virtual_machine"],
             templateid=self.template.id,
             accountid=self.account.name,
@@ -92,7 +98,7 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
         )
 
         list_vm1 = list_virtual_machines(
-            self.api_client,
+            self.apiclient,
             id=vm1.id
         )
         self.assertEqual(
@@ -115,7 +121,7 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
 
         #deploy VM2 in affinity group created in setUp
         vm2 = VirtualMachine.create(
-            self.api_client,
+            self.apiclient,
             self.services["virtual_machine"],
             templateid=self.template.id,
             accountid=self.account.name,
@@ -124,7 +130,7 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
             affinitygroupnames=[self.ag.name]
         )
         list_vm2 = list_virtual_machines(
-            self.api_client,
+            self.apiclient,
             id=vm2.id
         )
         self.assertEqual(
@@ -153,6 +159,6 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
         def tearDownClass(cls):
             try:
                 #Clean up, terminate the created templates
-                cleanup_resources(cls.api_client, cls._cleanup)
+                cleanup_resources(cls.apiclient, cls._cleanup)
             except Exception as e:
                 raise Exception("Warning: Exception during cleanup : %s" % e)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_deploy_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vm.py b/test/integration/smoke/test_deploy_vm.py
index a09be35..e572c4d 100644
--- a/test/integration/smoke/test_deploy_vm.py
+++ b/test/integration/smoke/test_deploy_vm.py
@@ -16,6 +16,7 @@
 # under the License.
 
 #Test from the Marvin - Testing in Python wiki
+from marvin.cloudstackTestClient import getZoneForTests
 
 #All tests inherit from cloudstackTestCase
 from marvin.cloudstackTestCase import cloudstackTestCase
@@ -40,14 +41,17 @@ class TestDeployVM(cloudstackTestCase):
     def setUp(self):
         self.apiclient = self.testClient.getApiClient()
 
-        self.testdata = self.testClient.getConfigParser().parsedDict
+        self.testdata = self.testClient.getParsedTestDataConfig()
         
         # Get Zone, Domain and Default Built-in template
-        self.domain = get_domain(self.apiclient, self.testdata)
+        self.domain = get_domain(self.apiclient)
         self.zone = get_zone(self.apiclient, self.testdata)
         self.testdata["mode"] = self.zone.networktype
         self.template = get_template(self.apiclient, self.zone.id, self.testdata["ostype"])
 
+        if self.template == FAILED:
+            self.fail("get_template() failed to return template with description %s" % self.testdata["ostype"])
+
         #create a user account
         self.account = Account.create(
             self.apiclient,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_deploy_vm_with_userdata.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vm_with_userdata.py b/test/integration/smoke/test_deploy_vm_with_userdata.py
index 7bb72b3..d90db13 100644
--- a/test/integration/smoke/test_deploy_vm_with_userdata.py
+++ b/test/integration/smoke/test_deploy_vm_with_userdata.py
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import cloudstackTestCase
 from marvin.integration.lib.base import (ServiceOffering,
                                          VirtualMachine,
@@ -32,11 +33,11 @@ class TestDeployVmWithUserData(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestDeployVmWithUserData, cls).getClsTestClient()
-        cls.apiClient = cloudstackTestClient.getApiClient() 
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestDeployVmWithUserData, cls).getClsTestClient()
+        cls.apiClient = testClient.getApiClient() 
+        cls.services = testClient.getParsedTestDataConfig()
 
-        cls.zone = get_zone(cls.apiClient, cls.services)
+        cls.zone = get_zone(cls.apiClient, cls.getZoneForTests())
         if cls.zone.localstorageenabled:
             #For devcloud since localstroage is enabled
             cls.services["service_offerings"]["storagetype"] = "local"
@@ -51,6 +52,10 @@ class TestDeployVmWithUserData(cloudstackTestCase):
             cls.zone.id,
             cls.services["ostype"]
         )
+
+        if cls.template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+
         cls.debug("Successfully created account: %s, id: \
                    %s" % (cls.account.name,\
                           cls.account.id))

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
index 565228a..d1f6d3d 100644
--- a/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
+++ b/test/integration/smoke/test_deploy_vms_with_varied_deploymentplanners.py
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import cloudstackTestCase
 from marvin.integration.lib.base import Account, VirtualMachine, ServiceOffering, Host, Cluster
 from marvin.integration.lib.common import get_zone, get_domain, get_template
@@ -28,18 +29,22 @@ class TestDeployVmWithVariedPlanners(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestDeployVmWithVariedPlanners, cls).getClsTestClient()
-        cls.apiclient = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestDeployVmWithVariedPlanners, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
         # 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.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.template = get_template(
             cls.apiclient,
             cls.zone.id,
             cls.services["ostype"]
         )
+
+        if cls.template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["template"] = cls.template.id
         cls.services["zoneid"] = cls.zone.id

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_disk_offerings.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_disk_offerings.py b/test/integration/smoke/test_disk_offerings.py
index b104ca8..d2d3b4d 100644
--- a/test/integration/smoke/test_disk_offerings.py
+++ b/test/integration/smoke/test_disk_offerings.py
@@ -30,7 +30,7 @@ _multiprocess_shared_ = True
 class TestCreateDiskOffering(cloudstackTestCase):
 
     def setUp(self):
-        self.services = self.testClient.getConfigParser().parsedDict
+        self.services = self.testClient.getParsedTestDataConfig()
         self.apiclient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
         self.cleanup = []
@@ -109,16 +109,16 @@ class TestDiskOfferings(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestDiskOfferings, cls).getClsTestClient()
-        self.api_client = self.cloudstackTestClient.getApiClient()
-        self.services = self.cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestDiskOfferings, cls).getClsTestClient()
+        self.apiclient = self.testClient.getApiClient()
+        self.services = self.testClient.getParsedTestDataConfig()
         
         cls.disk_offering_1 = DiskOffering.create(
-                                                  cls.api_client,
+                                                  cls.apiclient,
                                                   cls.services["disk_offering"]
                                                   )
         cls.disk_offering_2 = DiskOffering.create(
-                                                  cls.api_client,
+                                                  cls.apiclient,
                                                   cls.services["disk_offering"]
                                                   )
         cls._cleanup = [cls.disk_offering_1]
@@ -127,8 +127,8 @@ class TestDiskOfferings(cloudstackTestCase):
     @classmethod
     def tearDownClass(cls):
         try:
-            cls.api_client = super(TestDiskOfferings, cls).getClsTestClient().getApiClient()
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cls.apiclient = super(TestDiskOfferings, cls).getClsTestClient().getApiClient()
+            cleanup_resources(cls.apiclient, cls._cleanup)
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_guest_vlan_range.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_guest_vlan_range.py b/test/integration/smoke/test_guest_vlan_range.py
index 4e2de50..e76f3d5 100644
--- a/test/integration/smoke/test_guest_vlan_range.py
+++ b/test/integration/smoke/test_guest_vlan_range.py
@@ -17,6 +17,7 @@
 """ P1 tests for Dedicating Guest Vlan Ranges
 """
 #Import Local Modules
+from marvin.cloudstackTestClient import getZoneForTests
 import marvin
 from nose.plugins.attrib import attr
 from marvin.cloudstackTestCase import *
@@ -30,13 +31,13 @@ class TestDedicateGuestVlanRange(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestDedicateGuestVlanRange, cls).getClsTestClient()
-        cls.apiclient = cloudstackTestClient.getApiClient() 
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestDedicateGuestVlanRange, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient() 
+        cls.services = testClient.getParsedTestDataConfig()
 
         # Get Zone, Domain
-        cls.domain = get_domain(cls.apiclient, cls.services)
-        cls.zone = get_zone(cls.apiclient, cls.services)
+        cls.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
 
         # Create Account
         cls.account = Account.create(

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_hosts.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_hosts.py b/test/integration/smoke/test_hosts.py
index 4c58b9b..7525bda 100644
--- a/test/integration/smoke/test_hosts.py
+++ b/test/integration/smoke/test_hosts.py
@@ -18,6 +18,7 @@
 """
 #Import Local Modules
 import marvin
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.integration.lib.utils import *
@@ -36,9 +37,9 @@ class TestHosts(cloudstackTestCase):
 
         self.apiclient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
-        self.services = self.testClient.getConfigParser().parsedDict
-        self.zone = get_zone(self.apiclient, self.services)
-        self.pod = get_pod(self.apiclient, self.zone.id, self.services)
+        self.services = self.testClient.getParsedTestDataConfig()
+        self.zone = get_zone(self.apiclient, self.getZoneForTests())
+        self.pod = get_pod(apilcient=self.apiclient, self.zone.id)
         self.cleanup = []
 
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_internal_lb.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_internal_lb.py b/test/integration/smoke/test_internal_lb.py
index d997ae0..e53e4ed 100644
--- a/test/integration/smoke/test_internal_lb.py
+++ b/test/integration/smoke/test_internal_lb.py
@@ -17,6 +17,7 @@
 """ Tests for configuring Internal Load Balancing Rules.
 """
 #Import Local Modules
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.integration.lib.utils import *
@@ -30,11 +31,11 @@ class TestInternalLb(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestInternalLb, cls).getClsTestClient()
-        cls.apiclient = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestInternalLb, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
-        cls.zone = get_zone(cls.apiclient, cls.services)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.domain = get_domain(cls.apiclient)
         cls.service_offering = ServiceOffering.create(
             cls.apiclient,
@@ -46,6 +47,10 @@ class TestInternalLb(cloudstackTestCase):
             cls.zone.id,
             cls.services["ostype"]
         )
+
+        if cls.template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+
         cls.debug("Successfully created account: %s, id: \
                    %s" % (cls.account.name,\
                           cls.account.id))

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_iso.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_iso.py b/test/integration/smoke/test_iso.py
index 50042ba..376a17c 100644
--- a/test/integration/smoke/test_iso.py
+++ b/test/integration/smoke/test_iso.py
@@ -18,6 +18,7 @@
 """
 #Import Local Modules
 import marvin
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.integration.lib.utils import *
@@ -34,12 +35,12 @@ _multiprocess_shared_ = True
 class TestCreateIso(cloudstackTestCase):
 
     def setUp(self):
-        self.services = self.testClient.getConfigParser().parsedDict
+        self.services = self.testClient.getParsedTestDataConfig()
         self.apiclient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
         # Get Zone, Domain and templates
-        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.getZoneForTests())
         self.services['mode'] = self.zone.networktype
         self.services["domainid"] = self.domain.id
         self.services["iso_2"]["zoneid"] = self.zone.id
@@ -138,13 +139,13 @@ class TestISO(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestISO, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestISO, 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.domain = get_domain(cls.apiclient, cls.getZoneForTests())
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         
         cls.services["domainid"] = cls.domain.id
         cls.services["iso_1"]["zoneid"] = cls.zone.id
@@ -152,20 +153,20 @@ class TestISO(cloudstackTestCase):
         cls.services["sourcezoneid"] = cls.zone.id
         #populate second zone id for iso copy
         cmd = listZones.listZonesCmd()
-        cls.zones = cls.api_client.listZones(cmd)
+        cls.zones = cls.apiclient.listZones(cmd)
         if not isinstance(cls.zones, list):
             raise Exception("Failed to find zones.")
 
         #Create an account, ISOs etc.
         cls.account = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
         cls.services["account"] = cls.account.name
         # Finding the OsTypeId from Ostype
         ostypes = list_os_types(
-                    cls.api_client,
+                    cls.apiclient,
                     description=cls.services["ostype"]
                     )
         if not isinstance(ostypes, list):
@@ -176,25 +177,25 @@ class TestISO(cloudstackTestCase):
         cls.services["ostypeid"] = ostypes[0].id
 
         cls.iso_1 = Iso.create(
-                               cls.api_client, 
+                               cls.apiclient, 
                                cls.services["iso_1"],
                                account=cls.account.name,
                                domainid=cls.account.domainid
                                )
         try:
-            cls.iso_1.download(cls.api_client)
+            cls.iso_1.download(cls.apiclient)
         except Exception as e:
             raise Exception("Exception while downloading ISO %s: %s"\
                       % (cls.iso_1.id, e))
             
         cls.iso_2 = Iso.create(
-                               cls.api_client, 
+                               cls.apiclient, 
                                cls.services["iso_2"],
                                account=cls.account.name,
                                domainid=cls.account.domainid
                                )
         try:
-            cls.iso_2.download(cls.api_client)
+            cls.iso_2.download(cls.apiclient)
         except Exception as e:
             raise Exception("Exception while downloading ISO %s: %s"\
                       % (cls.iso_2.id, e))
@@ -205,9 +206,9 @@ class TestISO(cloudstackTestCase):
     @classmethod
     def tearDownClass(cls):
         try:
-            cls.api_client = super(TestISO, cls).getClsTestClient().getApiClient()
+            cls.apiclient = super(TestISO, cls).getClsTestClient().getApiClient()
             #Clean up, terminate the created templates
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cleanup_resources(cls.apiclient, cls._cleanup)
 
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_loadbalance.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_loadbalance.py b/test/integration/smoke/test_loadbalance.py
index db8f46e..355dcc5 100644
--- a/test/integration/smoke/test_loadbalance.py
+++ b/test/integration/smoke/test_loadbalance.py
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.sshClient import SshClient
@@ -32,33 +33,36 @@ class TestLoadBalance(cloudstackTestCase):
     @classmethod
     def setUpClass(cls):
 
-        cloudstackTestClient = super(TestLoadBalance, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient() 
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestLoadBalance, 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.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         template = get_template(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.zone.id,
                             cls.services["ostype"]
                             )
+        if cls.template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+        
         cls.services["server"]["zoneid"] = cls.zone.id
 
         #Create an account, network, VM and IP addresses
         cls.account = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             admin=True,
                             domainid=cls.domain.id
                             )
         cls.service_offering = ServiceOffering.create(
-                                        cls.api_client,
+                                        cls.apiclient,
                                         cls.services["service_offerings"]
                                         )
         cls.vm_1 = VirtualMachine.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["server"],
                                     templateid=template.id,
                                     accountid=cls.account.name,
@@ -66,7 +70,7 @@ class TestLoadBalance(cloudstackTestCase):
                                     serviceofferingid=cls.service_offering.id
                                     )
         cls.vm_2 = VirtualMachine.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["server"],
                                     templateid=template.id,
                                     accountid=cls.account.name,
@@ -74,7 +78,7 @@ class TestLoadBalance(cloudstackTestCase):
                                     serviceofferingid=cls.service_offering.id
                                     )
         cls.vm_3 = VirtualMachine.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["server"],
                                     templateid=template.id,
                                     accountid=cls.account.name,
@@ -82,7 +86,7 @@ class TestLoadBalance(cloudstackTestCase):
                                     serviceofferingid=cls.service_offering.id
                                     )
         cls.non_src_nat_ip = PublicIPAddress.create(
-                                            cls.api_client,
+                                            cls.apiclient,
                                             cls.account.name,
                                             cls.zone.id,
                                             cls.account.domainid,
@@ -90,7 +94,7 @@ class TestLoadBalance(cloudstackTestCase):
                                             )
         # Open up firewall port for SSH
         cls.fw_rule = FireWallRule.create(
-                            cls.api_client,
+                            cls.apiclient,
                             ipaddressid=cls.non_src_nat_ip.ipaddress.id,
                             protocol=cls.services["lbrule"]["protocol"],
                             cidrlist=['0.0.0.0/0'],
@@ -113,7 +117,7 @@ class TestLoadBalance(cloudstackTestCase):
 
     @classmethod
     def tearDownClass(cls):
-        cleanup_resources(cls.api_client, cls._cleanup)
+        cleanup_resources(cls.apiclient, cls._cleanup)
         return
 
     def try_ssh(self, ip_addr, hostnames):

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_multipleips_per_nic.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_multipleips_per_nic.py b/test/integration/smoke/test_multipleips_per_nic.py
index 9e04b53..ad00dba 100644
--- a/test/integration/smoke/test_multipleips_per_nic.py
+++ b/test/integration/smoke/test_multipleips_per_nic.py
@@ -31,6 +31,7 @@ from marvin.integration.lib.utils import cleanup_resources
 #common - commonly used methods for all tests are listed here
 from marvin.integration.lib.common import get_zone, get_domain, get_template
 
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackAPI.addIpToNic import addIpToNicCmd
 from marvin.cloudstackAPI.removeIpFromNic import removeIpFromNicCmd
 from marvin.cloudstackAPI.listNics import listNicsCmd
@@ -43,15 +44,18 @@ class TestDeployVM(cloudstackTestCase):
     """
 
     def setUp(self):
-        self.testdata = self.testClient.getConfigParser().parsedDict
+        self.testdata = self.testClient.getParsedTestDataConfig()
         self.apiclient = self.testClient.getApiClient()
 
         # 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.getZoneForTests())
         self.testdata["mode"] = self.zone.networktype
         self.template = get_template(self.apiclient, self.zone.id, self.testdata["ostype"])
 
+        if self.template == FAILED:
+            self.fail("get_template() failed to return template with description %s" % self.testdata["ostype"])
+
         #create a user account
         self.account = Account.create(
             self.apiclient,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_network.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py
index f0cdcfd..04a2bd3 100644
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@ -18,6 +18,7 @@
 """
 #Import Local Modules
 import marvin
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackException import cloudstackAPIException
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
@@ -40,45 +41,45 @@ class TestPublicIP(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestPublicIP, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestPublicIP, 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.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.services['mode'] = cls.zone.networktype
         # Create Accounts & networks
         cls.account = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             admin=True,
                             domainid=cls.domain.id
                             )
 
         cls.user = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
         cls.services["network"]["zoneid"] = cls.zone.id
 
         cls.network_offering = NetworkOffering.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["network_offering"],
                                     )
         # Enable Network offering
-        cls.network_offering.update(cls.api_client, state='Enabled')
+        cls.network_offering.update(cls.apiclient, state='Enabled')
 
         cls.services["network"]["networkoffering"] = cls.network_offering.id
         cls.account_network = Network.create(
-                                             cls.api_client,
+                                             cls.apiclient,
                                              cls.services["network"],
                                              cls.account.name,
                                              cls.account.domainid
                                              )
         cls.user_network = Network.create(
-                                             cls.api_client,
+                                             cls.apiclient,
                                              cls.services["network"],
                                              cls.user.name,
                                              cls.user.domainid
@@ -86,13 +87,13 @@ class TestPublicIP(cloudstackTestCase):
 
         # Create Source NAT IP addresses
         account_src_nat_ip = PublicIPAddress.create(
-                                            cls.api_client,
+                                            cls.apiclient,
                                             cls.account.name,
                                             cls.zone.id,
                                             cls.account.domainid
                                             )
         user_src_nat_ip = PublicIPAddress.create(
-                                            cls.api_client,
+                                            cls.apiclient,
                                             cls.user.name,
                                             cls.zone.id,
                                             cls.user.domainid
@@ -110,7 +111,7 @@ class TestPublicIP(cloudstackTestCase):
     def tearDownClass(cls):
         try:
             #Cleanup resources used
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cleanup_resources(cls.apiclient, cls._cleanup)
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -221,32 +222,35 @@ class TestPortForwarding(cloudstackTestCase):
     @classmethod
     def setUpClass(cls):
 
-        cloudstackTestClient = super(TestPortForwarding, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestPortForwarding, 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.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         template = get_template(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.zone.id,
                             cls.services["ostype"]
                             )
+        if template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+
         #Create an account, network, VM and IP addresses
         cls.account = Account.create(
-                                cls.api_client,
+                                cls.apiclient,
                                 cls.services["account"],
                                 admin=True,
                                 domainid=cls.domain.id
                                 )
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.service_offering = ServiceOffering.create(
-                                cls.api_client,
+                                cls.apiclient,
                                 cls.services["service_offerings"]
                                 )
         cls.virtual_machine = VirtualMachine.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["virtual_machine"],
                                     templateid=template.id,
                                     accountid=cls.account.name,
@@ -267,8 +271,8 @@ class TestPortForwarding(cloudstackTestCase):
     @classmethod
     def tearDownClass(cls):
         try:
-            cls.api_client = super(TestPortForwarding, cls).getClsTestClient().getApiClient()
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cls.apiclient = super(TestPortForwarding, cls).getClsTestClient().getApiClient()
+            cleanup_resources(cls.apiclient, cls._cleanup)
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
 
@@ -525,16 +529,18 @@ class TestRebootRouter(cloudstackTestCase):
     def setUp(self):
 
         self.apiclient = self.testClient.getApiClient()
-        self.services = self.testClient.cloudstackTestClient.getConfigParser().parsedDict
+        self.services = self.testClient.testClient.getParsedTestDataConfig()
 
         # Get Zone, Domain and templates
-        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.getZoneForTests())
         template = get_template(
                             self.apiclient,
                             self.zone.id,
                             self.services["ostype"]
                             )
+        if template == FAILED:
+            self.fail("get_template() failed to return template with description %s" % self.services["ostype"])
         self.services["virtual_machine"]["zoneid"] = self.zone.id
 
         #Create an account, network, VM and IP addresses
@@ -691,11 +697,11 @@ class TestReleaseIP(cloudstackTestCase):
 
     def setUp(self):
         self.apiclient = self.testClient.getApiClient()
-        self.services = self.testClient.getConfigParser().parsedDict
+        self.services = self.testClient.getParsedTestDataConfig()
 
         # Get Zone, Domain and templates
-        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.getZoneForTests())
         template = get_template(
                             self.apiclient,
                             self.zone.id,
@@ -828,11 +834,11 @@ class TestDeleteAccount(cloudstackTestCase):
     def setUp(self):
 
         self.apiclient = self.testClient.getApiClient()
-        self.services = self.testClient.getConfigParser().parsedDict
+        self.services = self.testClient.getParsedTestDataConfig()
 
         # Get Zone, Domain and templates
-        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.getZoneForTests())
         template = get_template(
                             self.apiclient,
                             self.zone.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_network_acl.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network_acl.py b/test/integration/smoke/test_network_acl.py
index 9e8df15..ce6d78b 100644
--- a/test/integration/smoke/test_network_acl.py
+++ b/test/integration/smoke/test_network_acl.py
@@ -28,11 +28,11 @@ class TestNetworkACL(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestNetworkACL, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestNetworkACL, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
-        cls.zone = get_zone(cls.apiclient, cls.services)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.domain = get_domain(cls.apiclient)
         cls.service_offering = ServiceOffering.create(
             cls.apiclient,
@@ -44,6 +44,10 @@ class TestNetworkACL(cloudstackTestCase):
             cls.zone.id,
             cls.services["ostype"]
         )
+        
+        if cls.template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+
         cls.debug("Successfully created account: %s, id: \
                    %s" % (cls.account.name,\
                           cls.account.id))

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_nic.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_nic.py b/test/integration/smoke/test_nic.py
index 0f87de1..668e91f 100644
--- a/test/integration/smoke/test_nic.py
+++ b/test/integration/smoke/test_nic.py
@@ -16,6 +16,7 @@
 # under the License.
 """ NIC tests for VM """
 import marvin
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.sshClient import SshClient
@@ -44,11 +45,11 @@ class TestNic(cloudstackTestCase):
         try:
             self.apiclient = self.testClient.getApiClient()
             self.dbclient  = self.testClient.getDbConnection()
-            self.services  = self.testClient.getConfigParser().parsedDict
+            self.services  = self.testClient.getParsedTestDataConfig()
 
             # Get Zone, Domain and templates
-            domain = get_domain(self.apiclient, self.services)
-            zone = get_zone(self.apiclient, self.services)
+            domain = get_domain(self.apiclient)
+            zone = get_zone(self.apiclient, self.getZoneForTests())
             self.services['mode'] = zone.networktype
 
             if zone.networktype != 'Advanced':
@@ -64,7 +65,10 @@ class TestNic(cloudstackTestCase):
                                 zone.id,
                                 self.services["ostype"]
                                 )
-            # Set Zones and disk offerings
+            if self.template == FAILED:
+                self.fail("get_template() failed to return template with description %s" % self.services["ostype"])
+
+              # Set Zones and disk offerings
             self.services["small"]["zoneid"] = zone.id
             self.services["small"]["template"] = template.id
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_non_contigiousvlan.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_non_contigiousvlan.py b/test/integration/smoke/test_non_contigiousvlan.py
index f1736ae..efa4825 100644
--- a/test/integration/smoke/test_non_contigiousvlan.py
+++ b/test/integration/smoke/test_non_contigiousvlan.py
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin import cloudstackTestCase
 from marvin.cloudstackAPI import *
 from marvin.cloudstackTestCase import cloudstackTestCase

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_portable_publicip.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_portable_publicip.py b/test/integration/smoke/test_portable_publicip.py
index 7eda7da..d75ae09 100644
--- a/test/integration/smoke/test_portable_publicip.py
+++ b/test/integration/smoke/test_portable_publicip.py
@@ -16,6 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.integration.lib.utils import *
@@ -33,17 +34,17 @@ class TestPortablePublicIPRange(cloudstackTestCase):
     """
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestPortablePublicIPRange, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestPortablePublicIPRange, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
         # Get Zone, Domain
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
 
         # Create Account
         cls.account = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
@@ -56,7 +57,7 @@ class TestPortablePublicIPRange(cloudstackTestCase):
     def tearDownClass(cls):
         try:
             # Cleanup resources used
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cleanup_resources(cls.apiclient, cls._cleanup)
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -81,7 +82,7 @@ class TestPortablePublicIPRange(cloudstackTestCase):
         """
         self.debug("attempting to create a portable Public IP range")
         self.portable_ip_range = PortablePublicIpRange.create(
-                                    self.api_client,
+                                    self.apiclient,
                                     self.services
                                )
         self.debug("attempting to verify portable Public IP range is created")
@@ -101,31 +102,31 @@ class TestPortablePublicIPAcquire(cloudstackTestCase):
     """
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestPortablePublicIPAcquire, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestPortablePublicIPAcquire, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
         # Get Zone, Domain
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         # Create Account
         cls.account = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
         cls.services["network"]["zoneid"] = cls.zone.id
 
         cls.network_offering = NetworkOffering.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["network_offering"],
                                     )
         # Enable Network offering
-        cls.network_offering.update(cls.api_client, state='Enabled')
+        cls.network_offering.update(cls.apiclient, state='Enabled')
 
         cls.services["network"]["networkoffering"] = cls.network_offering.id
         cls.account_network = Network.create(
-                                             cls.api_client,
+                                             cls.apiclient,
                                              cls.services["network"],
                                              cls.account.name,
                                              cls.account.domainid
@@ -142,7 +143,7 @@ class TestPortablePublicIPAcquire(cloudstackTestCase):
     def tearDownClass(cls):
         try:
             # Cleanup resources used
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cleanup_resources(cls.apiclient, cls._cleanup)
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -167,13 +168,13 @@ class TestPortablePublicIPAcquire(cloudstackTestCase):
         """
         self.debug("attempting to create a portable Public IP range")
         self.portable_ip_range = PortablePublicIpRange.create(
-                                    self.api_client,
+                                    self.apiclient,
                                     self.services
                                     )
 
-        ip_address = PublicIPAddress.create(self.api_client, self.account.name,
+        ip_address = PublicIPAddress.create(self.apiclient, self.account.name,
                             self.zone.id, self.account.domainid, isportable=True)
 
-        ip_address.delete(self.api_client)
+        ip_address.delete(self.apiclient)
         self.portable_ip_range.delete(self.apiclient)
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_primary_storage.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_primary_storage.py b/test/integration/smoke/test_primary_storage.py
index a142a27..e06d90e 100644
--- a/test/integration/smoke/test_primary_storage.py
+++ b/test/integration/smoke/test_primary_storage.py
@@ -18,6 +18,7 @@
 """
 #Import Local Modules
 import marvin
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.integration.lib.utils import *
@@ -34,10 +35,10 @@ class TestPrimaryStorageServices(cloudstackTestCase):
     def setUp(self):
 
         self.apiclient = self.testClient.getApiClient()
-        self.services = self.testClient.getConfigParser().parsedDict
+        self.services = self.testClient.getParsedTestDataConfig()
         self.cleanup = []
         # Get Zone and pod
-        self.zone = get_zone(self.apiclient, self.services)
+        self.zone = get_zone(self.apiclient, self.getZoneForTests())
         self.pod = get_pod(self.apiclient, self.zone.id)
 
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_public_ip_range.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_public_ip_range.py b/test/integration/smoke/test_public_ip_range.py
index f2cb2df..5e51de3 100644
--- a/test/integration/smoke/test_public_ip_range.py
+++ b/test/integration/smoke/test_public_ip_range.py
@@ -17,6 +17,7 @@
 """ P1 tests for Dedicating Public IP addresses
 """
 #Import Local Modules
+from marvin.cloudstackTestClient import getZoneForTests
 import marvin
 from nose.plugins.attrib import attr
 from marvin.cloudstackTestCase import *
@@ -30,15 +31,15 @@ class TestDedicatePublicIPRange(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(TestDedicatePublicIPRange, cls).getClsTestClient().getApiClient()
+        cls.apiclient = super(TestDedicatePublicIPRange, cls).getClsTestClient().getApiClient()
         cls.services = Services().services
         # Get Zone, Domain
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
 
         # Create Account
         cls.account = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
@@ -51,7 +52,7 @@ class TestDedicatePublicIPRange(cloudstackTestCase):
     def tearDownClass(cls):
         try:
             # Cleanup resources used
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cleanup_resources(cls.apiclient, cls._cleanup)
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -86,7 +87,7 @@ class TestDedicatePublicIPRange(cloudstackTestCase):
 
         self.debug("Creating Public IP range")
         self.public_ip_range = PublicIpRange.create(
-                                    self.api_client,
+                                    self.apiclient,
                                     self.services
                                )
         list_public_ip_range_response = PublicIpRange.list(

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_regions.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_regions.py b/test/integration/smoke/test_regions.py
index 288c3e6..fec96f0 100644
--- a/test/integration/smoke/test_regions.py
+++ b/test/integration/smoke/test_regions.py
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.integration.lib.utils import *
@@ -28,22 +29,22 @@ class TestRegions(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestRegions, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestRegions, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
-        cls.domain = get_domain(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.apiclient)
         cls.cleanup = []
 
     @attr(tags=["simulator", "basic", "advanced"])
     def test_createRegion(self):
         """ Test for create region
         """
-        region = Region.create(self.api_client,
+        region = Region.create(self.apiclient,
             self.services["region"]
         )
 
-        list_region = Region.list(self.api_client,
+        list_region = Region.list(self.apiclient,
             id=self.services["region"]["regionid"]
         )
 
@@ -77,8 +78,8 @@ class TestRegions(cloudstackTestCase):
     def tearDownClass(cls):
         try:
             #Clean up
-            cleanup_resources(cls.api_client, cls.cleanup)
-            list_region = Region.list(cls.api_client, id=cls.services["region"]["regionid"])
+            cleanup_resources(cls.apiclient, cls.cleanup)
+            list_region = Region.list(cls.apiclient, id=cls.services["region"]["regionid"])
             assert list_region is None, "Region deletion fails"
         except Exception as e:
             raise Exception("Warning: Region cleanup/delete fails with : %s" % e)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_reset_vm_on_reboot.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_reset_vm_on_reboot.py b/test/integration/smoke/test_reset_vm_on_reboot.py
index 61e5178..f5ba0b8 100644
--- a/test/integration/smoke/test_reset_vm_on_reboot.py
+++ b/test/integration/smoke/test_reset_vm_on_reboot.py
@@ -18,6 +18,7 @@
 """
 #Import Local Modules
 import marvin
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.integration.lib.utils import *
@@ -30,40 +31,43 @@ _multiprocess_shared_ = True
 class TestResetVmOnReboot(cloudstackTestCase):
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestResetVmOnReboot, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict        
+        testClient = super(TestResetVmOnReboot, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()        
 
         # Get Zone, Domain and templates
-        domain = get_domain(cls.api_client, cls.services)
-        zone = get_zone(cls.api_client, cls.services)
+        domain = get_domain(cls.apiclient)
+        zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.services['mode'] = zone.networktype
 
         template = get_template(
-            cls.api_client,
+            cls.apiclient,
             zone.id,
             cls.services["ostype"]
         )
+        if template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+
         # Set Zones and disk offerings ??
         cls.services["small"]["zoneid"] = zone.id
         cls.services["small"]["template"] = template.id
 
         # Create account, service offerings, vm.
         cls.account = Account.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["account"],
             domainid=domain.id
         )
 
         cls.small_offering = ServiceOffering.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["service_offerings"]["small"],
             isvolatile="true"
         )
 
         #create a virtual machine
         cls.virtual_machine = VirtualMachine.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["small"],
             accountid=cls.account.name,
             domainid=cls.account.domainid,
@@ -77,8 +81,8 @@ class TestResetVmOnReboot(cloudstackTestCase):
 
     @classmethod
     def tearDownClass(cls):
-        cls.api_client = super(TestResetVmOnReboot, cls).getClsTestClient().getApiClient()
-        cleanup_resources(cls.api_client, cls._cleanup)
+        cls.apiclient = super(TestResetVmOnReboot, cls).getClsTestClient().getApiClient()
+        cleanup_resources(cls.apiclient, cls._cleanup)
         return
 
     def setUp(self):

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_resource_detail.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_resource_detail.py b/test/integration/smoke/test_resource_detail.py
index 054ee42..1ec571e 100644
--- a/test/integration/smoke/test_resource_detail.py
+++ b/test/integration/smoke/test_resource_detail.py
@@ -18,6 +18,7 @@
 """
 #Import Local Modules
 import marvin
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.sshClient import SshClient
@@ -34,33 +35,33 @@ class TestResourceDetail(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestResourceDetail, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestResourceDetail, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
         # Get Zone, Domain and templates
-        domain = get_domain(cls.api_client, cls.services)
-        zone = get_zone(cls.api_client, cls.services)
+        domain = get_domain(cls.apiclient)
+        zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.services['mode'] = zone.networktype
 
         # Set Zones and disk offerings ??
 
         # Create account, service offerings, vm.
         cls.account = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             domainid=domain.id
                             )
 
  
         cls.disk_offering = DiskOffering.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["disk_offering"]
                                     )
 
         #create a volume
         cls.volume = Volume.create(
-                                   cls.api_client,
+                                   cls.apiclient,
                                    { "diskname" : "ndm"},
                                    zoneid=zone.id,
                                    account=cls.account.name,
@@ -75,8 +76,8 @@ class TestResourceDetail(cloudstackTestCase):
 
     @classmethod
     def tearDownClass(cls):
-        cls.api_client = super(TestResourceDetail, cls).getClsTestClient().getApiClient()
-        cleanup_resources(cls.api_client, cls._cleanup)
+        cls.apiclient = super(TestResourceDetail, cls).getClsTestClient().getApiClient()
+        cleanup_resources(cls.apiclient, cls._cleanup)
         return
 
     def setUp(self):
@@ -108,7 +109,7 @@ class TestResourceDetail(cloudstackTestCase):
         listResourceDetailCmd = listResourceDetails.listResourceDetailsCmd()
         listResourceDetailCmd.resourceid = self.volume.id
         listResourceDetailCmd.resourcetype = "Volume"
-        listResourceDetailResponse = self.api_client.listResourceDetails(listResourceDetailCmd)
+        listResourceDetailResponse = self.apiclient.listResourceDetails(listResourceDetailCmd)
 
         self.assertEqual(listResourceDetailResponse, None, "Check if the list API \
                             returns an empty response")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py
index 3f1ea92..d200bf6 100644
--- a/test/integration/smoke/test_routers.py
+++ b/test/integration/smoke/test_routers.py
@@ -18,6 +18,7 @@
 """
 #Import Local Modules
 import marvin
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.sshClient import SshClient
@@ -36,33 +37,36 @@ class TestRouterServices(cloudstackTestCase):
     @classmethod
     def setUpClass(cls):
 
-        cloudstackTestClient = super(TestRouterServices, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestRouterServices, 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.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.services['mode'] = cls.zone.networktype
         template = get_template(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.zone.id,
                             cls.services["ostype"]
                             )
+        if template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
 
         #Create an account, network, VM and IP addresses
         cls.account = Account.create(
-                                     cls.api_client,
+                                     cls.apiclient,
                                      cls.services["account"],
                                      domainid=cls.domain.id
                                      )
         cls.service_offering = ServiceOffering.create(
-                                            cls.api_client,
+                                            cls.apiclient,
                                             cls.services["service_offerings"]
                                             )
         cls.vm_1 = VirtualMachine.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["virtual_machine"],
                                     templateid=template.id,
                                     accountid=cls.account.name,
@@ -78,12 +82,12 @@ class TestRouterServices(cloudstackTestCase):
     @classmethod
     def tearDownClass(cls):
         try:
-            cls.api_client = super(
+            cls.apiclient = super(
                                    TestRouterServices,
                                    cls
                                    ).getClsTestClient().getApiClient()
             #Clean up, terminate the created templates
-            cleanup_resources(cls.api_client, cls.cleanup)
+            cleanup_resources(cls.apiclient, cls.cleanup)
 
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_scale_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_scale_vm.py b/test/integration/smoke/test_scale_vm.py
index d7138bf..cc1c83c 100644
--- a/test/integration/smoke/test_scale_vm.py
+++ b/test/integration/smoke/test_scale_vm.py
@@ -18,6 +18,7 @@
 """
 #Import Local Modules
 import marvin
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.integration.lib.utils import *
@@ -30,44 +31,47 @@ _multiprocess_shared_ = True
 class TestScaleVm(cloudstackTestCase):
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestScaleVm, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestScaleVm, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
         # Get Zone, Domain and templates
-        domain = get_domain(cls.api_client, cls.services)
-        zone = get_zone(cls.api_client, cls.services)
+        domain = get_domain(cls.apiclient)
+        zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.services['mode'] = zone.networktype
 
         template = get_template(
-            cls.api_client,
+            cls.apiclient,
             zone.id,
             cls.services["ostype"]
         )
+        if template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+
         # Set Zones and disk offerings ??
         cls.services["small"]["zoneid"] = zone.id
         cls.services["small"]["template"] = template.id
 
         # Create account, service offerings, vm.
         cls.account = Account.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["account"],
             domainid=domain.id
         )
 
         cls.small_offering = ServiceOffering.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["service_offerings"]["small"]
         )
 
         cls.big_offering = ServiceOffering.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["service_offerings"]["big"]
         )
 
         #create a virtual machine
         cls.virtual_machine = VirtualMachine.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["small"],
             accountid=cls.account.name,
             domainid=cls.account.domainid,
@@ -81,8 +85,8 @@ class TestScaleVm(cloudstackTestCase):
 
     @classmethod
     def tearDownClass(cls):
-        cls.api_client = super(TestScaleVm, cls).getClsTestClient().getApiClient()
-        cleanup_resources(cls.api_client, cls._cleanup)
+        cls.apiclient = super(TestScaleVm, cls).getClsTestClient().getApiClient()
+        cleanup_resources(cls.apiclient, cls._cleanup)
         return
 
     def setUp(self):

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_secondary_storage.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_secondary_storage.py b/test/integration/smoke/test_secondary_storage.py
index ff9692f..423f858 100644
--- a/test/integration/smoke/test_secondary_storage.py
+++ b/test/integration/smoke/test_secondary_storage.py
@@ -33,7 +33,7 @@ class TestSecStorageServices(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.api_client = super(TestSecStorageServices, cls).getClsTestClient().getApiClient()
+        cls.apiclient = super(TestSecStorageServices, cls).getClsTestClient().getApiClient()
         cls._cleanup = []
         return
 
@@ -41,7 +41,7 @@ class TestSecStorageServices(cloudstackTestCase):
     def tearDownClass(cls):
         try:
             #Cleanup resources used
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cleanup_resources(cls.apiclient, cls._cleanup)
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_service_offerings.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_service_offerings.py b/test/integration/smoke/test_service_offerings.py
index 095bbfd..be14d15 100644
--- a/test/integration/smoke/test_service_offerings.py
+++ b/test/integration/smoke/test_service_offerings.py
@@ -17,6 +17,7 @@
 """ BVT tests for Service offerings"""
 
 #Import Local Modules
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackTestCase import cloudstackTestCase
 from marvin.cloudstackAPI import changeServiceForVirtualMachine,updateServiceOffering
 from marvin.integration.lib.utils import (isAlmostEqual,
@@ -41,7 +42,7 @@ class TestCreateServiceOffering(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
         self.cleanup = []
-        self.services = self.testClient.getConfigParser().parsedDict
+        self.services = self.testClient.getParsedTestDataConfig()
 
     def tearDown(self):
         try:
@@ -132,27 +133,30 @@ class TestServiceOfferings(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestServiceOfferings, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestServiceOfferings, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.services = testClient.getParsedTestDataConfig()
 
-        domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
+        domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.services['mode'] = cls.zone.networktype
 
         cls.service_offering_1 = ServiceOffering.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["service_offerings"]
         )
         cls.service_offering_2 = ServiceOffering.create(
-            cls.api_client,
+            cls.apiclient,
             cls.services["service_offerings"]
         )
         template = get_template(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.zone.id,
                             cls.services["ostype"]
                             )
+        if template == FAILED:
+            cls.fail("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
@@ -162,22 +166,22 @@ class TestServiceOfferings(cloudstackTestCase):
 
         # Create VMs, NAT Rules etc
         cls.account = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             domainid=domain.id
                             )
 
         cls.small_offering = ServiceOffering.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["service_offerings"]["small"]
                                     )
 
         cls.medium_offering = ServiceOffering.create(
-                                    cls.api_client,
+                                    cls.apiclient,
                                     cls.services["service_offerings"]["medium"]
                                     )
         cls.medium_virtual_machine = VirtualMachine.create(
-                                       cls.api_client,
+                                       cls.apiclient,
                                        cls.services["medium"],
                                        accountid=cls.account.name,
                                        domainid=cls.account.domainid,
@@ -194,9 +198,9 @@ class TestServiceOfferings(cloudstackTestCase):
     @classmethod
     def tearDownClass(cls):
         try:
-            cls.api_client = super(TestServiceOfferings, cls).getClsTestClient().getApiClient()
+            cls.apiclient = super(TestServiceOfferings, cls).getClsTestClient().getApiClient()
             #Clean up, terminate the created templates
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cleanup_resources(cls.apiclient, cls._cleanup)
 
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py
index 1d711db..f4dbc83 100644
--- a/test/integration/smoke/test_snapshots.py
+++ b/test/integration/smoke/test_snapshots.py
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from marvin.cloudstackTestClient import getZoneForTests
 from nose.plugins.attrib import attr
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
@@ -26,20 +27,23 @@ class TestSnapshotRootDisk(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cloudstackTestClient = super(TestSnapshotRootDisk, cls).getClsTestClient()
-        cls.api_client = cloudstackTestClient.getApiClient()
-        cls.services = cloudstackTestClient.getConfigParser().parsedDict
+        testClient = super(TestSnapshotRootDisk, 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.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient, cls.getZoneForTests())
         cls.services['mode'] = cls.zone.networktype
 
         template = get_template(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.zone.id,
                             cls.services["ostype"]
                             )
+        if template == FAILED:
+            cls.fail("get_template() failed to return template with description %s" % cls.services["ostype"])
+
         cls.services["domainid"] = cls.domain.id
         cls.services["server_without_disk"]["zoneid"] = cls.zone.id
         cls.services["templates"]["ostypeid"] = template.ostypeid
@@ -47,7 +51,7 @@ class TestSnapshotRootDisk(cloudstackTestCase):
 
         # Create VMs, NAT Rules etc
         cls.account = Account.create(
-                            cls.api_client,
+                            cls.apiclient,
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
@@ -55,12 +59,12 @@ class TestSnapshotRootDisk(cloudstackTestCase):
         cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
-                                            cls.api_client,
+                                            cls.apiclient,
                                             cls.services["service_offerings"]
                                             )
         cls.virtual_machine = cls.virtual_machine_with_disk = \
                     VirtualMachine.create(
-                                cls.api_client,
+                                cls.apiclient,
                                 cls.services["server_without_disk"],
                                 templateid=template.id,
                                 accountid=cls.account.name,
@@ -78,7 +82,7 @@ class TestSnapshotRootDisk(cloudstackTestCase):
     def tearDownClass(cls):
         try:
             #Cleanup resources used
-            cleanup_resources(cls.api_client, cls._cleanup)
+            cleanup_resources(cls.apiclient, cls._cleanup)
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7305063f/test/integration/smoke/test_ssvm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_ssvm.py b/test/integration/smoke/test_ssvm.py
index c056746..b94e709 100644
--- a/test/integration/smoke/test_ssvm.py
+++ b/test/integration/smoke/test_ssvm.py
@@ -19,6 +19,7 @@
 #Import Local Modules
 import marvin
 from marvin.cloudstackTestCase import *
+from marvin.cloudstackTestClient import getZoneForTests
 from marvin.cloudstackAPI import *
 from marvin.sshClient import SshClient
 from marvin.integration.lib.utils import *
@@ -38,7 +39,7 @@ class TestSSVMs(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
         self.cleanup = []
         self.services = Services().services
-        self.zone = get_zone(self.apiclient, self.services)
+        self.zone = get_zone(self.apiclient, self.getZoneForTests())
         return
 
     def tearDown(self):