cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [30/42] CLOUDSTACK-2323: fix test scripts to conform with library changes
Date Mon, 06 May 2013 18:58:40 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_network_offering.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_network_offering.py b/test/integration/component/test_network_offering.py
index 8b12525..00566a0 100644
--- a/test/integration/component/test_network_offering.py
+++ b/test/integration/component/test_network_offering.py
@@ -256,21 +256,21 @@ class TestNOVirtualRouter(cloudstackTestCase):
         self.network = Network.create(
                                     self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
                                     zoneid=self.zone.id
                                     )
         self.debug("Created network with ID: %s" % self.network.id)
 
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Spawn an instance in that network
         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,
                                   networkids=[str(self.network.id)]
                                   )
@@ -279,8 +279,8 @@ class TestNOVirtualRouter(cloudstackTestCase):
         src_nat_list = PublicIPAddress.list(
                                         self.apiclient,
                                         associatednetworkid=self.network.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid,
+                                        account=self.account.name,
+                                        domainid=self.account.domainid,
                                         listall=True,
                                         issourcenat=True,
                                         )
@@ -305,7 +305,7 @@ class TestNOVirtualRouter(cloudstackTestCase):
                                           self.apiclient,
                                           self.services["lbrule"],
                                           ipaddressid=src_nat.id,
-                                          accountid=self.account.account.name
+                                          accountid=self.account.name
                                        )
         self.debug(
             "Trying to create a port forwarding rule in source NAT: %s" %
@@ -322,18 +322,18 @@ class TestNOVirtualRouter(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % self.network.id)
         ip_with_nat_rule = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
-                                    domainid=self.account.account.domainid,
+                                    domainid=self.account.domainid,
                                     networkid=self.network.id
                                     )
 
         self.debug("Associated %s with network %s" % (
-                                        ip_with_nat_rule.ipaddress.ipaddress,
+                                        ip_with_nat_rule.ipaddress,
                                         self.network.id
                                         ))
         self.debug("Creating PF rule for IP address: %s" %
-                                        ip_with_nat_rule.ipaddress.ipaddress)
+                                        ip_with_nat_rule.ipaddress)
         NATRule.create(
                          self.apiclient,
                          virtual_machine,
@@ -342,7 +342,7 @@ class TestNOVirtualRouter(cloudstackTestCase):
                       )
 
         self.debug("Trying to create LB rule on IP with NAT: %s" %
-                                    ip_with_nat_rule.ipaddress.ipaddress)
+                                    ip_with_nat_rule.ipaddress)
 
         # Create Load Balancer rule on IP already having NAT rule
         with self.assertRaises(Exception):
@@ -350,7 +350,7 @@ class TestNOVirtualRouter(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=ip_with_nat_rule.ipaddress.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                     )
         self.debug("Creating PF rule with public port: 66")
 
@@ -376,27 +376,27 @@ class TestNOVirtualRouter(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % self.network.id)
         ip_with_lb_rule = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
-                                domainid=self.account.account.domainid,
+                                domainid=self.account.domainid,
                                 networkid=self.network.id
                                 )
         self.debug("Associated %s with network %s" % (
-                                        ip_with_lb_rule.ipaddress.ipaddress,
+                                        ip_with_lb_rule.ipaddress,
                                         self.network.id
                                         ))
         self.debug("Creating LB rule for IP address: %s" %
-                                        ip_with_lb_rule.ipaddress.ipaddress)
+                                        ip_with_lb_rule.ipaddress)
 
         LoadBalancerRule.create(
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=ip_with_lb_rule.ipaddress.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                 )
 
         self.debug("Trying to create PF rule on IP with LB rule: %s" %
-                ip_with_nat_rule.ipaddress.ipaddress)
+                ip_with_nat_rule.ipaddress)
 
         with self.assertRaises(Exception):
             NATRule.create(
@@ -411,7 +411,7 @@ class TestNOVirtualRouter(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule_port_2221"],
                                     ipaddressid=ip_with_lb_rule.ipaddress.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                 )
 
         # Check if NAT rule created successfully
@@ -499,21 +499,21 @@ class TestNOVirtualRouter(cloudstackTestCase):
         self.network = Network.create(
                                     self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
                                     zoneid=self.zone.id
                                     )
         self.debug("Created network with ID: %s" % self.network.id)
 
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Spawn an instance in that network
         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,
                                   networkids=[str(self.network.id)]
                                   )
