cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject [12/20] CLOUDSTACK-2323: fix test scripts to conform with library changes
Date Mon, 06 May 2013 10:28:37 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py
index 452c034..96eb9aa 100644
--- a/test/integration/component/test_routers.py
+++ b/test/integration/component/test_routers.py
@@ -127,16 +127,16 @@ class TestRouterServices(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["virtual_machine"],
                                     templateid=cls.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["virtual_machine"],
                                     templateid=cls.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 = [
@@ -189,8 +189,8 @@ class TestRouterServices(cloudstackTestCase):
 
         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(
@@ -216,8 +216,8 @@ class TestRouterServices(cloudstackTestCase):
         # Network state associated with account should be 'Implemented'
         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),
@@ -243,8 +243,8 @@ class TestRouterServices(cloudstackTestCase):
         # VM state associated with account should be 'Running'
         virtual_machines = 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(
@@ -271,8 +271,8 @@ class TestRouterServices(cloudstackTestCase):
         # Check status of DNS, DHCP, FIrewall, LB VPN processes
         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):
 
         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(
@@ -360,8 +360,8 @@ class TestRouterServices(cloudstackTestCase):
         # Network state associated with account should be 'Implemented'
         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),
@@ -387,8 +387,8 @@ class TestRouterServices(cloudstackTestCase):
         # VM state associated with account should be 'Running'
         virtual_machines = 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(
@@ -445,8 +445,8 @@ class TestRouterServices(cloudstackTestCase):
 
         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(
@@ -488,8 +488,8 @@ class TestRouterServices(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.debug("Deployed a VM with ID: %s" % vm.id)
@@ -497,8 +497,8 @@ class TestRouterServices(cloudstackTestCase):
         virtual_machines = list_virtual_machines(
                                 self.apiclient,
                                 id=vm.id,
-                                account=self.account.account.name,
-                                domainid=self.account.account.domainid,
+                                account=self.account.name,
+                                domainid=self.account.domainid,
                                 )
 
         self.assertEqual(
@@ -522,8 +522,8 @@ class TestRouterServices(cloudstackTestCase):
 
         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(
@@ -554,8 +554,8 @@ class TestRouterServices(cloudstackTestCase):
         virtual_machines = list_virtual_machines(
                                 self.apiclient,
                                 id=self.vm_1.id,
-                                account=self.account.account.name,
-                                domainid=self.account.account.domainid,
+                                account=self.account.name,
+                                domainid=self.account.domainid,
                                 )
 
         self.assertEqual(
@@ -615,8 +615,8 @@ class TestRouterStopCreatePF(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 = [
@@ -668,8 +668,8 @@ class TestRouterStopCreatePF(cloudstackTestCase):
         # Get router details associated for that 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(
@@ -693,8 +693,8 @@ class TestRouterStopCreatePF(cloudstackTestCase):
 
         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),
@@ -711,8 +711,8 @@ class TestRouterStopCreatePF(cloudstackTestCase):
 
         public_ips = list_publicIP(
                                    self.apiclient,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid,
+                                   account=self.account.name,
+                                   domainid=self.account.domainid,
                                    zoneid=self.zone.id
                                    )
         self.assertEqual(
@@ -749,8 +749,8 @@ class TestRouterStopCreatePF(cloudstackTestCase):
 
         routers = list_routers(
                                self.apiclient,
-                               account=self.account.account.name,
-                               domainid=self.account.account.domainid,
+                               account=self.account.name,
+                               domainid=self.account.domainid,
                                zoneid=self.zone.id
                                )
         self.assertEqual(
@@ -827,8 +827,8 @@ class TestRouterStopCreateLB(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 = [
@@ -874,8 +874,8 @@ class TestRouterStopCreateLB(cloudstackTestCase):
         # Get router details associated for that 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(
@@ -900,8 +900,8 @@ class TestRouterStopCreateLB(cloudstackTestCase):
 
         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),
@@ -918,8 +918,8 @@ class TestRouterStopCreateLB(cloudstackTestCase):
 
         public_ips = 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(public_ips, list),
@@ -943,7 +943,7 @@ class TestRouterStopCreateLB(cloudstackTestCase):
                                           self.apiclient,
                                           self.services["lbrule"],
                                           public_ip.id,
-                                          accountid=self.account.account.name
+                                          accountid=self.account.name
                                           )
         self.debug("Assigning VM %s to LB rule: %s" % (
                                                        self.vm_1.id,
@@ -958,8 +958,8 @@ class TestRouterStopCreateLB(cloudstackTestCase):
 
         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),
@@ -1038,8 +1038,8 @@ class TestRouterStopCreateFW(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 = [
@@ -1084,8 +1084,8 @@ class TestRouterStopCreateFW(cloudstackTestCase):
         # Get the router details associated with 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(
@@ -1110,8 +1110,8 @@ class TestRouterStopCreateFW(cloudstackTestCase):
 
         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),
@@ -1128,8 +1128,8 @@ class TestRouterStopCreateFW(cloudstackTestCase):
 
         public_ips = 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(public_ips, list),
@@ -1157,8 +1157,8 @@ class TestRouterStopCreateFW(cloudstackTestCase):
 
         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),

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_security_groups.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_security_groups.py b/test/integration/component/test_security_groups.py
index 7459d2a..fe2561a 100644
--- a/test/integration/component/test_security_groups.py
+++ b/test/integration/component/test_security_groups.py
@@ -144,7 +144,7 @@ class TestDefaultSecurityGroup(cloudstackTestCase):
                             admin=True,
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls._cleanup = [
                         cls.account,
@@ -178,8 +178,8 @@ class TestDefaultSecurityGroup(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id
                                 )
         self.debug("Deployed VM with ID: %s" % self.virtual_machine.id)
@@ -222,7 +222,7 @@ class TestDefaultSecurityGroup(cloudstackTestCase):
         # Verify List Routers response for account
         self.debug(
                    "Verify list routers response for account: %s" \
-                   % self.account.account.name
+                   % self.account.name
                    )
         routers = list_routers(
                                self.apiclient,
@@ -256,8 +256,8 @@ class TestDefaultSecurityGroup(cloudstackTestCase):
 
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -292,8 +292,8 @@ class TestDefaultSecurityGroup(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id
                                 )
         self.debug("Deployed VM with ID: %s" % self.virtual_machine.id)
@@ -336,8 +336,8 @@ class TestDefaultSecurityGroup(cloudstackTestCase):
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -416,7 +416,7 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -450,15 +450,15 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -475,8 +475,8 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
         ingress_rule = security_group.authorize(
                                 self.apiclient,
                                 self.services["security_group"],
-                                account=self.account.account.name,
-                                domainid=self.account.account.domainid
+                                account=self.account.name,
+                                domainid=self.account.domainid
                                 )
         self.assertEqual(
                           isinstance(ingress_rule, dict),
@@ -489,12 +489,12 @@ class TestAuthorizeIngressRule(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
         # Should be able to SSH VM
         try:
             self.debug("SSH into VM: %s" % self.virtual_machine.id)
@@ -552,7 +552,7 @@ class TestRevokeIngressRule(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -587,16 +587,16 @@ class TestRevokeIngressRule(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
 
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -615,8 +615,8 @@ class TestRevokeIngressRule(cloudstackTestCase):
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         self.assertEqual(
@@ -629,12 +629,12 @@ class TestRevokeIngressRule(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Should be able to SSH VM
         try:
@@ -712,12 +712,12 @@ class TestDhcpOnlyRouter(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         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 = [
@@ -849,7 +849,7 @@ class TestdeployVMWithUserData(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
         cls._cleanup = [
                         cls.account,
                         cls.service_offering
@@ -897,15 +897,15 @@ class TestdeployVMWithUserData(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -922,15 +922,15 @@ class TestdeployVMWithUserData(cloudstackTestCase):
             "Authorize Ingress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
 
         # Authorize Security group to SSH to VM
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                           isinstance(ingress_rule, dict),
@@ -940,12 +940,12 @@ class TestdeployVMWithUserData(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
         # Should be able to SSH VM
         try:
             self.debug(
@@ -1009,7 +1009,7 @@ class TestDeleteSecurityGroup(cloudstackTestCase):
                             self.services["account"],
                             domainid=self.domain.id
                             )
-        self.services["account"] = self.account.account.name
+        self.services["account"] = self.account.name
         self.cleanup = [
                         self.account,
                         self.service_offering
@@ -1059,15 +1059,15 @@ class TestDeleteSecurityGroup(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -1084,15 +1084,15 @@ class TestDeleteSecurityGroup(cloudstackTestCase):
             "Authorize Ingress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
 
         # Authorize Security group to SSH to VM
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                           isinstance(ingress_rule, dict),
@@ -1103,12 +1103,12 @@ class TestDeleteSecurityGroup(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Deleting Security group should raise exception
         security_group.delete(self.apiclient)
@@ -1143,15 +1143,15 @@ class TestDeleteSecurityGroup(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -1168,14 +1168,14 @@ class TestDeleteSecurityGroup(cloudstackTestCase):
             "Authorize Ingress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
         # Authorize Security group to SSH to VM
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                           isinstance(ingress_rule, dict),
@@ -1186,12 +1186,12 @@ class TestDeleteSecurityGroup(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Destroy the VM
         self.virtual_machine.delete(self.apiclient)
@@ -1255,7 +1255,7 @@ class TestIngressRule(cloudstackTestCase):
                             self.services["account"],
                             domainid=self.domain.id
                             )
-        self.services["account"] = self.account.account.name
+        self.services["account"] = self.account.name
         self.cleanup = [
                         self.account,
                         self.service_offering
@@ -1305,15 +1305,15 @@ class TestIngressRule(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -1329,15 +1329,15 @@ class TestIngressRule(cloudstackTestCase):
             "Authorize Ingress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
 
         # Authorize Security group to SSH to VM
         ingress_rule_1 = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                           isinstance(ingress_rule_1, dict),
@@ -1347,25 +1347,25 @@ class TestIngressRule(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         self.debug(
             "Authorize Ingress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
         # Authorize Security group to SSH to VM
         ingress_rule_2 = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group_2"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                           isinstance(ingress_rule_2, dict),
@@ -1421,16 +1421,16 @@ class TestIngressRule(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
 
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -1447,15 +1447,15 @@ class TestIngressRule(cloudstackTestCase):
             "Authorize Ingress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
 
         # Authorize Security group to SSH to VM
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                           isinstance(ingress_rule, dict),
@@ -1465,26 +1465,26 @@ class TestIngressRule(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         self.debug(
             "Authorize Ingress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
 
         # Authorize Security group to SSH to VM
         ingress_rule_2 = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group_2"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                           isinstance(ingress_rule_2, dict),
@@ -1528,7 +1528,7 @@ class TestIngressRule(cloudstackTestCase):
             "Revoke Ingress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
 
         result = security_group.revoke(
@@ -1573,15 +1573,15 @@ class TestIngressRule(cloudstackTestCase):
         security_group = SecurityGroup.create(
                                               self.apiclient,
                                               self.services["security_group"],
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.debug("Created security group with ID: %s" % security_group.id)
         # Default Security group should not have any ingress rule
         sercurity_groups = SecurityGroup.list(
                                               self.apiclient,
-                                              account=self.account.account.name,
-                                              domainid=self.account.account.domainid
+                                              account=self.account.name,
+                                              domainid=self.account.domainid
                                               )
         self.assertEqual(
                          isinstance(sercurity_groups, list),
@@ -1599,15 +1599,15 @@ class TestIngressRule(cloudstackTestCase):
             "Authorize Ingress Rule for Security Group %s for account: %s" \
                 % (
                     security_group.id,
-                    self.account.account.name
+                    self.account.name
                 ))
 
         # Authorize Security group to SSH to VM
         ingress_rule = security_group.authorize(
                                         self.apiclient,
                                         self.services["security_group"],
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                           isinstance(ingress_rule, dict),
@@ -1618,12 +1618,12 @@ class TestIngressRule(cloudstackTestCase):
         self.virtual_machine = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     securitygroupids=[security_group.id]
                                 )
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # SSH should be allowed on 22 port
         try:

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_snapshots.py b/test/integration/component/test_snapshots.py
index 5567917..014b55a 100644
--- a/test/integration/component/test_snapshots.py
+++ b/test/integration/component/test_snapshots.py
@@ -152,7 +152,7 @@ class TestSnapshotRootDisk(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,
@@ -163,8 +163,8 @@ class TestSnapshotRootDisk(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["server_without_disk"],
                                 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"]
                                 )
@@ -220,8 +220,8 @@ class TestSnapshotRootDisk(cloudstackTestCase):
         snapshot = Snapshot.create(
                                    self.apiclient,
                                    volumes[0].id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                    )
         self.debug("Snapshot created: ID - %s" % snapshot.id)
 
@@ -384,7 +384,7 @@ class TestSnapshots(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,
@@ -395,8 +395,8 @@ class TestSnapshots(cloudstackTestCase):
                                 cls.api_client,
                                 cls.services["server_with_disk"],
                                 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"]
                                 )
@@ -405,8 +405,8 @@ class TestSnapshots(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["server_without_disk"],
                                     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"]
                                     )
@@ -462,8 +462,8 @@ class TestSnapshots(cloudstackTestCase):
         snapshot = Snapshot.create(
                                    self.apiclient,
                                    volume[0].id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                    )
         snapshots = list_snapshots(
                                   self.apiclient,
@@ -663,8 +663,8 @@ class TestSnapshots(cloudstackTestCase):
         snapshot = Snapshot.create(
                                    self.apiclient,
                                    volume_response.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                    )
         self.debug("Created Snapshot from volume: %s" % volume_response.id)
 
@@ -674,8 +674,8 @@ class TestSnapshots(cloudstackTestCase):
                                         self.apiclient,
                                         snapshot.id,
                                         self.services,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
 
         volumes = list_volumes(
@@ -789,8 +789,8 @@ class TestSnapshots(cloudstackTestCase):
         snapshot = Snapshot.create(
                                    self.apiclient,
                                    volumes[0].id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                    )
         snapshot.delete(self.apiclient)
 
@@ -1079,8 +1079,8 @@ class TestSnapshots(cloudstackTestCase):
         snapshot = Snapshot.create(
                                    self.apiclient,
                                    volume.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                    )
 
         self.debug("Snapshot created from volume ID: %s" % volume.id)
@@ -1118,8 +1118,8 @@ class TestSnapshots(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["server_without_disk"],
                                     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,
                                     mode=self.services["mode"]
                                     )
@@ -1209,7 +1209,7 @@ class TestCreateVMsnapshotTemplate(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,
@@ -1269,8 +1269,8 @@ class TestCreateVMsnapshotTemplate(cloudstackTestCase):
                                 self.apiclient,
                                 self.services["server"],
                                 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.debug("Created VM with ID: %s" % self.virtual_machine.id)
@@ -1359,8 +1359,8 @@ class TestCreateVMsnapshotTemplate(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.debug("Created VM with ID: %s from template: %s" % (
@@ -1373,8 +1373,8 @@ class TestCreateVMsnapshotTemplate(cloudstackTestCase):
         virtual_machines = list_virtual_machines(
                                 self.apiclient,
                                 id=new_virtual_machine.id,
-                                account=self.account.account.name,
-                                domainid=self.account.account.domainid
+                                account=self.account.name,
+                                domainid=self.account.domainid
                                 )
         self.assertEqual(
                             isinstance(virtual_machines, list),
@@ -1505,7 +1505,7 @@ class TestAccountSnapshotClean(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,
@@ -1515,8 +1515,8 @@ class TestAccountSnapshotClean(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
                                 )
         # Get the Root disk of VM
@@ -1577,7 +1577,7 @@ class TestAccountSnapshotClean(cloudstackTestCase):
 
         accounts = list_accounts(
                                  self.apiclient,
-                                 id=self.account.account.id
+                                 id=self.account.id
                                  )
         self.assertEqual(
                             isinstance(accounts, list),
@@ -1737,7 +1737,7 @@ class TestAccountSnapshotClean(cloudstackTestCase):
                         "Check snapshot UUID in secondary storage and database"
                         )
 
-        self.debug("Deleting account: %s" % self.account.account.name)
+        self.debug("Deleting account: %s" % self.account.name)
         # Delete account
         self.account.delete(self.apiclient)
 
@@ -1757,7 +1757,7 @@ class TestAccountSnapshotClean(cloudstackTestCase):
 
         accounts = list_accounts(
                                  self.apiclient,
-                                 id=self.account.account.id
+                                 id=self.account.id
                                  )
 
         self.assertEqual(
@@ -1859,7 +1859,7 @@ class TestSnapshotDetachedDisk(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,
@@ -1869,8 +1869,8 @@ class TestSnapshotDetachedDisk(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"]
                                 )
@@ -2142,7 +2142,7 @@ class TestSnapshotLimit(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,
@@ -2152,8 +2152,8 @@ class TestSnapshotLimit(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 = [
@@ -2401,7 +2401,7 @@ class TestSnapshotEvents(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,
@@ -2411,8 +2411,8 @@ class TestSnapshotEvents(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
                                 )
 
@@ -2498,8 +2498,8 @@ class TestSnapshotEvents(cloudstackTestCase):
         time.sleep(self.services["sleep"])
         events = list_events(
                              self.apiclient,
-                             account=self.account.account.name,
-                             domainid=self.account.account.domainid,
+                             account=self.account.name,
+                             domainid=self.account.domainid,
                              type='SNAPSHOT.DELETE'
                              )
         self.assertEqual(

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/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 b893b8b..086ec77 100644
--- a/test/integration/component/test_storage_motion.py
+++ b/test/integration/component/test_storage_motion.py
@@ -126,8 +126,8 @@ class TestStorageMotion(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/component/test_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_templates.py b/test/integration/component/test_templates.py
index a743bf7..3867fb4 100644
--- a/test/integration/component/test_templates.py
+++ b/test/integration/component/test_templates.py
@@ -139,7 +139,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._cleanup = [
                         cls.account,
@@ -183,8 +183,8 @@ class TestCreateTemplate(cloudstackTestCase):
                                         self.apiclient,
                                         v,
                                         zoneid=self.zone.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
             self.debug(
                 "Registered a template of format: %s with ID: %s" % (
@@ -205,8 +205,8 @@ class TestCreateTemplate(cloudstackTestCase):
                                     self.services["templatefilter"],
                                     id=template.id,
                                     zoneid=self.zone.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
@@ -240,8 +240,8 @@ class TestCreateTemplate(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["virtual_machine"],
                                     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,
                                     mode=self.services["mode"]
                                     )
@@ -249,8 +249,8 @@ class TestCreateTemplate(cloudstackTestCase):
             vm_response = list_virtual_machines(
                                         self.apiclient,
                                         id=virtual_machine.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
             self.assertEqual(
                              isinstance(vm_response, list),
@@ -304,7 +304,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,
                                             cls.services["service_offering"]
@@ -315,8 +315,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,
                                     )
         #Stop virtual machine
@@ -396,8 +396,8 @@ class TestTemplates(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,
                                     )
 
@@ -406,8 +406,8 @@ class TestTemplates(cloudstackTestCase):
         vm_response = list_virtual_machines(
                                         self.apiclient,
                                         id=virtual_machine.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         #Verify VM response to check whether VM deployment was successful
         self.assertNotEqual(
@@ -591,8 +591,8 @@ class TestTemplates(cloudstackTestCase):
         snapshot = Snapshot.create(
                                    self.apiclient,
                                    volume.id,
-                                   account=self.account.account.name,
-                                   domainid=self.account.account.domainid
+                                   account=self.account.name,
+                                   domainid=self.account.domainid
                                    )
         self.debug("Creating a template from snapshot: %s" % snapshot.id)
         # Generate template from the snapshot
@@ -626,8 +626,8 @@ class TestTemplates(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["virtual_machine"],
                                     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.cleanup.append(virtual_machine)
@@ -635,8 +635,8 @@ class TestTemplates(cloudstackTestCase):
         vm_response = list_virtual_machines(
                                         self.apiclient,
                                         id=virtual_machine.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid
+                                        account=self.account.name,
+                                        domainid=self.account.domainid
                                         )
         self.assertEqual(
                         isinstance(vm_response, list),


Mime
View raw message