cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject [18/31] git commit: updated refs/heads/planner_reserve to db4f335
Date Thu, 16 May 2013 19:23:18 GMT
multiple fixes to regression tests

- remove references to account.account
- remove ostypeid references
- correct zone.networktype
- correct storage_motion assert. skip on invalid environmetn

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


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

Branch: refs/heads/planner_reserve
Commit: a37fa39fe75925716c2b9998d40d4e95e78bbcdd
Parents: 5511eb2
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Wed May 15 16:45:56 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Thu May 16 10:00:44 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_accounts.py        |   71 ++++----
 test/integration/component/test_resource_limits.py |  154 +++++++-------
 test/integration/component/test_storage_motion.py  |    6 +
 .../integration/component/test_vm_passwdenabled.py |    2 +-
 4 files changed, 119 insertions(+), 114 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a37fa39f/test/integration/component/test_accounts.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py
index 9cbefe5..b2038a9 100644
--- a/test/integration/component/test_accounts.py
+++ b/test/integration/component/test_accounts.py
@@ -78,7 +78,6 @@ class Services:
                          "template": {
                                 "displaytext": "Public Template",
                                 "name": "Public template",
-                                "ostypeid": 'bc66ada0-99e7-483b-befc-8fb0c2129b70',
                                 "url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2",
                                 "hypervisor": 'XenServer',
                                 "format": 'VHD',
@@ -243,7 +242,7 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,
-                            cls.services["ostypeid"]
+                            cls.services["ostype"]
                             )
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.services["virtual_machine"]["template"] = cls.template.id
@@ -568,7 +567,7 @@ class TestNonRootAdminsPrivileges(cloudstackTestCase):
                             self.apiclient,
                             self.services["account"]
                             )
-        self.debug("Created account: %s" % account_2.account.name)
+        self.debug("Created account: %s" % account_2.name)
         self.cleanup.append(account_2)
 
         accounts_response = list_accounts(
@@ -886,7 +885,7 @@ class TesttemplateHierarchy(cloudstackTestCase):
         cls.template = Template.register(
                                             cls.api_client,
                                             cls.services["template"],
-                                            account=cls.account_1.account.name,
+                                            account=cls.account_1.name,
                                             domainid=cls.domain_1.id
                                         )
         cls._cleanup = [
@@ -935,7 +934,7 @@ class TesttemplateHierarchy(cloudstackTestCase):
         templates = list_templates(
                                     self.apiclient,
                                     templatefilter='self',
-                                    account=self.account_1.account.name,
+                                    account=self.account_1.name,
                                     domainid=self.domain_1.id
                                 )
         self.assertEqual(
@@ -960,7 +959,7 @@ class TesttemplateHierarchy(cloudstackTestCase):
         templates = list_templates(
                                     self.apiclient,
                                     templatefilter='self',
-                                    account=self.account_2.account.name,
+                                    account=self.account_2.name,
                                     domainid=self.domain_2.id
                                 )
         self.assertEqual(
@@ -1033,15 +1032,15 @@ class TestAddVmToSubDomain(cloudstackTestCase):
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,
-                            cls.services["ostypeid"]
+                            cls.services["ostype"]
                             )
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls.vm_1 = VirtualMachine.create(
                                     cls.api_client,
                                     cls.services["virtual_machine"],
                                     templateid=cls.template.id,
-                                    accountid=cls.account_1.account.name,
-                                    domainid=cls.account_1.account.domainid,
+                                    accountid=cls.account_1.name,
+                                    domainid=cls.account_1.domainid,
                                     serviceofferingid=cls.service_offering.id
                                     )
 
@@ -1049,8 +1048,8 @@ class TestAddVmToSubDomain(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["virtual_machine"],
                                     templateid=cls.template.id,
-                                    accountid=cls.account_2.account.name,
-                                    domainid=cls.account_2.account.domainid,
+                                    accountid=cls.account_2.name,
+                                    domainid=cls.account_2.domainid,
                                     serviceofferingid=cls.service_offering.id
                                     )
         cls._cleanup = [
@@ -1625,7 +1624,7 @@ class TestDomainForceRemove(cloudstackTestCase):
         cls.template = get_template(
                             cls.api_client,
                             cls.zone.id,
-                            cls.services["ostypeid"]
+                            cls.services["ostype"]
                             )
 
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
@@ -1719,31 +1718,31 @@ class TestDomainForceRemove(cloudstackTestCase):
                                     )
 
         self.debug("Deploying virtual machine in account 1: %s" %
-                                                self.account_1.account.name)
+                                                self.account_1.name)
         vm_1 = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
                                     templateid=self.template.id,
-                                    accountid=self.account_1.account.name,
-                                    domainid=self.account_1.account.domainid,
+                                    accountid=self.account_1.name,
+                                    domainid=self.account_1.domainid,
                                     serviceofferingid=self.service_offering.id
                                     )
 
         self.debug("Deploying virtual machine in account 2: %s" %
-                                                self.account_2.account.name)
+                                                self.account_2.name)
         vm_2 = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
                                     templateid=self.template.id,
