cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject [11/20] CLOUDSTACK-2323: fix test scripts to conform with library changes
Date Mon, 06 May 2013 10:28:36 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_usage.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_usage.py b/test/integration/component/test_usage.py
index 39228ba..dbd0be9 100644
--- a/test/integration/component/test_usage.py
+++ b/test/integration/component/test_usage.py
@@ -135,7 +135,7 @@ class TestVmUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -145,8 +145,8 @@ class TestVmUsage(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["server"],
                                 templateid=template.id,
-                                accountid=cls.account.account.name,
-                                domainid=cls.account.account.domainid,
+                                accountid=cls.account.name,
+                                domainid=cls.account.domainid,
                                 serviceofferingid=cls.service_offering.id
                                 )
         cls._cleanup = [
@@ -202,11 +202,11 @@ class TestVmUsage(cloudstackTestCase):
 
         # Fetch account ID from account_uuid
         self.debug("select id from account where uuid = '%s';" \
-                        % self.account.account.id)
+                        % self.account.id)
 
         qresultset = self.dbclient.execute(
                         "select id from account where uuid = '%s';" \
-                        % self.account.account.id
+                        % self.account.id
                         )
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -319,7 +319,7 @@ class TestPublicIPUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -329,8 +329,8 @@ class TestPublicIPUsage(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["server"],
                                 templateid=template.id,
-                                accountid=cls.account.account.name,
-                                domainid=cls.account.account.domainid,
+                                accountid=cls.account.name,
+                                domainid=cls.account.domainid,
                                 serviceofferingid=cls.service_offering.id
                                 )
 
