cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [30/47] account name dereferences as account.name
Date Tue, 14 May 2013 13:57:49 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f57a851/test/integration/component/test_vpc.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc.py b/test/integration/component/test_vpc.py
index 82eeac1..1156b5b 100644
--- a/test/integration/component/test_vpc.py
+++ b/test/integration/component/test_vpc.py
@@ -309,13 +309,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -341,13 +341,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -372,7 +372,7 @@ class TestVPC(cloudstackTestCase):
         network_1 = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -396,7 +396,7 @@ class TestVPC(cloudstackTestCase):
         network_2 = Network.create(
                             self.apiclient,
                             self.services["network"],
-                            accountid=self.account.account.name,
+                            accountid=self.account.name,
                             domainid=self.account.account.domainid,
                             networkofferingid=self.network_offering_no_lb.id,
                             zoneid=self.zone.id,
@@ -425,13 +425,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -468,13 +468,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -499,7 +499,7 @@ class TestVPC(cloudstackTestCase):
         network_1 = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -523,7 +523,7 @@ class TestVPC(cloudstackTestCase):
         network_2 = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering_no_lb.id,
                                 zoneid=self.zone.id,
@@ -574,7 +574,7 @@ class TestVPC(cloudstackTestCase):
         self.debug("Check if VR is deleted or not?")
         routers = Router.list(
                             self.apiclient,
-                            account=self.account.account.name,
+                            account=self.account.name,
                             domainid=self.account.account.domainid,
                             listall=True
                             )
@@ -606,13 +606,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc_1 = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc_1)
@@ -623,7 +623,7 @@ class TestVPC(cloudstackTestCase):
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc_2)
@@ -713,7 +713,7 @@ class TestVPC(cloudstackTestCase):
                         self.apiclient,
                         supportedservices='Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
                         listall=True,
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid
                         )
         self.assertEqual(
@@ -732,7 +732,7 @@ class TestVPC(cloudstackTestCase):
                         self.apiclient,
                         restartrequired=True,
                         listall=True,
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid
                         )
         if vpcs is not None:
@@ -747,7 +747,7 @@ class TestVPC(cloudstackTestCase):
                         self.apiclient,
                         restartrequired=False,
                         listall=True,
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid
                         )
         self.assertEqual(
@@ -782,13 +782,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc_1 = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc_1)
@@ -861,14 +861,14 @@ class TestVPC(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -897,7 +897,7 @@ class TestVPC(cloudstackTestCase):
         network_1 = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering_no_lb.id,
                                 zoneid=self.zone.id,
@@ -912,7 +912,7 @@ class TestVPC(cloudstackTestCase):
         network_2 = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -926,7 +926,7 @@ class TestVPC(cloudstackTestCase):
         vm_1 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_1.id)]
@@ -936,7 +936,7 @@ class TestVPC(cloudstackTestCase):
         vm_2 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_1.id)]
@@ -948,7 +948,7 @@ class TestVPC(cloudstackTestCase):
         vm_3 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_2.id)]
@@ -958,7 +958,7 @@ class TestVPC(cloudstackTestCase):
         vm_4 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_2.id)]
@@ -968,7 +968,7 @@ class TestVPC(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network_1.name)
         public_ip_1 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=network_1.id,
@@ -1000,7 +1000,7 @@ class TestVPC(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network_1.name)
         public_ip_2 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=network_1.id,
@@ -1030,7 +1030,7 @@ class TestVPC(cloudstackTestCase):
                                     networkid=network_1.id,
                                     listall=True,
                                     isstaticnat=True,