-                                    accountid=self.account_2.account.name,
-                                    domainid=self.account_2.account.domainid,
+                                    accountid=self.account_2.name,
+                                    domainid=self.account_2.domainid,
                                     serviceofferingid=self.service_offering.id
                                     )
 
         networks = Network.list(
                                 self.apiclient,
-                                account=self.account_1.account.name,
-                                domainid=self.account_1.account.domainid,
+                                account=self.account_1.name,
+                                domainid=self.account_1.domainid,
                                 listall=True
                                 )
         self.assertEqual(
@@ -1753,13 +1752,13 @@ class TestDomainForceRemove(cloudstackTestCase):
                          )
         network_1 = networks[0]
         self.debug("Default network in account 1: %s is %s" % (
-                                                self.account_1.account.name,
+                                                self.account_1.name,
                                                 network_1.name))
         src_nat_list = PublicIPAddress.list(
                                     self.apiclient,
                                     associatednetworkid=network_1.id,
-                                    account=self.account_1.account.name,
-                                    domainid=self.account_1.account.domainid,
+                                    account=self.account_1.name,
+                                    domainid=self.account_1.domainid,
                                     listall=True,
                                     issourcenat=True,
                                     )
@@ -1823,8 +1822,8 @@ class TestDomainForceRemove(cloudstackTestCase):
         self.debug("Checking if the resources in domain are deleted or not..")
         accounts = Account.list(
                                 self.apiclient,
-                                name=self.account_1.account.name,
-                                domainid=self.account_1.account.domainid,
+                                name=self.account_1.name,
+                                domainid=self.account_1.domainid,
                                 listall=True
                                 )
 
@@ -1894,31 +1893,31 @@ class TestDomainForceRemove(cloudstackTestCase):
         self.cleanup.append(self.service_offering)
 
         self.debug("Deploying virtual machine in account 1: %s" %
-                                                self.account_1.account.name)
+                                                self.account_1.name)
         vm_1 = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
                                     templateid=self.template.id,
-                                    accountid=self.account_1.account.name,
-                                    domainid=self.account_1.account.domainid,
+                                    accountid=self.account_1.name,
+                                    domainid=self.account_1.domainid,
                                     serviceofferingid=self.service_offering.id
                                     )
 
         self.debug("Deploying virtual machine in account 2: %s" %
-                                                self.account_2.account.name)
+                                                self.account_2.name)
         vm_2 = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
                                     templateid=self.template.id,
-                                    accountid=self.account_2.account.name,
-                                    domainid=self.account_2.account.domainid,
+                                    accountid=self.account_2.name,
+                                    domainid=self.account_2.domainid,
                                     serviceofferingid=self.service_offering.id
                                     )
 
         networks = Network.list(
                                 self.apiclient,
-                                account=self.account_1.account.name,
-                                domainid=self.account_1.account.domainid,
+                                account=self.account_1.name,
+                                domainid=self.account_1.domainid,
                                 listall=True
                                 )
         self.assertEqual(
@@ -1928,13 +1927,13 @@ class TestDomainForceRemove(cloudstackTestCase):
                          )
         network_1 = networks[0]
         self.debug("Default network in account 1: %s is %s" % (
-                                                self.account_1.account.name,
+                                                self.account_1.name,
                                                 network_1.name))
         src_nat_list = PublicIPAddress.list(
                                     self.apiclient,
                                     associatednetworkid=network_1.id,
-                                    account=self.account_1.account.name,
-                                    domainid=self.account_1.account.domainid,
+                                    account=self.account_1.name,
+                                    domainid=self.account_1.domainid,
                                     listall=True,
                                     issourcenat=True,
                                     )

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a37fa39f/test/integration/component/test_resource_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_resource_limits.py b/test/integration/component/test_resource_limits.py
index 1d876b6..ea79c07 100644
--- a/test/integration/component/test_resource_limits.py
+++ b/test/integration/component/test_resource_limits.py
@@ -191,25 +191,25 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         self.debug(
             "Updating instance resource limit for account: %s" %
-                                                self.account_1.account.name)
+                                                self.account_1.name)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               0, # Instance
-                              account=self.account_1.account.name,
-                              domainid=self.account_1.account.domainid,
+                              account=self.account_1.name,
+                              domainid=self.account_1.domainid,
                               max=1
                               )
         self.debug(
             "Deploying VM instance in account: %s" %
-                                        self.account_1.account.name)
+                                        self.account_1.name)
 
         virtual_machine = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_1.account.name,
