cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [32/47] account name dereferences as account.name
Date Tue, 14 May 2013 13:57:51 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f57a851/test/integration/component/test_redundant_router.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_redundant_router.py b/test/integration/component/test_redundant_router.py
index c24a58a..aaac13d 100644
--- a/test/integration/component/test_redundant_router.py
+++ b/test/integration/component/test_redundant_router.py
@@ -330,7 +330,7 @@ class TestCreateRvRNetwork(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
@@ -368,13 +368,13 @@ class TestCreateRvRNetwork(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -537,7 +537,7 @@ class TestCreateRvRNetworkNonDefaultGuestCidr(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,
@@ -586,13 +586,13 @@ class TestCreateRvRNetworkNonDefaultGuestCidr(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -759,7 +759,7 @@ class TestRVRInternals(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
@@ -797,13 +797,13 @@ class TestRVRInternals(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -1018,19 +1018,19 @@ class TestRedundancy(cloudstackTestCase):
         self.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
                                 )
         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
         self.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(self.network.id)]
@@ -1571,7 +1571,7 @@ class TestRedundancy(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.id)]
@@ -1711,7 +1711,7 @@ class TestApplyAndDeleteNetworkRulesOnRvR(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
@@ -1749,13 +1749,13 @@ class TestApplyAndDeleteNetworkRulesOnRvR(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -1799,7 +1799,7 @@ class TestApplyAndDeleteNetworkRulesOnRvR(cloudstackTestCase):
         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=network.id
@@ -1868,7 +1868,7 @@ class TestApplyAndDeleteNetworkRulesOnRvR(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network.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.id
@@ -1900,7 +1900,7 @@ class TestApplyAndDeleteNetworkRulesOnRvR(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network.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.id
@@ -1917,7 +1917,7 @@ class TestApplyAndDeleteNetworkRulesOnRvR(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=public_ip_3.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=network.id
                                 )
 
@@ -2036,7 +2036,7 @@ class TestEnableVPNOverRvR(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
@@ -2074,13 +2074,13 @@ class TestEnableVPNOverRvR(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -2124,7 +2124,7 @@ class TestEnableVPNOverRvR(cloudstackTestCase):
         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=network.id
@@ -2135,25 +2135,25 @@ class TestEnableVPNOverRvR(cloudstackTestCase):
                                         ))
 
         self.debug("Creating a remote access VPN for account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
 
         try:
             vpn = Vpn.create(
                          self.apiclient,
                          publicipid=public_ip.ipaddress.id,
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         except Exception as e:
             self.fail("Failed to create VPN for account: %s - %s" % (
-                                                 self.account.account.name, e))
+                                                 self.account.name, e))
 
         try:
             vpnuser = VpnUser.create(
                                  self.apiclient,
                                  username="root",
                                  password="password",
-                                 account=self.account.account.name,
+                                 account=self.account.name,
                                  domainid=self.account.account.domainid
                                  )
         except Exception as e:
@@ -2162,7 +2162,7 @@ class TestEnableVPNOverRvR(cloudstackTestCase):
         self.debug("Checking if the remote access VPN is created or not?")
         remote_vpns = Vpn.list(
                                self.apiclient,
-                               account=self.account.account.name,
+                               account=self.account.name,
                                domainid=self.account.account.domainid,
                                publicipid=public_ip.ipaddress.id,
                                listall=True
@@ -2173,7 +2173,7 @@ class TestEnableVPNOverRvR(cloudstackTestCase):
                          "List remote VPNs should not return empty response"
                          )
         self.debug("Deleting the remote access VPN for account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
 
         try:
             vpn.delete(self.apiclient)
@@ -2183,7 +2183,7 @@ class TestEnableVPNOverRvR(cloudstackTestCase):
         self.debug("Checking if the remote access VPN is created or not?")
         remote_vpns = Vpn.list(
                                self.apiclient,
-                               account=self.account.account.name,
+                               account=self.account.name,
                                domainid=self.account.account.domainid,
                                publicipid=public_ip.ipaddress.id,
                                listall=True
@@ -2305,7 +2305,7 @@ class TestNetworkRulesMasterDownDeleteNetworkRules(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
@@ -2343,13 +2343,13 @@ class TestNetworkRulesMasterDownDeleteNetworkRules(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -2410,7 +2410,7 @@ class TestNetworkRulesMasterDownDeleteNetworkRules(cloudstackTestCase):
         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=network.id
@@ -2479,7 +2479,7 @@ class TestNetworkRulesMasterDownDeleteNetworkRules(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network.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.id
@@ -2511,7 +2511,7 @@ class TestNetworkRulesMasterDownDeleteNetworkRules(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network.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.id
@@ -2528,7 +2528,7 @@ class TestNetworkRulesMasterDownDeleteNetworkRules(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=public_ip_3.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=network.id
                                 )
 
@@ -2693,7 +2693,7 @@ class TestApplyDeleteNetworkRulesRebootRouter(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
@@ -2731,13 +2731,13 @@ class TestApplyDeleteNetworkRulesRebootRouter(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -2788,7 +2788,7 @@ class TestApplyDeleteNetworkRulesRebootRouter(cloudstackTestCase):
         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=network.id
@@ -2849,7 +2849,7 @@ class TestApplyDeleteNetworkRulesRebootRouter(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network.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.id
@@ -2870,7 +2870,7 @@ class TestApplyDeleteNetworkRulesRebootRouter(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network.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.id
@@ -2887,7 +2887,7 @@ class TestApplyDeleteNetworkRulesRebootRouter(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=public_ip_3.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=network.id
                                 )
 
@@ -3057,7 +3057,7 @@ class TestRestartRvRNetworkWithoutCleanup(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
@@ -3095,13 +3095,13 @@ class TestRestartRvRNetworkWithoutCleanup(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -3278,7 +3278,7 @@ class TestRestartRvRNetworkWithCleanup(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
@@ -3316,13 +3316,13 @@ class TestRestartRvRNetworkWithCleanup(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -3499,7 +3499,7 @@ class TestDeleteRvRNetwork(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
@@ -3537,13 +3537,13 @@ class TestDeleteRvRNetwork(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -3590,13 +3590,13 @@ class TestDeleteRvRNetwork(cloudstackTestCase):
 
         self.debug("Network delete failed!")
         self.debug("Destroying the user VMs for account: %s" %
-                                        self.account.account.name)
+                                        self.account.name)
 
         try:
             virtual_machine.delete(self.apiclient)
         except Exception as e:
             self.fail("Failed to delete guest Vm from account: %s - %s" %
-                                            (self.account.account.name, e))
+                                            (self.account.name, e))
 
         interval = list_configurations(
                                     self.apiclient,
@@ -3614,7 +3614,7 @@ class TestDeleteRvRNetwork(cloudstackTestCase):
         time.sleep((delay + exp) * 2)
 
         self.debug("Trying to delete guest network for account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         try:
             network.delete(self.apiclient)
         except Exception as e:
@@ -3718,7 +3718,7 @@ class TestNetworkGCRvR(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
@@ -3756,13 +3756,13 @@ class TestNetworkGCRvR(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -3998,7 +3998,7 @@ class TestApplyRulesRestartRvRNetwork(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
@@ -4036,13 +4036,13 @@ class TestApplyRulesRestartRvRNetwork(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -4093,7 +4093,7 @@ class TestApplyRulesRestartRvRNetwork(cloudstackTestCase):
         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=network.id
@@ -4154,7 +4154,7 @@ class TestApplyRulesRestartRvRNetwork(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network.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.id
@@ -4175,7 +4175,7 @@ class TestApplyRulesRestartRvRNetwork(cloudstackTestCase):
         self.debug("Associating public IP for network: %s" % network.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.id
@@ -4192,7 +4192,7 @@ class TestApplyRulesRestartRvRNetwork(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=public_ip_3.ipaddress.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     networkid=network.id
                                 )
 
@@ -4438,7 +4438,7 @@ class TestUpgradeDowngradeRVR(cloudstackTestCase):
         network = Network.create(
                                 self.apiclient,
                                 self.services["network"],
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 networkofferingid=network_off_vr.id,
                                 zoneid=self.zone.id
@@ -4464,19 +4464,19 @@ class TestUpgradeDowngradeRVR(cloudstackTestCase):
                     "The network should be in allocated state after creation"
                     )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
                                   )
         self.debug("Deployed VM in the account: %s" %
-                                    self.account.account.name)
+                                    self.account.name)
 
         vms = VirtualMachine.list(
                                   self.apiclient,
@@ -4496,10 +4496,10 @@ class TestUpgradeDowngradeRVR(cloudstackTestCase):
                          )
 
         self.debug("Listing routers 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
                               )
@@ -4524,10 +4524,10 @@ class TestUpgradeDowngradeRVR(cloudstackTestCase):
             self.fail("Failed to upgrade the network from VR to RVR: %s" % e)
 
         self.debug("Listing routers 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
                               )
@@ -4573,7 +4573,7 @@ class TestUpgradeDowngradeRVR(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
@@ -4599,19 +4599,19 @@ class TestUpgradeDowngradeRVR(cloudstackTestCase):
                     "The network should be in allocated state after creation"
                     )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
                                   )
         self.debug("Deployed VM in the account: %s" %
-                                    self.account.account.name)
+                                    self.account.name)
 
         vms = VirtualMachine.list(
                                   self.apiclient,
@@ -4631,10 +4631,10 @@ class TestUpgradeDowngradeRVR(cloudstackTestCase):
                          )
 
         self.debug("Listing routers 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
                               )
@@ -4672,10 +4672,10 @@ class TestUpgradeDowngradeRVR(cloudstackTestCase):
             self.fail("Failed to upgrade the network from VR to RVR: %s" % e)
 
         self.debug("Listing routers 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
                               )
@@ -4807,7 +4807,7 @@ class TestRVRWithDiffEnvs(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
@@ -4845,13 +4845,13 @@ class TestRVRWithDiffEnvs(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -4971,7 +4971,7 @@ class TestRVRWithDiffEnvs(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
@@ -5009,13 +5009,13 @@ class TestRVRWithDiffEnvs(cloudstackTestCase):
             "Routers should not be spawned when network is in allocated state"
             )
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)]
@@ -5207,7 +5207,7 @@ class TestRVRWithDiffEnvs(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
@@ -5258,13 +5258,13 @@ class TestRVRWithDiffEnvs(cloudstackTestCase):
                          )
         host = hosts[0]
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)],
@@ -5448,7 +5448,7 @@ class TestRVRWithDiffEnvs(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
@@ -5499,13 +5499,13 @@ class TestRVRWithDiffEnvs(cloudstackTestCase):
                          )
         host = hosts[0]
 
-        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,
+                                  accountid=self.account.name,
                                   domainid=self.account.account.domainid,
                                   serviceofferingid=self.service_offering.id,
                                   networkids=[str(network.id)],

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f57a851/test/integration/component/test_regions_accounts.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_regions_accounts.py b/test/integration/component/test_regions_accounts.py
index 113f725..886e620 100644
--- a/test/integration/component/test_regions_accounts.py
+++ b/test/integration/component/test_regions_accounts.py
@@ -203,4 +203,4 @@ class TestRegionsAccounts(cloudstackTestCase):
             #Clean up
             cleanup_resources(cls.api_client, cls.cleanup)
         except Exception as e:
-            raise Exception("Warning: Exception during cleanup : %s" % e)
\ No newline at end of file
+            raise Exception("Warning: Exception during cleanup : %s" % e)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f57a851/test/integration/component/test_shared_networks.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py
index 8d60206..9845826 100644
--- a/test/integration/component/test_shared_networks.py
+++ b/test/integration/component/test_shared_networks.py
@@ -288,7 +288,7 @@ class TestSharedNetworks(cloudstackTestCase):
             "The admin account created is not enabled."
             )
 
-        self.debug("Admin Type account created: %s" % self.account.account.name)
+        self.debug("Admin Type account created: %s" % self.account.name)
                 
         #Verify that there should be at least one physical network present in zone.
         list_physical_networks_response = PhysicalNetwork.list(
@@ -423,7 +423,7 @@ class TestSharedNetworks(cloudstackTestCase):
             "The admin account created is not enabled."
             )
         
-        self.debug("Admin type account created: %s" % self.account.account.name)
+        self.debug("Admin type account created: %s" % self.account.name)
         
         #Verify that there should be at least one physical network present in zone.
         list_physical_networks_response = PhysicalNetwork.list(
@@ -511,7 +511,7 @@ class TestSharedNetworks(cloudstackTestCase):
             "The admin account created is not enabled."
             )
         
-        self.debug("Admin Type account created: %s" % self.account.account.name)
+        self.debug("Admin Type account created: %s" % self.account.name)
         
         #Verify that there should be at least one physical network present in zone.
         list_physical_networks_response = PhysicalNetwork.list(
@@ -612,7 +612,7 @@ class TestSharedNetworks(cloudstackTestCase):
             "The admin account created is not enabled."
             )
         
-        self.debug("Admin type account created: %s" % self.admin_account.account.name)
+        self.debug("Admin type account created: %s" % self.admin_account.name)
         
         #Create an user account
         self.user_account = Account.create(
@@ -646,7 +646,7 @@ class TestSharedNetworks(cloudstackTestCase):
             "The user account created is not enabled."
             )
         
-        self.debug("User type account created: %s" % self.user_account.account.name)
+        self.debug("User type account created: %s" % self.user_account.name)
         
         #Verify that there should be at least one physical network present in zone.
         list_physical_networks_response = PhysicalNetwork.list(
@@ -802,7 +802,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.user_account_virtual_machine = VirtualMachine.create(
                                                        self.api_client,
                                                        self.services["virtual_machine"],
-                                                       accountid=self.user_account.account.name,
+                                                       accountid=self.user_account.name,
                                                        domainid=self.user_account.account.domainid,
                                                        serviceofferingid=self.service_offering.id,
                                                        networkids=self.network.id
@@ -894,7 +894,7 @@ class TestSharedNetworks(cloudstackTestCase):
             "The admin account created is not enabled."
             )
         
-        self.debug("Admin type account created: %s" % self.admin_account.account.name)
+        self.debug("Admin type account created: %s" % self.admin_account.name)
         
         #Create an user account
         self.user_account = Account.create(
@@ -928,7 +928,7 @@ class TestSharedNetworks(cloudstackTestCase):
             "The user account created is not enabled."
             )
         
-        self.debug("User type account created: %s" % self.user_account.account.name)
+        self.debug("User type account created: %s" % self.user_account.name)
         
         #Verify that there should be at least one physical network present in zone.
         list_physical_networks_response = PhysicalNetwork.list(
@@ -1021,7 +1021,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.network = Network.create(
                          self.api_client,
                          self.services["network"],
-                         accountid=self.user_account.account.name,
+                         accountid=self.user_account.name,
                          domainid=self.user_account.account.domainid,
                          networkofferingid=self.shared_network_offering.id,
                          zoneid=self.zone.id
@@ -1055,7 +1055,7 @@ class TestSharedNetworks(cloudstackTestCase):
             self.admin_account_virtual_machine = VirtualMachine.create(
                                                            self.api_client,
                                                            self.services["virtual_machine"],
-                                                           accountid=self.admin_account.account.name,
+                                                           accountid=self.admin_account.name,
                                                            domainid=self.admin_account.account.domainid,
                                                            networkids=self.network.id,
                                                            serviceofferingid=self.service_offering.id
@@ -1067,7 +1067,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.user_account_virtual_machine = VirtualMachine.create(
                                                        self.api_client,
                                                        self.services["virtual_machine"],
-                                                       accountid=self.user_account.account.name,
+                                                       accountid=self.user_account.name,
                                                        domainid=self.user_account.account.domainid,
                                                        networkids=self.network.id,
                                                        serviceofferingid=self.service_offering.id
@@ -1381,7 +1381,7 @@ class TestSharedNetworks(cloudstackTestCase):
             self.admin_account_virtual_machine = VirtualMachine.create(
                                                            self.api_client,
                                                            self.services["virtual_machine"],
-                                                           accountid=self.admin_account.account.name,
+                                                           accountid=self.admin_account.name,
                                                            domainid=self.admin_account.account.domainid,
                                                            networkids=self.network.id,
                                                            serviceofferingid=self.service_offering.id
@@ -1393,7 +1393,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.domain_user_account_virtual_machine = VirtualMachine.create(
                                                        self.api_client,
                                                        self.services["virtual_machine"],
-                                                       accountid=self.domain_user_account.account.name,
+                                                       accountid=self.domain_user_account.name,
                                                        domainid=self.domain_user_account.account.domainid,
                                                        networkids=self.network.id,
                                                        serviceofferingid=self.service_offering.id
@@ -1421,7 +1421,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.domain_admin_account_virtual_machine = VirtualMachine.create(
                                                        self.api_client,
                                                        self.services["virtual_machine"],
-                                                       accountid=self.domain_admin_account.account.name,
+                                                       accountid=self.domain_admin_account.name,
                                                        domainid=self.domain_admin_account.account.domainid,
                                                        networkids=self.network.id,
                                                        serviceofferingid=self.service_offering.id
@@ -1520,7 +1520,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.project1 = Project.create(
                                  self.api_client,
                                  self.services["project"],
-                                 account=self.admin_account.account.name,
+                                 account=self.admin_account.name,
                                  domainid=self.admin_account.account.domainid
                                  )
         
@@ -1550,7 +1550,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.project2 = Project.create(
                                  self.api_client,
                                  self.services["project"],
-                                 account=self.admin_account.account.name,
+                                 account=self.admin_account.name,
                                  domainid=self.admin_account.account.domainid
                                  )
         
@@ -1701,7 +1701,7 @@ class TestSharedNetworks(cloudstackTestCase):
             self.project2_admin_account_virtual_machine = VirtualMachine.create(
                                                            self.api_client,
                                                            self.services["virtual_machine"],
-                                                           accountid=self.admin_account.account.name,
+                                                           accountid=self.admin_account.name,
                                                            domainid=self.admin_account.account.domainid,
                                                            networkids=self.network.id,
                                                            projectid=self.project2.id,
@@ -1714,7 +1714,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.project1_admin_account_virtual_machine = VirtualMachine.create(
                                                        self.api_client,
                                                        self.services["virtual_machine"],
-                                                       accountid=self.admin_account.account.name,
+                                                       accountid=self.admin_account.name,
                                                        domainid=self.admin_account.account.domainid,
                                                        networkids=self.network.id,
                                                        projectid=self.project1.id,
@@ -2298,7 +2298,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.network_admin_account_virtual_machine = VirtualMachine.create(
                                                        self.api_client,
                                                        self.services["virtual_machine"],
-                                                       accountid=self.admin_account.account.name,
+                                                       accountid=self.admin_account.name,
                                                        domainid=self.admin_account.account.domainid,
                                                        networkids=self.network.id,
 						       serviceofferingid=self.service_offering.id
@@ -2326,7 +2326,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.network1_admin_account_virtual_machine = VirtualMachine.create(
                                                        self.api_client,
                                                        self.services["virtual_machine"],
-                                                       accountid=self.admin_account.account.name,
+                                                       accountid=self.admin_account.name,
                                                        domainid=self.admin_account.account.domainid,
                                                        networkids=self.network1.id,
                                                        serviceofferingid=self.service_offering.id
@@ -2400,7 +2400,7 @@ class TestSharedNetworks(cloudstackTestCase):
             "The admin account created is not enabled."
             )
         
-        self.debug("Admin type account created: %s" % self.admin_account.account.name)
+        self.debug("Admin type account created: %s" % self.admin_account.name)
         
         self.services["network_offering"]["specifyVlan"] = "True"
         self.services["network_offering"]["specifyIpRanges"] = "True"
@@ -2561,7 +2561,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.isolated_network = Network.create(
                          self.api_client,
                          self.services["isolated_network"],
-		accountid=self.admin_account.account.name,
+		accountid=self.admin_account.name,
                          domainid=self.admin_account.account.domainid,
                          networkofferingid=self.isolated_network_offering.id,
                          zoneid=self.zone.id
@@ -2589,7 +2589,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.shared_network_admin_account_virtual_machine = VirtualMachine.create(
                                                                      self.api_client,
                                                                      self.services["virtual_machine"],
-                                                                     accountid=self.admin_account.account.name,
+                                                                     accountid=self.admin_account.name,
                                                                      domainid=self.admin_account.account.domainid,
                                                                      networkids=self.shared_network.id,
 								     serviceofferingid=self.service_offering.id
@@ -2616,7 +2616,7 @@ class TestSharedNetworks(cloudstackTestCase):
         self.isolated_network_admin_account_virtual_machine = VirtualMachine.create(
                                                                        self.api_client,
                                                                        self.services["virtual_machine"],
-                                                                       accountid=self.admin_account.account.name,
+                                                                       accountid=self.admin_account.name,
                                                                        domainid=self.admin_account.account.domainid,
                                                                        networkids=self.isolated_network.id,
 								       serviceofferingid=self.service_offering.id
@@ -2641,10 +2641,10 @@ class TestSharedNetworks(cloudstackTestCase):
         
         self.assertTrue(self.isolated_network_admin_account_virtual_machine.nic[0].ipaddress is not None, "ip should be assigned to running virtual machine")
         
-        self.debug("Associating public IP for account: %s" % self.admin_account.account.name)
+        self.debug("Associating public IP for account: %s" % self.admin_account.name)
         self.public_ip = PublicIPAddress.create(
                                     self.api_client,
-                                    accountid=self.admin_account.account.name,
+                                    accountid=self.admin_account.name,
                                     zoneid=self.zone.id,
                                     domainid=self.admin_account.account.domainid,
                                     networkid=self.isolated_network.id
@@ -2832,7 +2832,7 @@ class TestSharedNetworks(cloudstackTestCase):
             self.network = Network.create(
                              self.api_client,
                              self.services["network"],
-                             accountid=self.admin_account.account.name,
+                             accountid=self.admin_account.name,
                              domainid=self.admin_account.account.domainid,
                              networkofferingid=self.shared_network_offering.id,
                              zoneid=self.zone.id
@@ -2976,7 +2976,7 @@ class TestSharedNetworks(cloudstackTestCase):
             self.network = Network.create(
                              self.api_client,
                              self.services["network"],
-                             accountid=self.admin_account.account.name,
+                             accountid=self.admin_account.name,
                              domainid=self.admin_account.account.domainid,
                              networkofferingid=self.shared_network_offering.id,
                              zoneid=self.zone.id


Mime
View raw message