-                                    account=self.account.account.name,
+                                    account=self.account.name,
                                     domainid=self.account.account.domainid
                                   )
         self.assertEqual(
@@ -1047,7 +1047,7 @@ class TestVPC(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % vpc.name)
         public_ip_3 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=network_2.id,
@@ -1065,7 +1065,7 @@ class TestVPC(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=public_ip_3.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=network_2.id,
                                     vpcid=vpc.id,
                                     domainid=self.account.account.domainid
@@ -1206,14 +1206,14 @@ class TestVPC(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1242,7 +1242,7 @@ class TestVPC(cloudstackTestCase):
         network_1 = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering_no_lb.id,
                                 zoneid=self.zone.id,
@@ -1257,7 +1257,7 @@ class TestVPC(cloudstackTestCase):
         network_2 = Network.create(
                             self.apiclient,
                             self.services["network"],
-                            accountid=self.account.account.name,
+                            accountid=self.account.name,
                             domainid=self.account.account.domainid,
                             networkofferingid=self.network_offering.id,
                             zoneid=self.zone.id,
@@ -1271,7 +1271,7 @@ class TestVPC(cloudstackTestCase):
         vm_1 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_1.id)]
@@ -1281,7 +1281,7 @@ class TestVPC(cloudstackTestCase):
         vm_2 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_1.id)]
@@ -1293,7 +1293,7 @@ class TestVPC(cloudstackTestCase):
         vm_3 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_2.id)]
@@ -1303,7 +1303,7 @@ class TestVPC(cloudstackTestCase):
         vm_4 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_2.id)]
@@ -1313,7 +1313,7 @@ class TestVPC(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network_1.name)
         public_ip_1 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=network_1.id,
@@ -1345,7 +1345,7 @@ class TestVPC(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network_1.name)
         public_ip_2 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=network_1.id,
@@ -1375,7 +1375,7 @@ class TestVPC(cloudstackTestCase):
                                     networkid=network_1.id,
                                     listall=True,
                                     isstaticnat=True,