-                                domainid=self.account_1.account.domainid,
+                                accountid=self.account_1.name,
+                                domainid=self.account_1.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine)
@@ -227,20 +227,20 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_1.account.name,
-                                domainid=self.account_1.account.domainid,
+                                accountid=self.account_1.name,
+                                domainid=self.account_1.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.debug(
             "Deploying VM instance in account: %s" %
-                                        self.account_2.account.name)
+                                        self.account_2.name)
         # Start 2 instances for account_2
         virtual_machine_1 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_2.account.name,
-                                domainid=self.account_2.account.domainid,
+                                accountid=self.account_2.name,
+                                domainid=self.account_2.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_1)
@@ -253,13 +253,13 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         self.debug(
             "Deploying VM instance in account: %s" %
-                                        self.account_2.account.name)
+                                        self.account_2.name)
         virtual_machine_2 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_2.account.name,
-                                domainid=self.account_2.account.domainid,
+                                accountid=self.account_2.name,
+                                domainid=self.account_2.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_2)
@@ -287,25 +287,25 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         self.debug(
             "Updating public IP resource limit for account: %s" %
-                                                self.account_1.account.name)
+                                                self.account_1.name)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               1, # Public Ip
-                              account=self.account_1.account.name,
-                              domainid=self.account_1.account.domainid,
+                              account=self.account_1.name,
+                              domainid=self.account_1.domainid,
                               max=2
                               )
 
         self.debug(
             "Deploying VM instance in account: %s" %
-                                        self.account_1.account.name)
+                                        self.account_1.name)
         virtual_machine_1 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_1.account.name,
-                                domainid=self.account_1.account.domainid,
+                                accountid=self.account_1.name,
+                                domainid=self.account_1.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_1)
@@ -318,14 +318,14 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         self.debug(
             "Deploying VM instance in account: %s" %
-                                        self.account_2.account.name)
+                                        self.account_2.name)
         # Create VM for second account
         virtual_machine_2 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_2.account.name,
-                                domainid=self.account_2.account.domainid,
+                                accountid=self.account_2.name,
+                                domainid=self.account_2.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_2)
@@ -431,25 +431,25 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         self.debug(
             "Updating public IP resource limit for account: %s" %
-                                                self.account_1.account.name)
+                                                self.account_1.name)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               3, # Snapshot
-                              account=self.account_1.account.name,
-                              domainid=self.account_1.account.domainid,
+                              account=self.account_1.name,
+                              domainid=self.account_1.domainid,
                               max=1
                               )
 
         self.debug(
             "Deploying VM instance in account: %s" %
-                                        self.account_1.account.name)
+                                        self.account_1.name)
         virtual_machine_1 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_1.account.name,
-                                domainid=self.account_1.account.domainid,
+                                accountid=self.account_1.name,
+                                domainid=self.account_1.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_1)
@@ -462,14 +462,14 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         self.debug(
             "Deploying VM instance in account: %s" %
-                                        self.account_1.account.name)
+                                        self.account_1.name)
         # Create VM for second account
         virtual_machine_2 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_2.account.name,
-                                domainid=self.account_2.account.domainid,
+                                accountid=self.account_2.name,
+                                domainid=self.account_2.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_2)
@@ -498,8 +498,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         # Create a snapshot from the ROOTDISK (Account 1)
         snapshot_1 = Snapshot.create(self.apiclient,
                             volumes[0].id,
-                            account=self.account_1.account.name,
-                            domainid=self.account_1.account.domainid,
+                            account=self.account_1.name,
+                            domainid=self.account_1.domainid,
                             )
         self.cleanup.append(snapshot_1)
         # Verify Snapshot state