@@ -522,8 +522,8 @@ class TestNOVirtualRouter(cloudstackTestCase):
         src_nat_list = PublicIPAddress.list(
                                         self.apiclient,
                                         associatednetworkid=self.network.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid,
+                                        account=self.account.name,
+                                        domainid=self.account.domainid,
                                         listall=True,
                                         issourcenat=True,
                                         )
@@ -547,7 +547,7 @@ class TestNOVirtualRouter(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=src_nat.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                 )
         self.debug("Created LB rule on source NAT: %s" % src_nat.ipaddress)
 
@@ -624,18 +624,18 @@ class TestNOVirtualRouter(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % self.network.id)
         public_ip = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
-                                    domainid=self.account.account.domainid,
+                                    domainid=self.account.domainid,
                                     networkid=self.network.id
                                     )
 
         self.debug("Associated %s with network %s" % (
-                                        public_ip.ipaddress.ipaddress,
+                                        public_ip.ipaddress,
                                         self.network.id
                                         ))
         self.debug("Creating PF rule for IP address: %s" %
-                                        public_ip.ipaddress.ipaddress)
+                                        public_ip.ipaddress)
         NATRule.create(
                        self.apiclient,
                        virtual_machine,
@@ -644,14 +644,14 @@ class TestNOVirtualRouter(cloudstackTestCase):
                       )
 
         self.debug("Trying to create LB rule on IP with NAT: %s" %
-                                    public_ip.ipaddress.ipaddress)
+                                    public_ip.ipaddress)
 
         # Create Load Balancer rule on IP already having NAT rule
         lb_rule = LoadBalancerRule.create(
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=public_ip.ipaddress.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                     )
         self.debug("Creating PF rule with public port: 66")
 
@@ -679,7 +679,7 @@ class TestNOVirtualRouter(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule_port_2221"],
                                     ipaddressid=public_ip.ipaddress.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                 )
 
         # Check if NAT rule created successfully
@@ -700,8 +700,8 @@ class TestNOVirtualRouter(cloudstackTestCase):
         vpn = Vpn.create(
                         self.apiclient,
                         src_nat.id,
-                        account=self.account.account.name,
-                        domainid=self.account.account.domainid
+                        account=self.account.name,
+                        domainid=self.account.domainid
                         )
 
         vpns = Vpn.list(
@@ -834,21 +834,21 @@ class TestNOWithNetscaler(cloudstackTestCase):
         self.network = Network.create(
                                     self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
                                     zoneid=self.zone.id
                                     )
         self.debug("Created network with ID: %s" % self.network.id)
 
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Spawn an instance in that network
         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,
                                   networkids=[str(self.network.id)]
                                   )
@@ -857,8 +857,8 @@ class TestNOWithNetscaler(cloudstackTestCase):
         src_nat_list = PublicIPAddress.list(
                                         self.apiclient,
                                         associatednetworkid=self.network.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid,
+                                        account=self.account.name,
+                                        domainid=self.account.domainid,
                                         listall=True,
                                         issourcenat=True,
                                         )
@@ -883,7 +883,7 @@ class TestNOWithNetscaler(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=src_nat.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                 )
 
         self.debug(
@@ -930,18 +930,18 @@ class TestNOWithNetscaler(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % self.network.id)
         ip_with_nat_rule = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
-                                    domainid=self.account.account.domainid,
+                                    domainid=self.account.domainid,
                                     networkid=self.network.id
                                     )
 
         self.debug("Associated %s with network %s" % (
-                                        ip_with_nat_rule.ipaddress.ipaddress,
+                                        ip_with_nat_rule.ipaddress,
                                         self.network.id
                                         ))
         self.debug("Creating PF rule for IP address: %s" %
-                                        ip_with_nat_rule.ipaddress.ipaddress)
+                                        ip_with_nat_rule.ipaddress)
         NATRule.create(
                          self.apiclient,
                          virtual_machine,
@@ -950,7 +950,7 @@ class TestNOWithNetscaler(cloudstackTestCase):
                       )
 
         self.debug("Trying to create LB rule on IP with NAT: %s" %
-                                    ip_with_nat_rule.ipaddress.ipaddress)
+                                    ip_with_nat_rule.ipaddress)
 
         # Create Load Balancer rule on IP already having NAT rule
         with self.assertRaises(Exception):