-                                    account=self.account.account.name,
+                                    account=self.account.name,
                                     domainid=self.account.account.domainid
                                   )
         self.assertEqual(
@@ -1392,7 +1392,7 @@ class TestVPC(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % vpc.name)
         public_ip_3 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=network_2.id,
@@ -1410,7 +1410,7 @@ class TestVPC(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=public_ip_3.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=network_2.id,
                                     vpcid=vpc.id,
                                     domainid=self.account.account.domainid
@@ -1551,13 +1551,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1573,7 +1573,7 @@ class TestVPC(cloudstackTestCase):
         self.debug("Verify if the Router has started")
         routers = Router.list(
                   self.apiclient,
-                  account=self.account.account.name,
+                  account=self.account.name,
                   domainid=self.account.account.domainid,
                               listall=True
                   )
@@ -1589,7 +1589,7 @@ class TestVPC(cloudstackTestCase):
 
         src_nat_list = PublicIPAddress.list(
                                         self.apiclient,
-                                        account=self.account.account.name,
+                                        account=self.account.name,
                                         domainid=self.account.account.domainid,
                                         listall=True,
                                         issourcenat=True,
@@ -1607,13 +1607,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("Creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc_1 = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc_1)
@@ -1621,27 +1621,27 @@ class TestVPC(cloudstackTestCase):
         self.services["vpc"]["cidr"] = "10.2.1.1/16"
         self.debug(
                 "Creating a non-overlapping VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc_2 = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc_2)
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("Creating a overlapping VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         try:
             vpc_3 = VPC.create(
                      self.apiclient,
                      self.services["vpc"],
                      vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
             self.debug("%s" % vpc_3)
@@ -1669,14 +1669,14 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1700,7 +1700,7 @@ class TestVPC(cloudstackTestCase):
         network = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1713,7 +1713,7 @@ class TestVPC(cloudstackTestCase):
         virtual_machine = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -1728,7 +1728,7 @@ class TestVPC(cloudstackTestCase):
         src_nat_ip_addr = PublicIPAddress.create(
                                     self.apiclient,
                                     zoneid=self.zone.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     domainid=self.account.account.domainid,
                                     networkid=network.id,
                                     vpcid=vpc.id
@@ -1816,13 +1816,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1851,7 +1851,7 @@ class TestVPC(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1871,14 +1871,14 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         netdomain = "cl2.internal"
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid,
                          networkDomain=netdomain
                          )
@@ -1903,7 +1903,7 @@ class TestVPC(cloudstackTestCase):
         network = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1916,7 +1916,7 @@ class TestVPC(cloudstackTestCase):
         virtual_machine = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -2346,7 +2346,7 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
 
         # Create VPC without vpcOffering param
         with self.assertRaises(Exception):
@@ -2354,7 +2354,7 @@ class TestVPC(cloudstackTestCase):
                              self.apiclient,
                              self.services["vpc"],
                              zoneid=self.zone.id,
-                             account=self.account.account.name,
+                             account=self.account.name,
                              domainid=self.account.account.domainid
                              )
 
@@ -2366,7 +2366,7 @@ class TestVPC(cloudstackTestCase):
                              self.services["vpc_no_name"],
                              vpcofferingid=self.vpc_off.id,
                              zoneid=self.zone.id,
-                             account=self.account.account.name,
+                             account=self.account.name,
                              domainid=self.account.account.domainid
                              )
 
@@ -2376,7 +2376,7 @@ class TestVPC(cloudstackTestCase):
                              self.apiclient,
                              self.services["vpc"],
                              vpcofferingid=self.vpc_off.id,
-                             account=self.account.account.name,
+                             account=self.account.name,
                              domainid=self.account.account.domainid
                              )
 
@@ -2391,7 +2391,7 @@ class TestVPC(cloudstackTestCase):
                              vpc_wo_cidr,
                              vpcofferingid=self.vpc_off.id,
                              zoneid=self.zone.id,
-                             account=self.account.account.name,
+                             account=self.account.name,
                              domainid=self.account.account.domainid
                              )
 
@@ -2407,13 +2407,13 @@ class TestVPC(cloudstackTestCase):
 
         self.services["vpc"]["cidr"] = "10.1.1.1/16"
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -2438,7 +2438,7 @@ class TestVPC(cloudstackTestCase):
         network = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -2664,14 +2664,14 @@ class TestVPCHostMaintenance(cloudstackTestCase):
         # 3. VPC will be created but will be in "Disabled" state
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc, state='Disabled')
@@ -2690,14 +2690,14 @@ class TestVPCHostMaintenance(cloudstackTestCase):
         #    get deleted
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=self.vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc, state='Disabled')

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f57a851/test/integration/component/test_vpc_host_maintenance.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_host_maintenance.py b/test/integration/component/test_vpc_host_maintenance.py
index b2ffcbf..4c14f99 100644
--- a/test/integration/component/test_vpc_host_maintenance.py
+++ b/test/integration/component/test_vpc_host_maintenance.py
@@ -241,7 +241,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
                          cls.services["vpc"],
                          vpcofferingid=cls.vpc_off.id,
                          zoneid=cls.zone.id,
-                         account=cls.account.account.name,
+                         account=cls.account.name,
                          domainid=cls.account.account.domainid
                          )
 
@@ -257,7 +257,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
         cls.network_1 = Network.create(
                                 cls.api_client,
                                 cls.services["network"],
-                                accountid=cls.account.account.name,
+                                accountid=cls.account.name,
                                 domainid=cls.account.account.domainid,
                                 networkofferingid=cls.nw_off.id,
                                 zoneid=cls.zone.id,
@@ -276,7 +276,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
         cls.network_2 = Network.create(
                                 cls.api_client,
                                 cls.services["network"],
-                                accountid=cls.account.account.name,
+                                accountid=cls.account.name,
                                 domainid=cls.account.account.domainid,
                                 networkofferingid=cls.nw_off_no_lb.id,
                                 zoneid=cls.zone.id,
@@ -287,7 +287,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
         cls.vm_1 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
+                                  accountid=cls.account.name,
                                   domainid=cls.account.account.domainid,
                                   serviceofferingid=cls.service_offering_1.id,
                                   networkids=[str(cls.network_1.id)]
@@ -296,7 +296,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
         cls.vm_2 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
+                                  accountid=cls.account.name,
                                   domainid=cls.account.account.domainid,
                                   serviceofferingid=cls.service_offering_1.id,
                                   networkids=[str(cls.network_1.id)]
@@ -304,14 +304,14 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
         cls.vm_3 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
+                                  accountid=cls.account.name,
                                   domainid=cls.account.account.domainid,
                                   serviceofferingid=cls.service_offering_2.id,
                                   networkids=[str(cls.network_2.id)]
                                   )
         routers = Router.list(
                               cls.api_client,
-                              account=cls.account.account.name,
+                              account=cls.account.name,
                               domainid=cls.account.account.domainid,
                               listall=True
                               )
@@ -375,7 +375,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
 
         vms = VirtualMachine.list(
                                   self.apiclient,
-                                  account=self.account.account.name,
+                                  account=self.account.name,
                                   domainid=self.account.account.domainid,
                                   networkid=self.network_1.id,
                                   listall=True
@@ -390,7 +390,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
 
         vms = VirtualMachine.list(
                                   self.apiclient,
-                                  account=self.account.account.name,
+                                  account=self.account.name,
                                   domainid=self.account.account.domainid,
                                   networkid=self.network_2.id,
                                   listall=True
@@ -440,7 +440,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
             "Check if all instances belonging to the account are up again?")
         routers = Router.list(
                               self.apiclient,
-                              account=self.account.account.name,
+                              account=self.account.name,
                               domainid=self.account.account.domainid,
                               listall=True
                               )
@@ -457,7 +457,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase):
                              )
         vms = VirtualMachine.list(
                                   self.apiclient,
-                                  account=self.account.account.name,
+                                  account=self.account.name,
                                   domainid=self.account.account.domainid,
                                   listall=True
                                   )
@@ -617,7 +617,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
                          cls.services["vpc"],
                          vpcofferingid=cls.vpc_off.id,
                          zoneid=cls.zone.id,
-                         account=cls.account.account.name,
+                         account=cls.account.name,
                          domainid=cls.account.account.domainid
                          )
 