@@ -382,18 +382,18 @@ class TestPublicIPUsage(cloudstackTestCase):
         # 3. Delete the newly created account
 
         self.debug("Deleting public IP: %s" %
-                                self.public_ip.ipaddress.ipaddress)
+                                self.public_ip.ipaddress)
 
         # Release one of the IP
         self.public_ip.delete(self.apiclient)
 
         # Fetch account ID from account_uuid
         self.debug("select id from account where uuid = '%s';" \
-                        % self.account.account.id)
+                        % self.account.id)
 
         qresultset = self.dbclient.execute(
                         "select id from account where uuid = '%s';" \
-                        % self.account.account.id
+                        % self.account.id
                         )
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -474,7 +474,7 @@ class TestVolumeUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -484,8 +484,8 @@ class TestVolumeUsage(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["server"],
                                 templateid=template.id,
-                                accountid=cls.account.account.name,
-                                domainid=cls.account.account.domainid,
+                                accountid=cls.account.name,
+                                domainid=cls.account.domainid,
                                 serviceofferingid=cls.service_offering.id
                                 )
         cls._cleanup = [
@@ -562,11 +562,11 @@ class TestVolumeUsage(cloudstackTestCase):
 
         # Fetch account ID from account_uuid
         self.debug("select id from account where uuid = '%s';" \
-                        % self.account.account.id)
+                        % self.account.id)
 
         qresultset = self.dbclient.execute(
                         "select id from account where uuid = '%s';" \
-                        % self.account.account.id
+                        % self.account.id
                         )
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -640,7 +640,7 @@ class TestTemplateUsage(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -651,8 +651,8 @@ class TestTemplateUsage(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["server"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id,
                                     mode=cls.services["mode"]
                                     )
@@ -726,11 +726,11 @@ class TestTemplateUsage(cloudstackTestCase):
 
         # Fetch account ID from account_uuid
         self.debug("select id from account where uuid = '%s';" \
-                        % self.account.account.id)
+                        % self.account.id)
 
         qresultset = self.dbclient.execute(
                         "select id from account where uuid = '%s';" \
-                        % self.account.account.id
+                        % self.account.id
                         )
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -801,12 +801,12 @@ class TestISOUsage(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls.iso = Iso.create(
                                 cls.api_client,
                                 cls.services["iso"],
-                                account=cls.account.account.name,
-                                domainid=cls.account.account.domainid
+                                account=cls.account.name,
+                                domainid=cls.account.domainid
                             )
         try:
             # Wait till ISO gets downloaded
@@ -862,11 +862,11 @@ class TestISOUsage(cloudstackTestCase):
 
         # Fetch account ID from account_uuid
         self.debug("select id from account where uuid = '%s';" \
-                        % self.account.account.id)
+                        % self.account.id)
 
         qresultset = self.dbclient.execute(
                         "select id from account where uuid = '%s';" \
-                        % self.account.account.id
+                        % self.account.id
                         )
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -946,7 +946,7 @@ class TestLBRuleUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -956,8 +956,8 @@ class TestLBRuleUsage(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["server"],
                                 templateid=template.id,
-                                accountid=cls.account.account.name,
-                                domainid=cls.account.account.domainid,
+                                accountid=cls.account.name,
+                                domainid=cls.account.domainid,
                                 serviceofferingid=cls.service_offering.id
                                 )
         cls.public_ip_1 = PublicIPAddress.create(
@@ -1016,7 +1016,7 @@ class TestLBRuleUsage(cloudstackTestCase):
                                           self.apiclient,
                                           self.services["lbrule"],
                                           self.public_ip_1.ipaddress.id,
-                                          accountid=self.account.account.name
+                                          accountid=self.account.name
                                           )
         # Delete LB Rule
         self.debug("Deleting LB rule with ID: %s" % lb_rule.id)
@@ -1024,11 +1024,11 @@ class TestLBRuleUsage(cloudstackTestCase):
 
         # Fetch account ID from account_uuid
         self.debug("select id from account where uuid = '%s';" \
-                        % self.account.account.id)
+                        % self.account.id)
 
         qresultset = self.dbclient.execute(
                         "select id from account where uuid = '%s';" \
-                        % self.account.account.id
+                        % self.account.id
                         )
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -1109,7 +1109,7 @@ class TestSnapshotUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -1119,8 +1119,8 @@ class TestSnapshotUsage(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["server"],
                                 templateid=template.id,
-                                accountid=cls.account.account.name,
-                                domainid=cls.account.account.domainid,
+                                accountid=cls.account.name,
+                                domainid=cls.account.domainid,
                                 serviceofferingid=cls.service_offering.id
                                 )
         cls._cleanup = [
@@ -1190,11 +1190,11 @@ class TestSnapshotUsage(cloudstackTestCase):
 
         # Fetch account ID from account_uuid
         self.debug("select id from account where uuid = '%s';" \
-                        % self.account.account.id)
+                        % self.account.id)
 
         qresultset = self.dbclient.execute(
                         "select id from account where uuid = '%s';" \
-                        % self.account.account.id
+                        % self.account.id
                         )
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -1275,7 +1275,7 @@ class TestNatRuleUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -1285,8 +1285,8 @@ class TestNatRuleUsage(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["server"],
                                 templateid=template.id,
-                                accountid=cls.account.account.name,
-                                domainid=cls.account.account.domainid,
+                                accountid=cls.account.name,
+                                domainid=cls.account.domainid,
                                 serviceofferingid=cls.service_offering.id
                                 )
         cls.public_ip_1 = PublicIPAddress.create(
@@ -1354,11 +1354,11 @@ class TestNatRuleUsage(cloudstackTestCase):
 
         # Fetch account ID from account_uuid
         self.debug("select id from account where uuid = '%s';" \
-                        % self.account.account.id)
+                        % self.account.id)
 
         qresultset = self.dbclient.execute(
                         "select id from account where uuid = '%s';" \
-                        % self.account.account.id
+                        % self.account.id
                         )
         self.assertEqual(
                          isinstance(qresultset, list),
@@ -1438,7 +1438,7 @@ class TestVpnUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -1448,8 +1448,8 @@ class TestVpnUsage(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["server"],
                                 templateid=template.id,
-                                accountid=cls.account.account.name,
-                                domainid=cls.account.account.domainid,
+                                accountid=cls.account.name,
+                                domainid=cls.account.domainid,
                                 serviceofferingid=cls.service_offering.id
                                 )
         cls.public_ip = PublicIPAddress.create(
@@ -1506,19 +1506,19 @@ class TestVpnUsage(cloudstackTestCase):
         vpn = Vpn.create(
                         self.apiclient,
                         self.public_ip.ipaddress.id,
-                        account=self.account.account.name,
-                        domainid=self.account.account.domainid
+                        account=self.account.name,
+                        domainid=self.account.domainid
                         )
 
         self.debug("Created VPN user for account: %s" %
-                                    self.account.account.name)
+                                    self.account.name)
 
         vpnuser = VpnUser.create(
                                  self.apiclient,
                                  self.services["vpn_user"]["username"],
                                  self.services["vpn_user"]["password"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
 
         # Remove VPN user
@@ -1531,11 +1531,11 @@ class TestVpnUsage(cloudstackTestCase):
 
         # Fetch account ID from account_uuid
         self.debug("select id from account where uuid = '%s';" \
-                        % self.account.account.id)
+                        % self.account.id)
 
         qresultset = self.dbclient.execute(
                         "select id from account where uuid = '%s';" \
-                        % self.account.account.id
+                        % self.account.id
                         )
         self.assertEqual(
                          isinstance(qresultset, list),

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/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 e3bcf67..65b068d 100644
--- a/test/integration/component/test_vm_passwdenabled.py
+++ b/test/integration/component/test_vm_passwdenabled.py
@@ -108,8 +108,8 @@ class TestVMPasswordEnabled(cloudstackTestCase):
         cls.virtual_machine = VirtualMachine.create(
             cls.api_client,
             cls.services["small"],
-            accountid=cls.account.account.name,
-            domainid=cls.account.account.domainid,
+            accountid=cls.account.name,
+            domainid=cls.account.domainid,
             serviceofferingid=cls.small_offering.id,
             mode=cls.services["mode"]
         )
@@ -159,8 +159,8 @@ class TestVMPasswordEnabled(cloudstackTestCase):
             cls.api_client,
             cls.services["template"],
             cls.volume.id,
-            account=cls.account.account.name,
-            domainid=cls.account.account.domainid
+            account=cls.account.name,
+            domainid=cls.account.domainid
         )
         # Delete the VM - No longer needed
         cls.virtual_machine.delete(cls.api_client)
@@ -169,8 +169,8 @@ class TestVMPasswordEnabled(cloudstackTestCase):
         cls.vm = VirtualMachine.create(
             cls.api_client,
             cls.services["small"],
-            accountid=cls.account.account.name,
-            domainid=cls.account.account.domainid,
+            accountid=cls.account.name,
+            domainid=cls.account.domainid,
             serviceofferingid=cls.small_offering.id,
             mode=cls.services["mode"]
         )

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_volumes.py b/test/integration/component/test_volumes.py
index f50113b..f7eb9f9 100644
--- a/test/integration/component/test_volumes.py
+++ b/test/integration/component/test_volumes.py
@@ -121,7 +121,7 @@ class TestAttachVolume(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
                                             cls.services["service_offering"]
@@ -129,8 +129,8 @@ class TestAttachVolume(cloudstackTestCase):
         cls.virtual_machine = VirtualMachine.create(
                                     cls.api_client,
                                     cls.services["virtual_machine"],
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id,
                                 )
         cls._cleanup = [
@@ -162,13 +162,13 @@ class TestAttachVolume(cloudstackTestCase):
                                    self.apiclient,
                                    self.services["volume"],
                                    zoneid=self.zone.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid,
+                                   account=self.account.name,
+                                   domainid=self.account.domainid,
                                    diskofferingid=self.disk_offering.id
                                    )
             self.debug("Created volume: %s for account: %s" % (
                                                 volume.id,
-                                                self.account.account.name
+                                                self.account.name
                                                 ))
             # Check List Volume response for newly created volume
             list_volume_response = list_volumes(
@@ -311,13 +311,13 @@ class TestAttachVolume(cloudstackTestCase):
                                 self.apiclient,
                                 self.services["volume"],
                                 zoneid=self.zone.id,
-                                account=self.account.account.name,
-                                domainid=self.account.account.domainid,
+                                account=self.account.name,
+                                domainid=self.account.domainid,
                                 diskofferingid=self.disk_offering.id
                                )
         self.debug("Created volume: %s for account: %s" % (
                                                 volume.id,
-                                                self.account.account.name
+                                                self.account.name
                                                 ))
         # Check List Volume response for newly created volume
         list_volume_response = list_volumes(
@@ -392,7 +392,7 @@ class TestAttachDetachVolume(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
                                             cls.services["service_offering"]
@@ -400,8 +400,8 @@ class TestAttachDetachVolume(cloudstackTestCase):
         cls.virtual_machine = VirtualMachine.create(
                                     cls.api_client,
                                     cls.services["virtual_machine"],
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id,
                                 )
         cls._cleanup = [
@@ -449,13 +449,13 @@ class TestAttachDetachVolume(cloudstackTestCase):
                                    self.apiclient,
                                    self.services["volume"],
                                    zoneid=self.zone.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid,
+                                   account=self.account.name,
+                                   domainid=self.account.domainid,
                                    diskofferingid=self.disk_offering.id
                                    )
             self.debug("Created volume: %s for account: %s" % (
                                                 volume.id,
-                                                self.account.account.name
+                                                self.account.name
                                                 ))
             self.cleanup.append(volume)
             volumes.append(volume)
@@ -639,7 +639,7 @@ class TestAttachVolumeISO(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
                                             cls.services["service_offering"]
@@ -647,8 +647,8 @@ class TestAttachVolumeISO(cloudstackTestCase):
         cls.virtual_machine = VirtualMachine.create(
                                     cls.api_client,
                                     cls.services["virtual_machine"],
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id,
                                 )
         cls._cleanup = [
@@ -694,13 +694,13 @@ class TestAttachVolumeISO(cloudstackTestCase):
                                    self.apiclient,
                                    self.services["volume"],
                                    zoneid=self.zone.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid,
+                                   account=self.account.name,
+                                   domainid=self.account.domainid,
                                    diskofferingid=self.disk_offering.id
                                    )
             self.debug("Created volume: %s for account: %s" % (
                                                 volume.id,
-                                                self.account.account.name
+                                                self.account.name
                                                 ))
             # Check List Volume response for newly created volume
             list_volume_response = list_volumes(
@@ -749,12 +749,12 @@ class TestAttachVolumeISO(cloudstackTestCase):
         iso = Iso.create(
                          self.apiclient,
                          self.services["iso"],
-                         account=self.account.account.name,
-                         domainid=self.account.account.domainid,
+                         account=self.account.name,
+                         domainid=self.account.domainid,
                          )
         self.debug("Created ISO with ID: %s for account: %s" % (
                                                     iso.id,
-                                                    self.account.account.name
+                                                    self.account.name
                                                     ))
 
         try:
@@ -831,7 +831,7 @@ class TestVolumes(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
                                             cls.services["service_offering"]
@@ -839,8 +839,8 @@ class TestVolumes(cloudstackTestCase):
         cls.virtual_machine = VirtualMachine.create(
                                     cls.api_client,
                                     cls.services["virtual_machine"],
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id,
                                 )
 
@@ -848,8 +848,8 @@ class TestVolumes(cloudstackTestCase):
                                    cls.api_client,
                                    cls.services["volume"],
                                    zoneid=cls.zone.id,
-                                   account=cls.account.account.name,
-                                   domainid=cls.account.account.domainid,
+                                   account=cls.account.name,
+                                   domainid=cls.account.domainid,
                                    diskofferingid=cls.disk_offering.id
                                    )
         cls._cleanup = [
@@ -1071,7 +1071,7 @@ class TestDeployVmWithCustomDisk(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
                                             cls.services["service_offering"]
@@ -1137,8 +1137,8 @@ class TestDeployVmWithCustomDisk(cloudstackTestCase):
             Volume.create_custom_disk(
                                     self.apiclient,
                                     self.services["custom_volume"],
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    account=self.account.name,
+                                    domainid=self.account.domainid,
                                     diskofferingid=self.disk_offering.id
                                     )
         self.debug("Create volume failed!")
@@ -1149,8 +1149,8 @@ class TestDeployVmWithCustomDisk(cloudstackTestCase):
             Volume.create_custom_disk(
                                     self.apiclient,
                                     self.services["custom_volume"],
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    account=self.account.name,
+                                    domainid=self.account.domainid,
                                     diskofferingid=self.disk_offering.id
                                     )
         self.debug("Create volume failed!")
@@ -1163,8 +1163,8 @@ class TestDeployVmWithCustomDisk(cloudstackTestCase):
             Volume.create_custom_disk(
                                     self.apiclient,
                                     self.services["custom_volume"],
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    account=self.account.name,
+                                    domainid=self.account.domainid,
                                     diskofferingid=self.disk_offering.id
                                     )
             self.debug("Create volume of cust disk size succeeded")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_vpn_users.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpn_users.py b/test/integration/component/test_vpn_users.py
index e18c538..9318654 100644
--- a/test/integration/component/test_vpn_users.py
+++ b/test/integration/component/test_vpn_users.py
@@ -138,8 +138,8 @@ class TestVPNUsers(cloudstackTestCase):
                                 self.apiclient,
                                 self.services["virtual_machine"],
                                 templateid=self.template.id,
-                                accountid=self.account.account.name,
-                                domainid=self.account.account.domainid,
+                                accountid=self.account.name,
+                                domainid=self.account.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         self.public_ip = PublicIPAddress.create(
@@ -170,8 +170,8 @@ class TestVPNUsers(cloudstackTestCase):
             # Assign VPN to Public IP
             vpn = Vpn.create(self.apiclient,
                          self.public_ip.ipaddress.id,
-                         account=self.account.account.name,
-                         domainid=self.account.account.domainid)
+                         account=self.account.name,
+                         domainid=self.account.domainid)
 
             self.debug("Verifying the remote VPN access")
             vpns = Vpn.list(self.apiclient,
@@ -190,7 +190,7 @@ class TestVPNUsers(cloudstackTestCase):
         """Creates VPN users for the network"""
 
         self.debug("Creating VPN users for account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         if api_client is None:
             api_client = self.apiclient
         try:
@@ -198,8 +198,8 @@ class TestVPNUsers(cloudstackTestCase):
                                  api_client,
                                  self.services["vpn_user"]["username"],
                                  self.services["vpn_user"]["password"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid,
+                                 account=self.account.name,
+                                 domainid=self.account.domainid,
                                  rand_name=rand_name
                                  )
 
@@ -240,7 +240,7 @@ class TestVPNUsers(cloudstackTestCase):
         limit = int(configs[0].value)
 
         self.debug("Enabling the VPN access for IP: %s" %
-                                            self.public_ip.ipaddress.ipaddress)
+                                            self.public_ip.ipaddress)
 
         self.create_VPN(self.public_ip)
         self.debug("Creating %s VPN users" % limit)
@@ -278,7 +278,7 @@ class TestVPNUsers(cloudstackTestCase):
                          "List NAT rules should return a valid response")
 
         self.debug("Enabling the VPN connection for IP: %s" %
-                                            self.public_ip.ipaddress.ipaddress)
+                                            self.public_ip.ipaddress)
         with self.assertRaises(Exception):
             self.create_VPN(self.public_ip)
         self.debug("Create VPN connection failed! Test successful!")
@@ -295,7 +295,7 @@ class TestVPNUsers(cloudstackTestCase):
         #    saying that VPN is enabled over port 1701
 
         self.debug("Enabling the VPN connection for IP: %s" %
-                                            self.public_ip.ipaddress.ipaddress)
+                                            self.public_ip.ipaddress)
         self.create_VPN(self.public_ip)
 
         self.debug("Creating a port forwarding rule on port 1701")
@@ -321,12 +321,12 @@ class TestVPNUsers(cloudstackTestCase):
         #    the newly added user credential.
 
         self.debug("Enabling the VPN connection for IP: %s" %
-                                            self.public_ip.ipaddress.ipaddress)
+                                            self.public_ip.ipaddress)
         self.create_VPN(self.public_ip)
 
         try:
             self.debug("Adding new VPN user to account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
             self.create_VPN_Users()
 
             # TODO: Verify the VPN connection
@@ -348,11 +348,11 @@ class TestVPNUsers(cloudstackTestCase):
         # 3. Adding this VPN user should fail.
 
         self.debug("Enabling the VPN connection for IP: %s" %
-                                            self.public_ip.ipaddress.ipaddress)
+                                            self.public_ip.ipaddress)
         self.create_VPN(self.public_ip)
 
         self.debug("Adding new VPN user to account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.create_VPN_Users(rand_name=False)
 
         # TODO: Verify the VPN connection
@@ -378,22 +378,22 @@ class TestVPNUsers(cloudstackTestCase):
         #   establish VPN connection that will give access all VMs of this user
 
         self.debug("Enabling VPN connection to account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.create_VPN(self.public_ip)
         self.debug("Creating VPN user for the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.create_VPN_Users()
 
         self.debug("Creating a global admin account")
         admin = Account.create(self.apiclient,
                                self.services["account"],
                                admin=True,
-                               domainid=self.account.account.domainid)
+                               domainid=self.account.domainid)
         self.cleanup.append(admin)
         self.debug("Creating API client for newly created user")
         api_client = self.testClient.createUserApiClient(
-                                    UserName=self.account.account.name,
-                                    DomainName=self.account.account.domain)
+                                    UserName=self.account.name,
+                                    DomainName=self.account.domain)
 
         self.debug("Adding new user to VPN as a global admin: %s" %
                                                             admin.account.name)
@@ -421,21 +421,21 @@ class TestVPNUsers(cloudstackTestCase):
         #   establish VPN connection that will give access all VMs of this user
 
         self.debug("Enabling VPN connection to account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.create_VPN(self.public_ip)
         self.debug("Creating VPN user for the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.create_VPN_Users()
 
         self.debug("Creating a domain admin account")
         admin = Account.create(self.apiclient,
                                self.services["account"],
-                               domainid=self.account.account.domainid)
+                               domainid=self.account.domainid)
         self.cleanup.append(admin)
         self.debug("Creating API client for newly created user")
         api_client = self.testClient.createUserApiClient(
-                                    UserName=self.account.account.name,
-                                    DomainName=self.account.account.domain)
+                                    UserName=self.account.name,
+                                    DomainName=self.account.domain)
 
         self.debug("Adding new user to VPN as a domain admin: %s" %
                                                             admin.account.name)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/smoke/test_iso.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_iso.py b/test/integration/smoke/test_iso.py
index 0b7d276..ad4a8f2 100644
--- a/test/integration/smoke/test_iso.py
+++ b/test/integration/smoke/test_iso.py
@@ -139,8 +139,8 @@ class TestCreateIso(cloudstackTestCase):
         iso = Iso.create(
                          self.apiclient, 
                          self.services["iso_2"],
-                         account=self.account.account.name,
-                         domainid=self.account.account.domainid
+                         account=self.account.name,
+                         domainid=self.account.domainid
                          )
         self.debug("ISO created with ID: %s" % iso.id)
         
@@ -214,7 +214,7 @@ class TestISO(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         # Finding the OsTypeId from Ostype
         ostypes = list_os_types(
                     cls.api_client,
@@ -230,8 +230,8 @@ class TestISO(cloudstackTestCase):
         cls.iso_1 = Iso.create(
                                cls.api_client, 
                                cls.services["iso_1"],
-                               account=cls.account.account.name,
-                               domainid=cls.account.account.domainid
+                               account=cls.account.name,
+                               domainid=cls.account.domainid
                                )
         try:
             cls.iso_1.download(cls.api_client)
@@ -242,8 +242,8 @@ class TestISO(cloudstackTestCase):
         cls.iso_2 = Iso.create(
                                cls.api_client, 
                                cls.services["iso_2"],
-                               account=cls.account.account.name,
-                               domainid=cls.account.account.domainid
+                               account=cls.account.name,
+                               domainid=cls.account.domainid
                                )
         try:
             cls.iso_2.download(cls.api_client)
@@ -448,8 +448,8 @@ class TestISO(cloudstackTestCase):
         list_iso_response = list_isos(
                                       self.apiclient,
                                       id=self.iso_2.id,
-                                      account=self.account.account.name,
-                                      domainid=self.account.account.domainid
+                                      account=self.account.name,
+                                      domainid=self.account.domainid
                                       )
         self.assertEqual(
                             isinstance(list_iso_response, list),

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/smoke/test_network.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py
index df89eaa..322e8c2 100644
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@ -145,8 +145,8 @@ class TestPublicIP(cloudstackTestCase):
         cls.account_network = Network.create(
                                              cls.api_client,
                                              cls.services["network"],
-                                             cls.account.account.name,
-                                             cls.account.account.domainid
+                                             cls.account.name,
+                                             cls.account.domainid
                                              )
         cls.user_network = Network.create(
                                              cls.api_client,
@@ -158,9 +158,9 @@ class TestPublicIP(cloudstackTestCase):
         # Create Source NAT IP addresses
         account_src_nat_ip = PublicIPAddress.create(
                                             cls.api_client,
-                                            cls.account.account.name,
+                                            cls.account.name,
                                             cls.zone.id,
-                                            cls.account.account.domainid
+                                            cls.account.domainid
                                             )
         user_src_nat_ip = PublicIPAddress.create(
                                             cls.api_client,
@@ -197,9 +197,9 @@ class TestPublicIP(cloudstackTestCase):
 
         ip_address = PublicIPAddress.create(
                                             self.apiclient,
-                                            self.account.account.name,
+                                            self.account.name,
                                             self.zone.id,
-                                            self.account.account.domainid
+                                            self.account.domainid
                                             )
         list_pub_ip_addr_resp = list_publicIP(
                                               self.apiclient,
@@ -321,8 +321,8 @@ class TestPortForwarding(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["server"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id
                                 )
         cls._cleanup = [
@@ -358,8 +358,8 @@ class TestPortForwarding(cloudstackTestCase):
 
         src_nat_ip_addrs = list_publicIP(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                   )
 
         self.assertEqual(
@@ -481,9 +481,9 @@ class TestPortForwarding(cloudstackTestCase):
 
         ip_address = PublicIPAddress.create(
                                             self.apiclient,
-                                            self.account.account.name,
+                                            self.account.name,
                                             self.zone.id,
-                                            self.account.account.domainid,
+                                            self.account.domainid,
                                             self.services["server"]
                                             )
         self.cleanup.append(ip_address)
@@ -554,9 +554,9 @@ class TestPortForwarding(cloudstackTestCase):
             self.debug("SSHing into VM with IP address %s with NAT IP %s" %
                                     (
                                      self.virtual_machine.ipaddress,
-                                     ip_address.ipaddress.ipaddress
+                                     ip_address.ipaddress
                                     ))
-            self.virtual_machine.get_ssh_client(ip_address.ipaddress.ipaddress)
+            self.virtual_machine.get_ssh_client(ip_address.ipaddress)
         except Exception as e:
             self.fail(
                       "SSH Access failed for %s: %s" % \
@@ -581,7 +581,7 @@ class TestPortForwarding(cloudstackTestCase):
                                                  self.virtual_machine.ipaddress)
 
             remoteSSHClient(
-                                            ip_address.ipaddress.ipaddress,
+                                            ip_address.ipaddress,
                                             self.virtual_machine.ssh_port,
                                             self.virtual_machine.username,
                                             self.virtual_machine.password
@@ -621,23 +621,23 @@ class TestLoadBalancingRule(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["server"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id
                                     )
         cls.vm_2 = VirtualMachine.create(
                                     cls.api_client,
                                     cls.services["server"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id
                                     )
         cls.non_src_nat_ip = PublicIPAddress.create(
                                             cls.api_client,
-                                            cls.account.account.name,
+                                            cls.account.name,
                                             cls.zone.id,
-                                            cls.account.account.domainid,
+                                            cls.account.domainid,
                                             cls.services["server"]
                                             )
         # Open up firewall port for SSH        
@@ -680,8 +680,8 @@ class TestLoadBalancingRule(cloudstackTestCase):
 
         src_nat_ip_addrs = list_publicIP(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                   )
         self.assertEqual(
                             isinstance(src_nat_ip_addrs, list),
@@ -693,8 +693,8 @@ class TestLoadBalancingRule(cloudstackTestCase):
         # Check if VM is in Running state before creating LB rule
         vm_response = VirtualMachine.list(
                                           self.apiclient,
-                                          account=self.account.account.name,
-                                          domainid=self.account.account.domainid
+                                          account=self.account.name,
+                                          domainid=self.account.domainid
                                           )
 
         self.assertEqual(
@@ -720,7 +720,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
                                           self.apiclient,
                                           self.services["lbrule"],
                                           src_nat_ip_addr.id,
-                                          accountid=self.account.account.name
+                                          accountid=self.account.name
                                           )
         self.cleanup.append(lb_rule)
 
@@ -889,8 +889,8 @@ class TestLoadBalancingRule(cloudstackTestCase):
         # Check if VM is in Running state before creating LB rule
         vm_response = VirtualMachine.list(
                                           self.apiclient,
-                                          account=self.account.account.name,
-                                          domainid=self.account.account.domainid
+                                          account=self.account.name,
+                                          domainid=self.account.domainid
                                           )
 
         self.assertEqual(
@@ -916,7 +916,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
                                           self.apiclient,
                                           self.services["lbrule"],
                                           self.non_src_nat_ip.ipaddress.id,
-                                          accountid=self.account.account.name
+                                          accountid=self.account.name
                                           )
         self.cleanup.append(lb_rule)
 
@@ -974,12 +974,12 @@ class TestLoadBalancingRule(cloudstackTestCase):
         try:
             self.debug("SSHing into IP address: %s after adding VMs (ID: %s , %s)" %
                                             (
-                                             self.non_src_nat_ip.ipaddress.ipaddress,
+                                             self.non_src_nat_ip.ipaddress,
                                              self.vm_1.id,
                                              self.vm_2.id
                                              ))
             ssh_1 = remoteSSHClient(
-                                    self.non_src_nat_ip.ipaddress.ipaddress,
+                                    self.non_src_nat_ip.ipaddress,
                                     self.services['lbrule']["publicport"],
                                     self.vm_1.username,
                                     self.vm_1.password
@@ -993,12 +993,12 @@ class TestLoadBalancingRule(cloudstackTestCase):
 
             self.debug("SSHing again into IP address: %s with VMs (ID: %s , %s) added to LB rule" %
                                             (
-                                             self.non_src_nat_ip.ipaddress.ipaddress,
+                                             self.non_src_nat_ip.ipaddress,
                                              self.vm_1.id,
                                              self.vm_2.id
                                              ))
             ssh_2 = remoteSSHClient(
-                                    self.non_src_nat_ip.ipaddress.ipaddress,
+                                    self.non_src_nat_ip.ipaddress,
                                     self.services['lbrule']["publicport"],
                                     self.vm_1.username,
                                     self.vm_1.password
@@ -1022,11 +1022,11 @@ class TestLoadBalancingRule(cloudstackTestCase):
 
             self.debug("SSHing into IP address: %s after removing VM (ID: %s) from LB rule" %
                                             (
-                                             self.non_src_nat_ip.ipaddress.ipaddress,
+                                             self.non_src_nat_ip.ipaddress,
                                              self.vm_2.id
                                              ))
             ssh_1 = remoteSSHClient(
-                                        self.non_src_nat_ip.ipaddress.ipaddress,
+                                        self.non_src_nat_ip.ipaddress,
                                         self.services['lbrule']["publicport"],
                                         self.vm_1.username,
                                         self.vm_1.password
@@ -1036,7 +1036,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
             self.debug("Hostnames after removing VM2: %s" % str(hostnames))
         except Exception as e:
             self.fail("%s: SSH failed for VM with IP Address: %s" %
-                                        (e, self.non_src_nat_ip.ipaddress.ipaddress))
+                                        (e, self.non_src_nat_ip.ipaddress))
 
         self.assertIn(
                       self.vm_1.name,
@@ -1048,11 +1048,11 @@ class TestLoadBalancingRule(cloudstackTestCase):
         with self.assertRaises(Exception):
             self.fail("SSHing into IP address: %s after removing VM (ID: %s) from LB rule" %
                                             (
-                                             self.non_src_nat_ip.ipaddress.ipaddress,
+                                             self.non_src_nat_ip.ipaddress,
                                              self.vm_1.id
                                              ))
             ssh_1 = remoteSSHClient(
-                                        self.non_src_nat_ip.ipaddress.ipaddress,
+                                        self.non_src_nat_ip.ipaddress,
                                         self.services['lbrule']["publicport"],
                                         self.vm_1.username,
                                         self.vm_1.password
@@ -1093,15 +1093,15 @@ class TestRebootRouter(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["server"],
                                     templateid=template.id,
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id
                                     )
 
         src_nat_ip_addrs = list_publicIP(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                   )
         try:
             src_nat_ip_addr = src_nat_ip_addrs[0]
@@ -1129,7 +1129,7 @@ class TestRebootRouter(cloudstackTestCase):
                                             self.apiclient,
                                             self.services["lbrule"],
                                             src_nat_ip_addr.id,
-                                            self.account.account.name
+                                            self.account.name
                                         )
         lb_rule.assign(self.apiclient, [self.vm_1])
         self.nat_rule = NATRule.create(
@@ -1159,8 +1159,8 @@ class TestRebootRouter(cloudstackTestCase):
         #Retrieve router for the user account
         routers = list_routers(
                                 self.apiclient,
-                                account=self.account.account.name,
-                                domainid=self.account.account.domainid
+                                account=self.account.name,
+                                domainid=self.account.domainid
                                )
         self.assertEqual(
                             isinstance(routers, list),
@@ -1254,8 +1254,8 @@ class TestAssignRemoveLB(cloudstackTestCase):
                                   self.apiclient,
                                   self.services["server"],
                                   templateid=template.id,
-                                  accountid=self.account.account.name,
-                                  domainid=self.account.account.domainid,
+                                  accountid=self.account.name,
+                                  domainid=self.account.domainid,
                                   serviceofferingid=self.service_offering.id
                                   )
 
@@ -1263,8 +1263,8 @@ class TestAssignRemoveLB(cloudstackTestCase):
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=template.id,
-                                accountid=self.account.account.name,
-                                domainid=self.account.account.domainid,
+                                accountid=self.account.name,
+                                domainid=self.account.domainid,
                                 serviceofferingid=self.service_offering.id
                               )
 
@@ -1272,8 +1272,8 @@ class TestAssignRemoveLB(cloudstackTestCase):
                                 self.apiclient,
                                 self.services["server"],
                                 templateid=template.id,
-                                accountid=self.account.account.name,
-                                domainid=self.account.account.domainid,
+                                accountid=self.account.name,
+                                domainid=self.account.domainid,
                                 serviceofferingid=self.service_offering.id
                               )
 
@@ -1297,8 +1297,8 @@ class TestAssignRemoveLB(cloudstackTestCase):
 
         src_nat_ip_addrs = list_publicIP(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                   )
         self.assertEqual(
                             isinstance(src_nat_ip_addrs, list),
@@ -1320,8 +1320,8 @@ class TestAssignRemoveLB(cloudstackTestCase):
         # Check if VM is in Running state before creating LB rule
         vm_response = VirtualMachine.list(
                                           self.apiclient,
-                                          account=self.account.account.name,
-                                          domainid=self.account.account.domainid
+                                          account=self.account.name,
+                                          domainid=self.account.domainid
                                           )
 
         self.assertEqual(
@@ -1346,7 +1346,7 @@ class TestAssignRemoveLB(cloudstackTestCase):
                                 self.apiclient,
                                 self.services["lbrule"],
                                 self.non_src_nat_ip.id,
-                                self.account.account.name
+                                self.account.name
                               )
         lb_rule.assign(self.apiclient, [self.vm_1, self.vm_2])
 
@@ -1514,28 +1514,28 @@ class TestReleaseIP(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["server"],
                                     templateid=template.id,
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id
                                     )
 
         self.ip_address = PublicIPAddress.create(
                                             self.apiclient,
-                                            self.account.account.name,
+                                            self.account.name,
                                             self.zone.id,
-                                            self.account.account.domainid
+                                            self.account.domainid
                                             )
 
         ip_addrs = list_publicIP(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                   )
         try:
             self.ip_addr = ip_addrs[0]
         except Exception as e:
             raise Exception("Failed: During acquiring source NAT for account: %s" %
-                                self.account.account.name)
+                                self.account.name)
 
         self.nat_rule = NATRule.create(
                                        self.apiclient,
@@ -1547,7 +1547,7 @@ class TestReleaseIP(cloudstackTestCase):
                                         self.apiclient,
                                         self.services["lbrule"],
                                         self.ip_addr.id,
-                                        accountid=self.account.account.name
+                                        accountid=self.account.name
                                         )
         self.cleanup = [
                         self.virtual_machine,
@@ -1652,15 +1652,15 @@ class TestDeleteAccount(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["server"],
                                     templateid=template.id,
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id
                                     )
 
         src_nat_ip_addrs = list_publicIP(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                   )
 
         try:
@@ -1674,7 +1674,7 @@ class TestDeleteAccount(cloudstackTestCase):
                                             self.apiclient,
                                             self.services["lbrule"],
                                             src_nat_ip_addr.id,
-                                            self.account.account.name
+                                            self.account.name
                                         )
         self.lb_rule.assign(self.apiclient, [self.vm_1])
 
@@ -1717,8 +1717,8 @@ class TestDeleteAccount(cloudstackTestCase):
         try:
             list_lb_reponse = list_lb_rules(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
             self.assertEqual(
                      list_lb_reponse,
@@ -1729,14 +1729,14 @@ class TestDeleteAccount(cloudstackTestCase):
 
             raise Exception(
                 "Exception raised while fetching LB rules for account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         # ListPortForwardingRules should not
         # list associated rules with deleted account
         try:
             list_nat_reponse = list_nat_rules(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                         )
             self.assertEqual(
                              list_nat_reponse,
@@ -1747,13 +1747,13 @@ class TestDeleteAccount(cloudstackTestCase):
 
             raise Exception(
                 "Exception raised while fetching NAT rules for account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         #Retrieve router for the user account
         try:
             routers = list_routers(
                           self.apiclient,
-                          account=self.account.account.name,
-                          domainid=self.account.account.domainid
+                          account=self.account.name,
+                          domainid=self.account.domainid
                         )
             self.assertEqual(
                              routers,
@@ -1764,7 +1764,7 @@ class TestDeleteAccount(cloudstackTestCase):
 
             raise Exception(
                 "Exception raised while fetching routers for account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         return
 
     def tearDown(self):

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/smoke/test_nic.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_nic.py b/test/integration/smoke/test_nic.py
index ad30122..bae6dfd 100644
--- a/test/integration/smoke/test_nic.py
+++ b/test/integration/smoke/test_nic.py
@@ -181,8 +181,8 @@ class TestDeployVM(cloudstackTestCase):
             self.test_network = Network.create(
                                                  self.apiclient,
                                                  self.services["network"],
-                                                 self.account.account.name,
-                                                 self.account.account.domainid,
+                                                 self.account.name,
+                                                 self.account.domainid,
                                                  )
             self.cleanup.insert(0, self.test_network)
         except Exception as ex:
@@ -198,8 +198,8 @@ class TestDeployVM(cloudstackTestCase):
             self.virtual_machine = VirtualMachine.create(
                                         self.apiclient,
                                         self.services["small"],
-                                        accountid=self.account.account.name,
-                                        domainid=self.account.account.domainid,
+                                        accountid=self.account.name,
+                                        domainid=self.account.domainid,
                                         serviceofferingid=self.service_offering.id,
                                         mode=self.services['mode']
                                     )

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/smoke/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py
index 7785576..9ec2e91 100644
--- a/test/integration/smoke/test_routers.py
+++ b/test/integration/smoke/test_routers.py
@@ -102,8 +102,8 @@ class TestRouterServices(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["virtual_machine"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id
                                     )
         cls.cleanup = [
@@ -143,8 +143,8 @@ class TestRouterServices(cloudstackTestCase):
         # Find router associated with user account
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -205,8 +205,8 @@ class TestRouterServices(cloudstackTestCase):
         # Find router associated with user account
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -284,8 +284,8 @@ class TestRouterServices(cloudstackTestCase):
         # Find router associated with user account
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -302,8 +302,8 @@ class TestRouterServices(cloudstackTestCase):
         while True:
             networks = list_networks(
                                  self.apiclient,
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
             self.assertEqual(
                             isinstance(networks, list),
@@ -332,8 +332,8 @@ class TestRouterServices(cloudstackTestCase):
         # Get router details after restart
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -364,8 +364,8 @@ class TestRouterServices(cloudstackTestCase):
         while True:
             networks = list_networks(
                                  self.apiclient,
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
             self.assertEqual(
                             isinstance(networks, list),
@@ -394,8 +394,8 @@ class TestRouterServices(cloudstackTestCase):
         # Get router details after restart
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -462,8 +462,8 @@ class TestRouterServices(cloudstackTestCase):
 
         list_router_response = list_routers(
                                         self.apiclient,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -528,8 +528,8 @@ class TestRouterServices(cloudstackTestCase):
 
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -609,8 +609,8 @@ class TestRouterServices(cloudstackTestCase):
 
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -653,8 +653,8 @@ class TestRouterServices(cloudstackTestCase):
 
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -698,8 +698,8 @@ class TestRouterServices(cloudstackTestCase):
 
         list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_router_response, list),
@@ -755,8 +755,8 @@ class TestRouterServices(cloudstackTestCase):
 
         list_vms = list_virtual_machines(
                                          self.apiclient,
-                                         account=self.account.account.name,
-                                         domainid=self.account.account.domainid
+                                         account=self.account.name,
+                                         domainid=self.account.domainid
                                          )
         self.assertEqual(
                             isinstance(list_vms, list),
@@ -809,8 +809,8 @@ class TestRouterServices(cloudstackTestCase):
             #Check status of network router
             list_router_response = list_routers(
                                     self.apiclient,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
             if isinstance(list_router_response, list):
                 break

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/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 64fe4dc..fa2418b 100644
--- a/test/integration/smoke/test_scale_vm.py
+++ b/test/integration/smoke/test_scale_vm.py
@@ -137,8 +137,8 @@ class TestScaleVm(cloudstackTestCase):
         cls.virtual_machine = VirtualMachine.create(
                                         cls.api_client,
                                         cls.services["small"],
-                                        accountid=cls.account.account.name,
-                                        domainid=cls.account.account.domainid,
+                                        accountid=cls.account.name,
+                                        domainid=cls.account.domainid,
                                         serviceofferingid=cls.small_offering.id,
                                         mode=cls.services["mode"]
                                         )

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/smoke/test_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py
index a648098..fa4bc40 100644
--- a/test/integration/smoke/test_templates.py
+++ b/test/integration/smoke/test_templates.py
@@ -148,7 +148,7 @@ class TestCreateTemplate(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -159,8 +159,8 @@ class TestCreateTemplate(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["virtual_machine"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id,
                                     mode=cls.services["mode"]
                                     )
@@ -235,8 +235,8 @@ class TestCreateTemplate(cloudstackTestCase):
                                 self.apiclient,
                                 self.services["template_1"],
                                 self.volume.id,
-                                account=self.account.account.name,
-                                domainid=self.account.account.domainid
+                                account=self.account.name,
+                                domainid=self.account.domainid
                                 )
         self.cleanup.append(template)
 
@@ -332,7 +332,7 @@ class TestTemplates(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
@@ -343,8 +343,8 @@ class TestTemplates(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["virtual_machine"],
                                     templateid=template.id,
-                                    accountid=cls.account.account.name,
-                                    domainid=cls.account.account.domainid,
+                                    accountid=cls.account.name,
+                                    domainid=cls.account.domainid,
                                     serviceofferingid=cls.service_offering.id,
                                     mode=cls.services["mode"]
                                     )
@@ -393,15 +393,15 @@ class TestTemplates(cloudstackTestCase):
                                          cls.api_client,
                                          cls.services["template_1"],
                                          cls.volume.id,
-                                         account=cls.account.account.name,
-                                         domainid=cls.account.account.domainid
+                                         account=cls.account.name,
+                                         domainid=cls.account.domainid
                                          )
         cls.template_2 = Template.create(
                                          cls.api_client,
                                          cls.services["template_2"],
                                          cls.volume.id,
-                                         account=cls.account.account.name,
-                                         domainid=cls.account.account.domainid
+                                         account=cls.account.name,
+                                         domainid=cls.account.domainid
                                          )
         cls._cleanup = [
                         cls.service_offering,
@@ -474,8 +474,8 @@ class TestTemplates(cloudstackTestCase):
                                     templatefilter=\
                                     self.services["templatefilter"],
                                     id=self.template_1.id,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
             if isinstance(list_template_response, list):
                 break
@@ -540,8 +540,8 @@ class TestTemplates(cloudstackTestCase):
                                     templatefilter=\
                                     self.services["templatefilter"],
                                     id=self.template_1.id,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         # Verify template is deleted properly using ListTemplates
         self.assertEqual(
@@ -626,8 +626,8 @@ class TestTemplates(cloudstackTestCase):
                                     self.apiclient,
                                     templatefilter='featured',
                                     id=self.template_2.id,
-                                    account=self.account.account.name,
-                                    domainid=self.account.account.domainid
+                                    account=self.account.name,
+                                    domainid=self.account.domainid
                                     )
         self.assertEqual(
                             isinstance(list_template_response, list),


Mime
View raw message