@@ -958,7 +958,7 @@ class TestNOWithNetscaler(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=ip_with_nat_rule.ipaddress.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                     )
         self.debug("Creating PF rule with public port: 66")
 
@@ -984,28 +984,28 @@ class TestNOWithNetscaler(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % self.network.id)
         ip_with_lb_rule = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
-                                domainid=self.account.account.domainid,
+                                domainid=self.account.domainid,
                                 networkid=self.network.id
                                 )
         self.debug("Associated %s with network %s" % (
-                                        ip_with_lb_rule.ipaddress.ipaddress,
+                                        ip_with_lb_rule.ipaddress,
                                         self.network.id
                                         ))
         self.debug("Creating LB rule for IP address: %s" %
-                                        ip_with_lb_rule.ipaddress.ipaddress)
+                                        ip_with_lb_rule.ipaddress)
 
         LoadBalancerRule.create(
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=ip_with_lb_rule.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=self.network.id
                                 )
 
         self.debug("Trying to create PF rule on IP with LB rule: %s" %
-                                        ip_with_nat_rule.ipaddress.ipaddress)
+                                        ip_with_nat_rule.ipaddress)
 
         with self.assertRaises(Exception):
             NATRule.create(
@@ -1031,7 +1031,7 @@ class TestNOWithNetscaler(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule_port_2221"],
                                     ipaddressid=ip_with_lb_rule.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=self.network.id
                                 )
 
@@ -1054,8 +1054,8 @@ class TestNOWithNetscaler(cloudstackTestCase):
             Vpn.create(
                         self.apiclient,
                         src_nat.id,
-                        account=self.account.account.name,
-                        domainid=self.account.account.domainid
+                        account=self.account.name,
+                        domainid=self.account.domainid
                         )
         return
 
@@ -1104,21 +1104,21 @@ class TestNOWithNetscaler(cloudstackTestCase):
         self.network = Network.create(
                                     self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
                                     zoneid=self.zone.id
                                     )
         self.debug("Created network with ID: %s" % self.network.id)
 
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Spawn an instance in that network
         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,
                                   networkids=[str(self.network.id)]
                                   )
@@ -1127,8 +1127,8 @@ class TestNOWithNetscaler(cloudstackTestCase):
         src_nat_list = PublicIPAddress.list(
                                         self.apiclient,
                                         associatednetworkid=self.network.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid,
+                                        account=self.account.name,
+                                        domainid=self.account.domainid,
                                         listall=True,
                                         issourcenat=True,
                                         )
@@ -1153,7 +1153,7 @@ class TestNOWithNetscaler(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=src_nat.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                 )
 
         self.debug(
@@ -1213,18 +1213,18 @@ class TestNOWithNetscaler(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % self.network.id)
         ip_with_nat_rule = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
-                                    domainid=self.account.account.domainid,
+                                    domainid=self.account.domainid,
                                     networkid=self.network.id
                                     )
 
         self.debug("Associated %s with network %s" % (
-                                        ip_with_nat_rule.ipaddress.ipaddress,
+                                        ip_with_nat_rule.ipaddress,
                                         self.network.id
                                         ))
         self.debug("Creating PF rule for IP address: %s" %
-                                        ip_with_nat_rule.ipaddress.ipaddress)
+                                        ip_with_nat_rule.ipaddress)
         NATRule.create(
                          self.apiclient,
                          virtual_machine,
@@ -1233,7 +1233,7 @@ class TestNOWithNetscaler(cloudstackTestCase):
                       )
 
         self.debug("Trying to create LB rule on IP with NAT: %s" %
-                                    ip_with_nat_rule.ipaddress.ipaddress)
+                                    ip_with_nat_rule.ipaddress)
 
         # Create Load Balancer rule on IP already having NAT rule
         with self.assertRaises(Exception):
@@ -1241,7 +1241,7 @@ class TestNOWithNetscaler(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=ip_with_nat_rule.ipaddress.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                     )
         self.debug("Creating PF rule with public port: 66")
 
@@ -1267,28 +1267,28 @@ class TestNOWithNetscaler(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % self.network.id)
         ip_with_lb_rule = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