@@ -633,7 +633,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
         cls.network_1 = Network.create(
                                 cls.api_client,
                                 cls.services["network"],
-                                accountid=cls.account.account.name,
+                                accountid=cls.account.name,
                                 domainid=cls.account.account.domainid,
                                 networkofferingid=cls.nw_off.id,
                                 zoneid=cls.zone.id,
@@ -652,7 +652,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
         cls.network_2 = Network.create(
                                 cls.api_client,
                                 cls.services["network"],
-                                accountid=cls.account.account.name,
+                                accountid=cls.account.name,
                                 domainid=cls.account.account.domainid,
                                 networkofferingid=cls.nw_off_no_lb.id,
                                 zoneid=cls.zone.id,
@@ -663,7 +663,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
         cls.vm_1 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
+                                  accountid=cls.account.name,
                                   domainid=cls.account.account.domainid,
                                   serviceofferingid=cls.service_offering_1.id,
                                   networkids=[str(cls.network_1.id)]
@@ -672,7 +672,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
         cls.vm_2 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
+                                  accountid=cls.account.name,
                                   domainid=cls.account.account.domainid,
                                   serviceofferingid=cls.service_offering_2.id,
                                   networkids=[str(cls.network_1.id)]
@@ -680,7 +680,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
         cls.vm_3 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
+                                  accountid=cls.account.name,
                                   domainid=cls.account.account.domainid,
                                   serviceofferingid=cls.service_offering_1.id,
                                   networkids=[str(cls.network_2.id)]
@@ -688,7 +688,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
         cls.vm_4 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
+                                  accountid=cls.account.name,
                                   domainid=cls.account.account.domainid,
                                   serviceofferingid=cls.service_offering_2.id,
                                   networkids=[str(cls.network_2.id)]
@@ -738,7 +738,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
 
         vms = VirtualMachine.list(
                                   self.apiclient,
-                                  account=self.account.account.name,
+                                  account=self.account.name,
                                   domainid=self.account.account.domainid,
                                   networkid=self.network_1.id,
                                   listall=True
@@ -753,7 +753,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
 
         vms = VirtualMachine.list(
                                   self.apiclient,
-                                  account=self.account.account.name,
+                                  account=self.account.name,
                                   domainid=self.account.account.domainid,
                                   networkid=self.network_2.id,
                                   listall=True
@@ -798,7 +798,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
                                                         self.network_1.name)
         public_ip_1 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=self.network_1.id,
@@ -823,7 +823,7 @@ class TestVPCNetworkRules(cloudstackTestCase):
                                                         self.network_2.name)
         public_ip_2 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=self.network_2.id,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f57a851/test/integration/component/test_vpc_network.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py
index e09b415..0adf9d7 100644
--- a/test/integration/component/test_vpc_network.py
+++ b/test/integration/component/test_vpc_network.py
@@ -325,14 +325,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -352,7 +352,7 @@ class TestVPCNetwork(cloudstackTestCase):
         network = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -418,14 +418,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -450,7 +450,7 @@ class TestVPCNetwork(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -489,14 +489,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -516,7 +516,7 @@ class TestVPCNetwork(cloudstackTestCase):
         network = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -580,14 +580,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -607,7 +607,7 @@ class TestVPCNetwork(cloudstackTestCase):
         network = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -645,7 +645,7 @@ class TestVPCNetwork(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -685,14 +685,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -736,14 +736,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -771,7 +771,7 @@ class TestVPCNetwork(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -813,14 +813,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -841,7 +841,7 @@ class TestVPCNetwork(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -882,14 +882,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -944,14 +944,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -975,7 +975,7 @@ class TestVPCNetwork(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1014,14 +1014,14 @@ class TestVPCNetwork(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1192,7 +1192,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1214,7 +1214,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1254,7 +1254,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1276,7 +1276,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1316,7 +1316,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1341,7 +1341,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1383,7 +1383,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1405,7 +1405,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
         network = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1446,7 +1446,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1464,7 +1464,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1504,7 +1504,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1539,7 +1539,7 @@ class TestVPCNetworkRanges(cloudstackTestCase):
             Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=account.account.name,
+                                accountid=account.name,
                                 domainid=account.account.domainid,
                                 networkofferingid=self.network_offering.id,
                                 zoneid=self.zone.id,
@@ -1702,14 +1702,14 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -1750,7 +1750,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         network_1 = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=nw_off_no_pf.id,
                                 zoneid=self.zone.id,
@@ -1764,7 +1764,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         vm_1 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_1.id)]
@@ -1773,7 +1773,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         vm_2 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_1.id)]
@@ -1783,7 +1783,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network_1.name)
         public_ip_1 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=network_1.id,
@@ -1801,7 +1801,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=public_ip_1.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=network_1.id,
                                     vpcid=vpc.id,
                                     domainid=self.account.account.domainid
@@ -1814,7 +1814,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network_1.name)
         public_ip_2 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=network_1.id,
@@ -1844,7 +1844,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
                                     networkid=network_1.id,
                                     listall=True,
                                     isstaticnat=True,
-                                    account=self.account.account.name,
+                                    account=self.account.name,
                                     domainid=self.account.account.domainid
                                   )
         self.assertEqual(
@@ -1932,7 +1932,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % vpc.name)
         public_ip_3 = PublicIPAddress.create(
                                 self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=network_1.id,
@@ -2051,14 +2051,14 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         vpc_off.update(self.apiclient, state='Enabled')
 
         self.debug("creating a VPC network in the account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         vpc = VPC.create(
                          self.apiclient,
                          self.services["vpc"],
                          vpcofferingid=vpc_off.id,
                          zoneid=self.zone.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.validate_vpc_network(vpc)
@@ -2098,7 +2098,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         network_1 = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=nw_off.id,
                                 zoneid=self.zone.id,
@@ -2112,7 +2112,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase):
         vm_1 = VirtualMachine.create(
                                   self.apiclient,
                                   self.services["virtual_machine"],
-                                  accountid=self.account.account.name,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network_1.id)]
@@ -2181,7 +2181,7 @@ class TestVPCNetworkGc(cloudstackTestCase):
                          cls.services["vpc"],
                          vpcofferingid=cls.vpc_off.id,
                          zoneid=cls.zone.id,
-                         account=cls.account.account.name,
+                         account=cls.account.name,
                          domainid=cls.account.account.domainid
                          )
 