@@ -516,8 +516,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         with self.assertRaises(Exception):
             Snapshot.create(self.apiclient,
                             volumes[0].id,
-                            account=self.account_1.account.name,
-                            domainid=self.account_1.account.domainid,
+                            account=self.account_1.name,
+                            domainid=self.account_1.domainid,
                             )
 
         # Get the Root disk of VM
@@ -538,8 +538,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         # Create a snapshot from the ROOTDISK (Account 2)
         snapshot_2 = Snapshot.create(self.apiclient,
                             volumes[0].id,
-                            account=self.account_2.account.name,
-                            domainid=self.account_2.account.domainid,
+                            account=self.account_2.name,
+                            domainid=self.account_2.domainid,
                             )
         self.cleanup.append(snapshot_2)
         # Verify Snapshot state
@@ -556,8 +556,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         # Create a second snapshot from the ROOTDISK (Account 2)
         snapshot_3 = Snapshot.create(self.apiclient,
                             volumes[0].id,
-                            account=self.account_2.account.name,
-                            domainid=self.account_2.account.domainid,
+                            account=self.account_2.name,
+                            domainid=self.account_2.domainid,
                             )
         self.cleanup.append(snapshot_3)
         # Verify Snapshot state
@@ -587,25 +587,25 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         self.debug(
             "Updating volume resource limit for account: %s" %
-                                                self.account_1.account.name)
+                                                self.account_1.name)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               2, # Volume
-                              account=self.account_1.account.name,
-                              domainid=self.account_1.account.domainid,
+                              account=self.account_1.name,
+                              domainid=self.account_1.domainid,
                               max=2
                               )
 
         self.debug(
-            "Deploying VM for account: %s" % self.account_1.account.name)
+            "Deploying VM for account: %s" % self.account_1.name)
 
         virtual_machine_1 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_1.account.name,
-                                domainid=self.account_1.account.domainid,
+                                accountid=self.account_1.name,
+                                domainid=self.account_1.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_1)
@@ -617,15 +617,15 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                         )
 
         self.debug(
-            "Deploying VM for account: %s" % self.account_2.account.name)
+            "Deploying VM for account: %s" % self.account_2.name)
 
         # Create VM for second account
         virtual_machine_2 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_2.account.name,
-                                domainid=self.account_2.account.domainid,
+                                accountid=self.account_2.name,
+                                domainid=self.account_2.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_2)
@@ -637,13 +637,13 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                         )
 
         self.debug(
-            "Create a data volume for account: %s" % self.account_1.account.name)
+            "Create a data volume for account: %s" % self.account_1.name)
         volume_1 = Volume.create(
                                    self.apiclient,
                                    self.services["volume"],
                                    zoneid=self.zone.id,
-                                   account=self.account_1.account.name,
-                                   domainid=self.account_1.account.domainid,
+                                   account=self.account_1.name,
+                                   domainid=self.account_1.domainid,
                                    diskofferingid=self.disk_offering.id
                                    )
         self.cleanup.append(volume_1)
@@ -663,20 +663,20 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                           self.apiclient,
                           self.services["volume"],
                           zoneid=self.zone.id,
-                          account=self.account_1.account.name,
-                          domainid=self.account_1.account.domainid,
+                          account=self.account_1.name,
+                          domainid=self.account_1.domainid,
                           diskofferingid=self.disk_offering.id
                         )
 
         self.debug(
-            "Create a data volume for account: %s" % self.account_2.account.name)
+            "Create a data volume for account: %s" % self.account_2.name)
         # Create volume for Account 2
         volume_2 = Volume.create(
                                    self.apiclient,
                                    self.services["volume"],
                                    zoneid=self.zone.id,
-                                   account=self.account_2.account.name,
-                                   domainid=self.account_2.account.domainid,
+                                   account=self.account_2.name,
+                                   domainid=self.account_2.domainid,
                                    diskofferingid=self.disk_offering.id
                                    )
         self.cleanup.append(volume_2)
@@ -691,14 +691,14 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                         )
 
         self.debug(
-            "Create a data volume for account: %s" % self.account_2.account.name)
+            "Create a data volume for account: %s" % self.account_2.name)
         # Create a second volume from the ROOTDISK (Account 2)
         volume_3 = Volume.create(
                                    self.apiclient,
                                    self.services["volume"],
                                    zoneid=self.zone.id,
-                                   account=self.account_2.account.name,
-                                   domainid=self.account_2.account.domainid,
+                                   account=self.account_2.name,
+                                   domainid=self.account_2.domainid,
                                    diskofferingid=self.disk_offering.id
                                    )
         self.cleanup.append(volume_3)