-                                domainid=self.account.account.domainid,
+                                domainid=self.account.domainid,
                                 networkid=self.network.id
                                 )
         self.debug("Associated %s with network %s" % (
-                                        ip_with_lb_rule.ipaddress.ipaddress,
+                                        ip_with_lb_rule.ipaddress,
                                         self.network.id
                                         ))
         self.debug("Creating LB rule for IP address: %s" %
-                                        ip_with_lb_rule.ipaddress.ipaddress)
+                                        ip_with_lb_rule.ipaddress)
 
         LoadBalancerRule.create(
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=ip_with_lb_rule.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=self.network.id
                                 )
 
         self.debug("Trying to create PF rule on IP with LB rule: %s" %
-                                        ip_with_nat_rule.ipaddress.ipaddress)
+                                        ip_with_nat_rule.ipaddress)
 
         with self.assertRaises(Exception):
             NATRule.create(
@@ -1314,7 +1314,7 @@ class TestNOWithNetscaler(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule_port_2221"],
                                     ipaddressid=ip_with_lb_rule.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=self.network.id
                                 )
 
@@ -1336,8 +1336,8 @@ class TestNOWithNetscaler(cloudstackTestCase):
         vpn = Vpn.create(
                         self.apiclient,
                         src_nat.id,
-                        account=self.account.account.name,
-                        domainid=self.account.account.domainid
+                        account=self.account.name,
+                        domainid=self.account.domainid
                         )
 
         vpns = Vpn.list(
@@ -1457,21 +1457,21 @@ class TestNetworkUpgrade(cloudstackTestCase):
         self.network = Network.create(
                                     self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
                                     zoneid=self.zone.id
                                     )
         self.debug("Created network with ID: %s" % self.network.id)
 
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Spawn an instance in that network
         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,
                                   networkids=[str(self.network.id)]
                                   )
@@ -1480,8 +1480,8 @@ class TestNetworkUpgrade(cloudstackTestCase):
         src_nat_list = PublicIPAddress.list(
                                         self.apiclient,
                                         associatednetworkid=self.network.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid,
+                                        account=self.account.name,
+                                        domainid=self.account.domainid,
                                         listall=True,
                                         issourcenat=True,
                                         )
@@ -1504,7 +1504,7 @@ class TestNetworkUpgrade(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=src_nat.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                 )
         self.debug("Created LB rule on source NAT: %s" % src_nat.ipaddress)
 
@@ -1585,8 +1585,8 @@ class TestNetworkUpgrade(cloudstackTestCase):
         vpn = Vpn.create(
                         self.apiclient,
                         src_nat.id,
-                        account=self.account.account.name,
-                        domainid=self.account.account.domainid
+                        account=self.account.name,
+                        domainid=self.account.domainid
                         )
 
         vpns = Vpn.list(
@@ -1657,21 +1657,21 @@ class TestNetworkUpgrade(cloudstackTestCase):
         self.network = Network.create(
                                     self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
                                     zoneid=self.zone.id
                                     )
         self.debug("Created network with ID: %s" % self.network.id)
 
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
 
         # Spawn an instance in that network
         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,
                                   networkids=[str(self.network.id)]
                                   )
@@ -1680,8 +1680,8 @@ class TestNetworkUpgrade(cloudstackTestCase):
         src_nat_list = PublicIPAddress.list(
                                         self.apiclient,
                                         associatednetworkid=self.network.id,
-                                        account=self.account.account.name,
-                                        domainid=self.account.account.domainid,
+                                        account=self.account.name,
+                                        domainid=self.account.domainid,
                                         listall=True,
                                         issourcenat=True,
                                         )
@@ -1704,7 +1704,7 @@ class TestNetworkUpgrade(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=src_nat.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                 )
         self.debug("Created LB rule on source NAT: %s" % src_nat.ipaddress)
 
@@ -1785,8 +1785,8 @@ class TestNetworkUpgrade(cloudstackTestCase):
         vpn = Vpn.create(
                         self.apiclient,
                         src_nat.id,
-                        account=self.account.account.name,
-                        domainid=self.account.account.domainid
+                        account=self.account.name,
+                        domainid=self.account.domainid
                         )
 
         vpns = Vpn.list(
@@ -1921,21 +1921,21 @@ class TestSharedNetworkWithoutIp(cloudstackTestCase):
         self.network = Network.create(
                                     self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     networkofferingid=shared_nw_off.id,
                                     zoneid=self.zone.id
                                     )
         self.debug("Created network with ID: %s" % self.network.id)
 
-        self.debug("Deploying VM in account: %s" % self.account.account.name)
+        self.debug("Deploying VM in account: %s" % self.account.name)
         try:
             # Spawn an instance in that network
             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,
                                   networkids=[str(self.network.id)]
                                   )

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_project_configs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_configs.py b/test/integration/component/test_project_configs.py
index f1469f2..fa2ee0a 100644
--- a/test/integration/component/test_project_configs.py
+++ b/test/integration/component/test_project_configs.py
@@ -206,8 +206,8 @@ class TestUserProjectCreation(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -373,8 +373,8 @@ class TestProjectCreationNegative(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -498,8 +498,8 @@ class TestProjectInviteRequired(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -650,8 +650,8 @@ class TestProjectInviteRequiredTrue(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -819,8 +819,8 @@ class TestProjectInviteTimeout(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -945,8 +945,8 @@ class TestProjectInviteTimeout(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -1076,8 +1076,8 @@ class TestProjectInviteTimeout(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -1205,8 +1205,8 @@ class TestProjectInviteTimeout(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -1333,8 +1333,8 @@ class TestProjectInviteTimeout(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_project_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_limits.py b/test/integration/component/test_project_limits.py
index ab13238..4a8b9d4 100644
--- a/test/integration/component/test_project_limits.py
+++ b/test/integration/component/test_project_limits.py
@@ -505,10 +505,10 @@ class TestResourceLimitsProject(cloudstackTestCase):
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         # Create Service offering and disk offerings etc
         cls.service_offering = ServiceOffering.create(
@@ -720,7 +720,7 @@ class TestResourceLimitsProject(cloudstackTestCase):
                               projectid=self.project.id
                               )
 
-        self.debug("Deploying VM for account: %s" % self.account.account.name)
+        self.debug("Deploying VM for account: %s" % self.account.name)
         virtual_machine_1 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
@@ -843,7 +843,7 @@ class TestResourceLimitsProject(cloudstackTestCase):
                               )
         self.debug(
             "Updating template resource limits for domain: %s" %
-                                        self.account.account.domainid)
+                                        self.account.domainid)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
@@ -852,7 +852,7 @@ class TestResourceLimitsProject(cloudstackTestCase):
                               projectid=self.project.id
                               )
 
-        self.debug("Deploying VM for account: %s" % self.account.account.name)
+        self.debug("Deploying VM for account: %s" % self.account.name)
         virtual_machine_1 = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["server"],
@@ -994,13 +994,13 @@ class TestMaxProjectNetworks(cloudstackTestCase):
         # 3. Create network should fail
 
         self.debug("Creating project with '%s' as admin" %
-                                            self.account.account.name)
+                                            self.account.name)
         # Create project as a domain admin
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_project_resources.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_resources.py b/test/integration/component/test_project_resources.py
index 191ceb5..e79254c 100644
--- a/test/integration/component/test_project_resources.py
+++ b/test/integration/component/test_project_resources.py
@@ -220,8 +220,8 @@ class TestOfferings(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -263,8 +263,8 @@ class TestOfferings(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -400,8 +400,8 @@ class TestNetwork(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -546,10 +546,10 @@ class TestTemplates(cloudstackTestCase):
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         # Create Service offering and disk offerings etc
         cls.service_offering = ServiceOffering.create(
@@ -771,10 +771,10 @@ class TestSnapshots(cloudstackTestCase):
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         # Create Service offering and disk offerings etc
         cls.service_offering = ServiceOffering.create(
@@ -872,8 +872,8 @@ class TestSnapshots(cloudstackTestCase):
 
         snapshots = Snapshot.list(
                                   self.apiclient,
-                                  account=self.account.account.name,
-                                  domainid=self.account.account.domainid
+                                  account=self.account.name,
+                                  domainid=self.account.domainid
                                   )
         self.assertEqual(
                     snapshots,
@@ -918,10 +918,10 @@ class TestPublicIpAddress(cloudstackTestCase):
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         # Create Service offering and disk offerings etc
         cls.service_offering = ServiceOffering.create(
@@ -1037,7 +1037,7 @@ class TestPublicIpAddress(cloudstackTestCase):
 
         #Create Load Balancer rule and assign VMs to rule
         self.debug("Created LB rule for public IP: %s" %
-                                        public_ip.ipaddress.ipaddress)
+                                        public_ip.ipaddress)
         lb_rule = LoadBalancerRule.create(
                                           self.apiclient,
                                           self.services["lbrule"],
@@ -1112,13 +1112,13 @@ class TestPublicIpAddress(cloudstackTestCase):
                     "Check end port of firewall rule"
                     )
 
-        self.debug("Deploying VM for account: %s" % self.account.account.name)
+        self.debug("Deploying VM for account: %s" % self.account.name)
         virtual_machine_1 = VirtualMachine.create(
                                 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.cleanup.append(virtual_machine_1)
@@ -1142,17 +1142,17 @@ class TestPublicIpAddress(cloudstackTestCase):
                                   )
 
         self.debug("Creating LB rule for public IP: %s outside project" %
-                                                public_ip.ipaddress.ipaddress)
+                                                public_ip.ipaddress)
         with self.assertRaises(Exception):
             LoadBalancerRule.create(
                                           self.apiclient,
                                           self.services["lbrule"],
                                           public_ip.ipaddress.id,
-                                          accountid=self.account.account.name
+                                          accountid=self.account.name
                                           )
         self.debug(
                 "Creating firewall rule for public IP: %s outside project" %
-                                                public_ip.ipaddress.ipaddress)
+                                                public_ip.ipaddress)
         with self.assertRaises(Exception):
             FireWallRule.create(
                             self.apiclient,
@@ -1219,10 +1219,10 @@ class TestSecurityGroup(cloudstackTestCase):
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls._cleanup = [
                         cls.project,
@@ -1317,8 +1317,8 @@ class TestSecurityGroup(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["server"],
                                     serviceofferingid=self.service_offering.id,
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     securitygroupids=[security_group.id],
                                 )
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_project_usage.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_usage.py b/test/integration/component/test_project_usage.py
index 03c42fd..44ef2f9 100644
--- a/test/integration/component/test_project_usage.py
+++ b/test/integration/component/test_project_usage.py
@@ -142,13 +142,13 @@ class TestVmUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
 
         cls.service_offering = ServiceOffering.create(
@@ -337,13 +337,13 @@ class TestPublicIPUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
 
         cls.service_offering = ServiceOffering.create(
@@ -416,7 +416,7 @@ 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)
@@ -512,13 +512,13 @@ class TestVolumeUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
 
         cls.service_offering = ServiceOffering.create(
@@ -689,13 +689,13 @@ class TestTemplateUsage(cloudstackTestCase):
                             cls.services["account"],
                             domainid=cls.domain.id
                             )
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
 
         cls.service_offering = ServiceOffering.create(
@@ -858,12 +858,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.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
 
         cls.iso = Iso.create(
@@ -1014,13 +1014,13 @@ class TestLBRuleUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
 
         cls.service_offering = ServiceOffering.create(
@@ -1198,13 +1198,13 @@ class TestSnapshotUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
 
         cls.service_offering = ServiceOffering.create(
@@ -1375,13 +1375,13 @@ class TestNatRuleUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
 
         cls.service_offering = ServiceOffering.create(
@@ -1559,13 +1559,13 @@ class TestVpnUsage(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
 
         cls.service_offering = ServiceOffering.create(
@@ -1648,7 +1648,7 @@ class TestVpnUsage(cloudstackTestCase):
                         )
 
         self.debug("Created VPN user for account: %s" %
-                                    self.account.account.name)
+                                    self.account.name)
 
         vpnuser = VpnUser.create(
                                  self.apiclient,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_projects.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_projects.py b/test/integration/component/test_projects.py
index 95df5bf..9fa6075 100644
--- a/test/integration/component/test_projects.py
+++ b/test/integration/component/test_projects.py
@@ -183,8 +183,8 @@ class TestMultipleProjectCreation(cloudstackTestCase):
         project_1 = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project_1)
@@ -218,8 +218,8 @@ class TestMultipleProjectCreation(cloudstackTestCase):
         project_2 = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project_2)
@@ -398,8 +398,8 @@ class TestCrossDomainAccountAdd(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -519,8 +519,8 @@ class TestDeleteAccountWithProject(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -555,7 +555,7 @@ class TestDeleteAccountWithProject(cloudstackTestCase):
         with self.assertRaises(Exception):
             self.account.delete(self.apiclient)
             self.debug("Deleting account %s failed!" %
-                                    self.account.account.name)
+                                    self.account.name)
         return
 
 
@@ -635,8 +635,8 @@ class TestDeleteDomainWithProject(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.debug("Created project with domain admin with ID: %s" %
@@ -1215,8 +1215,8 @@ class TestProjectResources(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.cleanup.append(project)
@@ -1331,8 +1331,8 @@ class TestProjectResources(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
-                                 domainid=self.account.account.domainid
+                                 account=self.account.name,
+                                 domainid=self.account.domainid
                                  )
         # Cleanup created project at end of test
         self.debug("Created project with domain admin with ID: %s" %
@@ -1496,8 +1496,8 @@ class TestProjectSuspendActivate(cloudstackTestCase):
         cls.project = Project.create(
                                  cls.api_client,
                                  cls.services["project"],
-                                 account=cls.account.account.name,
-                                 domainid=cls.account.account.domainid
+                                 account=cls.account.name,
+                                 domainid=cls.account.domainid
                                  )
         cls.services["virtual_machine"]["zoneid"] = cls.zone.id
         cls._cleanup = [

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f0749ce6/test/integration/component/test_resource_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_resource_limits.py b/test/integration/component/test_resource_limits.py
index 641825b..418080a 100644
--- a/test/integration/component/test_resource_limits.py
+++ b/test/integration/component/test_resource_limits.py
@@ -902,7 +902,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.account.name
+        cls.services["account"] = cls.account.name
 
         # Create Service offering and disk offerings etc
         cls.service_offering = ServiceOffering.create(
@@ -957,22 +957,22 @@ class TestResourceLimitsDomain(cloudstackTestCase):
 
         self.debug(
             "Updating instance resource limits for domain: %s" %
-                                        self.account.account.domainid)
+                                        self.account.domainid)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               0, # Instance
-                              domainid=self.account.account.domainid,
+                              domainid=self.account.domainid,
                               max=2
                               )
 
-        self.debug("Deploying VM for account: %s" % self.account.account.name)
+        self.debug("Deploying VM for account: %s" % self.account.name)
         virtual_machine_1 = VirtualMachine.create(
                                 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.cleanup.append(virtual_machine_1)
@@ -982,13 +982,13 @@ class TestResourceLimitsDomain(cloudstackTestCase):
                             'Running',
                             "Check VM state is Running or not"
                         )
-        self.debug("Deploying VM for account: %s" % self.account.account.name)
+        self.debug("Deploying VM for account: %s" % self.account.name)
         virtual_machine_2 = VirtualMachine.create(
                                 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.cleanup.append(virtual_machine_2)
@@ -1005,7 +1005,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
                                 self.services["server"],
                                 templateid=self.template.id,
                                 accountid=self.account_1.account.name,
-                                domainid=self.account.account.domainid,
+                                domainid=self.account.domainid,
                                 serviceofferingid=self.service_offering.id
                                 )
         return
@@ -1025,22 +1025,22 @@ class TestResourceLimitsDomain(cloudstackTestCase):
 
         self.debug(
             "Updating public IP resource limits for domain: %s" %
-                                        self.account.account.domainid)
+                                        self.account.domainid)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               1, # Public Ip
-                              domainid=self.account.account.domainid,
+                              domainid=self.account.domainid,
                               max=2
                               )
 
-        self.debug("Deploying VM for account: %s" % self.account.account.name)
+        self.debug("Deploying VM for account: %s" % self.account.name)
         virtual_machine_1 = VirtualMachine.create(
                                 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.cleanup.append(virtual_machine_1)
@@ -1050,7 +1050,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
                             'Running',
                             "Check VM state is Running or not"
                         )
-        self.debug("Associating public IP for account: %s" % self.account.account.name)
+        self.debug("Associating public IP for account: %s" % self.account.name)
         public_ip_1 = PublicIPAddress.create(
                                            self.apiclient,
                                            virtual_machine_1.account,
@@ -1097,22 +1097,22 @@ class TestResourceLimitsDomain(cloudstackTestCase):
 
         self.debug(
             "Updating snapshot resource limits for domain: %s" %
-                                        self.account.account.domainid)
+                                        self.account.domainid)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               3, # Snapshot
-                              domainid=self.account.account.domainid,
+                              domainid=self.account.domainid,
                               max=1
                               )
 
-        self.debug("Deploying VM for account: %s" % self.account.account.name)
+        self.debug("Deploying VM for account: %s" % self.account.name)
         virtual_machine_1 = VirtualMachine.create(
                                 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.cleanup.append(virtual_machine_1)
@@ -1141,8 +1141,8 @@ class TestResourceLimitsDomain(cloudstackTestCase):
         # Create a snapshot from the ROOTDISK
         snapshot_1 = 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.cleanup.append(snapshot_1)
         # Verify Snapshot state
@@ -1159,8 +1159,8 @@ class TestResourceLimitsDomain(cloudstackTestCase):
         with self.assertRaises(Exception):
             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,
                             )
         return
 
@@ -1179,22 +1179,22 @@ class TestResourceLimitsDomain(cloudstackTestCase):
 
         self.debug(
             "Updating volume resource limits for domain: %s" %
-                                        self.account.account.domainid)
+                                        self.account.domainid)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               2, # Volume
-                              domainid=self.account.account.domainid,
+                              domainid=self.account.domainid,
                               max=2
                               )
 
-        self.debug("Deploying VM for account: %s" % self.account.account.name)
+        self.debug("Deploying VM for account: %s" % self.account.name)
         virtual_machine_1 = VirtualMachine.create(
                                 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.cleanup.append(virtual_machine_1)
@@ -1211,8 +1211,8 @@ class TestResourceLimitsDomain(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
                         )
         return
@@ -1234,28 +1234,28 @@ class TestResourceLimitsDomain(cloudstackTestCase):
         update_resource_limit(
                               self.apiclient,
                               2, # Volume
-                              domainid=self.account.account.domainid,
+                              domainid=self.account.domainid,
                               max=5
                               )
 
         self.debug(
             "Updating template resource limits for domain: %s" %
-                                        self.account.account.domainid)
+                                        self.account.domainid)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               4, # Template
-                              domainid=self.account.account.domainid,
+                              domainid=self.account.domainid,
                               max=2
                               )
 
-        self.debug("Deploying VM for account: %s" % self.account.account.name)
+        self.debug("Deploying VM for account: %s" % self.account.name)
         virtual_machine_1 = VirtualMachine.create(
                                 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.cleanup.append(virtual_machine_1)
@@ -1286,8 +1286,8 @@ class TestResourceLimitsDomain(cloudstackTestCase):
                             self.apiclient,
                             self.services["template"],
                             volumeid=volume.id,
-                            account=self.account.account.name,
-                            domainid=self.account.account.domainid,
+                            account=self.account.name,
+                            domainid=self.account.domainid,
                             )
 
         self.cleanup.append(template_1)
@@ -1303,8 +1303,8 @@ class TestResourceLimitsDomain(cloudstackTestCase):
                             self.apiclient,
                             self.services["template"],
                             volumeid=volume.id,
-                            account=self.account.account.name,
-                            domainid=self.account.account.domainid,
+                            account=self.account.name,
+                            domainid=self.account.domainid,
                             )
 
         self.cleanup.append(template_2)
@@ -1321,8 +1321,8 @@ class TestResourceLimitsDomain(cloudstackTestCase):
                             self.apiclient,
                             self.services["template"],
                             volumeid=volume.id,
-                            account=self.account.account.name,
-                            domainid=self.account.account.domainid,
+                            account=self.account.name,
+                            domainid=self.account.domainid,
                             )
         return
 
@@ -1432,8 +1432,8 @@ class TestMaxAccountNetworks(cloudstackTestCase):
             network = Network.create(
                                     self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
                                     zoneid=self.zone.id
                                     )
@@ -1446,8 +1446,8 @@ class TestMaxAccountNetworks(cloudstackTestCase):
             Network.create(
                                     self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
-                                    domainid=self.account.account.domainid,
+                                    accountid=self.account.name,
+                                    domainid=self.account.domainid,
                                     networkofferingid=self.network_offering.id,
                                     zoneid=self.zone.id
                                     )


Mime
View raw message