@@ -2196,7 +2196,7 @@ class TestVPCNetworkGc(cloudstackTestCase):
         cls.network_1 = Network.create(
                                 cls.api_client,
                                 cls.services["network"],
-                                accountid=cls.account.account.name,
+                                accountid=cls.account.name,
                                 domainid=cls.account.account.domainid,
                                 networkofferingid=cls.nw_off.id,
                                 zoneid=cls.zone.id,
@@ -2207,7 +2207,7 @@ class TestVPCNetworkGc(cloudstackTestCase):
         cls.vm_1 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
+                                  accountid=cls.account.name,
                                   domainid=cls.account.account.domainid,
                                   serviceofferingid=cls.service_offering.id,
                                   networkids=[str(cls.network_1.id)]
@@ -2215,14 +2215,14 @@ class TestVPCNetworkGc(cloudstackTestCase):
         cls.vm_2 = VirtualMachine.create(
                                   cls.api_client,
                                   cls.services["virtual_machine"],
-                                  accountid=cls.account.account.name,
+                                  accountid=cls.account.name,
                                   domainid=cls.account.account.domainid,
                                   serviceofferingid=cls.service_offering.id,
                                   networkids=[str(cls.network_1.id)]
                                   )
         cls.public_ip_1 = PublicIPAddress.create(
                                 cls.api_client,
-                                accountid=cls.account.account.name,
+                                accountid=cls.account.name,
                                 zoneid=cls.zone.id,
                                 domainid=cls.account.account.domainid,
                                 networkid=cls.network_1.id,
@@ -2232,7 +2232,7 @@ class TestVPCNetworkGc(cloudstackTestCase):
                                     cls.api_client,
                                     cls.services["lbrule"],
                                     ipaddressid=cls.public_ip_1.ipaddress.id,
-                                    accountid=cls.account.account.name,
+                                    accountid=cls.account.name,
                                     networkid=cls.network_1.id,
                                     vpcid=cls.vpc.id,
                                     domainid=cls.account.account.domainid
@@ -2241,7 +2241,7 @@ class TestVPCNetworkGc(cloudstackTestCase):
 
         cls.public_ip_2 = PublicIPAddress.create(
                                 cls.api_client,
-                                accountid=cls.account.account.name,
+                                accountid=cls.account.name,
                                 zoneid=cls.zone.id,
                                 domainid=cls.account.account.domainid,
                                 networkid=cls.network_1.id,
@@ -2288,7 +2288,7 @@ class TestVPCNetworkGc(cloudstackTestCase):
         # Stop all the VMs as part of test
         vms = VirtualMachine.list(
                                   self.apiclient,
-                                  account=self.account.account.name,
+                                  account=self.account.name,
                                   domainid=self.account.account.domainid,
                                   listall=True
                                   )
@@ -2304,7 +2304,7 @@ class TestVPCNetworkGc(cloudstackTestCase):
         # Start all the VMs after test execution
         vms = VirtualMachine.list(
                                   self.apiclient,
-                                  account=self.account.account.name,
+                                  account=self.account.name,
                                   domainid=self.account.account.domainid,
                                   listall=True
                                   )
@@ -2395,7 +2395,7 @@ class TestVPCNetworkGc(cloudstackTestCase):
         self.debug("Check if the VPC router is in stopped state?")
         routers = Router.list(
                               self.apiclient,
-                              account=self.account.account.name,
+                              account=self.account.name,
                               domainid=self.account.account.domainid,
                               listall=True
                               )
@@ -2511,10 +2511,10 @@ class TestVPCNetworkGc(cloudstackTestCase):
                          ["network.gc.interval", "network.gc.wait"])
 
         self.debug("Finding the VPC virtual router for account: %s" %
-                                            self.account.account.name)
+                                            self.account.name)
         routers = Router.list(
                               self.apiclient,
-                              account=self.account.account.name,
+                              account=self.account.name,
                               domainid=self.account.account.domainid,
                               listall=True
                               )

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f57a851/test/integration/component/test_vpc_network_lbrules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network_lbrules.py b/test/integration/component/test_vpc_network_lbrules.py
index 6f7b05f..a24e813 100644
--- a/test/integration/component/test_vpc_network_lbrules.py
+++ b/test/integration/component/test_vpc_network_lbrules.py
@@ -236,14 +236,14 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
         self.debug("Enabling the VPC offering created")
         self.vpc_off.update(self.apiclient, state='Enabled')
 
-        self.debug("Creating a VPC network in the account: %s" % self.account.account.name)
+        self.debug("Creating a VPC network in the account: %s" % self.account.name)
         self.services["vpc"]["cidr"] = '10.1.1.1/16'
         self.vpc = VPC.create(
                         self.apiclient,
                         self.services["vpc"],
                         vpcofferingid=self.vpc_off.id,
                         zoneid=self.zone.id,
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid
                         )
         return
@@ -263,7 +263,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
 
     def get_Router_For_VPC(self):
         routers = list_routers(self.apiclient,
-                            account=self.account.account.name,
+                            account=self.account.name,
                             domainid=self.account.account.domainid,
                             )
         self.assertEqual(isinstance(routers, list),
@@ -286,7 +286,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
         self.apiclient.stopRouter(cmd)
 
         routers = list_routers(self.apiclient,
-                            account=self.account.account.name,
+                            account=self.account.name,
                             domainid=self.account.account.domainid,
                             )
         self.assertEqual(isinstance(routers, list),
@@ -307,7 +307,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
         self.apiclient.startRouter(cmd)
 
         routers = list_routers(self.apiclient,
-                            account=self.account.account.name,
+                            account=self.account.name,
                             domainid=self.account.account.domainid,
                             zoneid=self.zone.id
                             )
@@ -389,7 +389,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
     def acquire_Public_IP(self, network):
         self.debug("Associating public IP for network: %s" % network.name)
         public_ip = PublicIPAddress.create(self.apiclient,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 zoneid=self.zone.id,
                                 domainid=self.account.account.domainid,
                                 networkid=None, #network.id,
@@ -412,14 +412,14 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
         self.debug("Enabling the VPC offering created")
         vpc_off.update(self.apiclient, state='Enabled')
 
-        self.debug("Creating a VPC network in the account: %s" % self.account.account.name)
+        self.debug("Creating a VPC network in the account: %s" % self.account.name)
         self.services["vpc"]["cidr"] = cidr
         vpc = VPC.create(
                         self.apiclient,
                         self.services["vpc"],
                         vpcofferingid=vpc_off.id,
                         zoneid=self.zone.id,
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid
                         )
         return vpc
@@ -441,7 +441,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
             self.debug('Adding Network=%s' % self.services["network"])
             obj_network = Network.create(self.apiclient,
                                     self.services["network"],
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     domainid=self.account.account.domainid,
                                     networkofferingid=nw_off.id,
                                     zoneid=self.zone.id,
@@ -459,7 +459,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
             vm = VirtualMachine.create(
                                     self.apiclient,
                                     self.services["virtual_machine"],
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     domainid=self.account.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     networkids=[str(network.id)],
@@ -484,7 +484,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase):
                                     self.apiclient,
                                     objservices,
                                     ipaddressid=public_ip.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=network.id,
                                     vpcid=self.vpc.id,
                                     domainid=self.account.account.domainid


Mime
View raw message