@@ -727,25 +727,25 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         self.debug(
             "Updating template resource limit for account: %s" %
-                                                self.account_1.account.name)
+                                                self.account_1.name)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               4, # Template
-                              account=self.account_1.account.name,
-                              domainid=self.account_1.account.domainid,
+                              account=self.account_1.name,
+                              domainid=self.account_1.domainid,
                               max=1
                               )
 
         self.debug(
             "Updating volume resource limit for account: %s" %
-                                                self.account_1.account.name)
+                                                self.account_1.name)
         virtual_machine_1 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_1.account.name,
-                                domainid=self.account_1.account.domainid,
+                                accountid=self.account_1.name,
+                                domainid=self.account_1.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_1)
@@ -758,14 +758,14 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         self.debug(
             "Deploying virtual machine for account: %s" %
-                                                self.account_2.account.name)
+                                                self.account_2.name)
         # Create VM for second account
         virtual_machine_2 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=self.template.id,
-                                accountid=self.account_2.account.name,
-                                domainid=self.account_2.account.domainid,
+                                accountid=self.account_2.name,
+                                domainid=self.account_2.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.cleanup.append(virtual_machine_2)
@@ -798,8 +798,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                             self.apiclient,
                             self.services["template"],
                             volumeid=volume.id,
-                            account=self.account_1.account.name,
-                            domainid=self.account_1.account.domainid,
+                            account=self.account_1.name,
+                            domainid=self.account_1.domainid,
                             )
 
         self.cleanup.append(template_1)
@@ -816,8 +816,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                             self.apiclient,
                             self.services["template"],
                             volumeid=volume.id,
-                            account=self.account_1.account.name,
-                            domainid=self.account_1.account.domainid,
+                            account=self.account_1.name,
+                            domainid=self.account_1.domainid,
                             )
         virtual_machine_2.stop(self.apiclient)
         # Get the Root disk of VM
@@ -841,8 +841,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                             self.apiclient,
                             self.services["template"],
                             volumeid=volume.id,
-                            account=self.account_2.account.name,
-                            domainid=self.account_2.account.domainid,
+                            account=self.account_2.name,
+                            domainid=self.account_2.domainid,
                             )
 
         self.cleanup.append(template_2)
@@ -859,8 +859,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                             self.apiclient,
                             self.services["template"],
                             volumeid=volume.id,
-                            account=self.account_2.account.name,
-                            domainid=self.account_2.account.domainid,
+                            account=self.account_2.name,
+                            domainid=self.account_2.domainid,
                             )
 
         self.cleanup.append(template_3)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a37fa39f/test/integration/component/test_storage_motion.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_storage_motion.py b/test/integration/component/test_storage_motion.py
index c05d79e..cf110d3 100644
--- a/test/integration/component/test_storage_motion.py
+++ b/test/integration/component/test_storage_motion.py
@@ -178,6 +178,12 @@ class TestStorageMotion(cloudstackTestCase):
         # Migrate to a host that requires storage motion
         hosts[:] = [host for host in hosts if host.requiresStorageMotion]
 
+        self.assert_(hosts is not None, msg="No valid hosts for storage motion")
+        self.assert_(len(hosts)>0, msg="No valid hosts for storage motion. Skipping")
+        if hosts is None or len(hosts) == 0:
+            self.skipTest("No valid hosts for storage motion. Skipping")
+
+
         host = hosts[0]
         self.debug("Migrating VM-ID: %s to Host: %s" % (
                                         self.virtual_machine.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a37fa39f/test/integration/component/test_vm_passwdenabled.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vm_passwdenabled.py b/test/integration/component/test_vm_passwdenabled.py
index 65b068d..e89253c 100644
--- a/test/integration/component/test_vm_passwdenabled.py
+++ b/test/integration/component/test_vm_passwdenabled.py
@@ -83,7 +83,7 @@ class TestVMPasswordEnabled(cloudstackTestCase):
         # Get Zone, Domain and templates
         domain = get_domain(cls.api_client, cls.services)
         zone = get_zone(cls.api_client, cls.services)
-        cls.services['mode'] = cls.zone.networktype
+        cls.services['mode'] = zone.networktype
         template = get_template(
             cls.api_client,
             zone.id,


Mime
View raw message