cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [4/6] account name dereferences as account.name
Date Tue, 14 May 2013 05:04:51 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f57a851/test/integration/component/test_stopped_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_stopped_vm.py b/test/integration/component/test_stopped_vm.py
index 68f5edc..10e3d4d 100644
--- a/test/integration/component/test_stopped_vm.py
+++ b/test/integration/component/test_stopped_vm.py
@@ -183,11 +183,11 @@ class TestDeployVM(cloudstackTestCase):
         #    should be "Running".
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     diskofferingid=self.disk_offering.id,
@@ -195,7 +195,7 @@ class TestDeployVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -237,11 +237,11 @@ class TestDeployVM(cloudstackTestCase):
         #    should be "Running".
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     startvm=True,
@@ -250,7 +250,7 @@ class TestDeployVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -294,11 +294,11 @@ class TestDeployVM(cloudstackTestCase):
         #    return empty response
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     startvm=False,
@@ -306,7 +306,7 @@ class TestDeployVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -331,7 +331,7 @@ class TestDeployVM(cloudstackTestCase):
         )
         routers = Router.list(
                               self.apiclient,
-                              account=self.account.account.name,
+                              account=self.account.name,
                               domainid=self.account.account.domainid,
                               listall=True
                               )
@@ -384,11 +384,11 @@ class TestDeployVM(cloudstackTestCase):
         # 3. Attach volume should be successful
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     startvm=False,
@@ -396,7 +396,7 @@ class TestDeployVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -420,16 +420,16 @@ class TestDeployVM(cloudstackTestCase):
             "VM should be in Stopped state after deployment with startvm=false"
         )
         self.debug("Creating a volume in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         volume = Volume.create(
                                 self.apiclient,
                                 self.services["volume"],
                                 zoneid=self.zone.id,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid,
                                 diskofferingid=self.disk_offering.id
                                 )
-        self.debug("Created volume in account: %s" % self.account.account.name)
+        self.debug("Created volume in account: %s" % self.account.name)
         self.debug("Attaching volume to instance: %s" %
                                                 self.virtual_machine.name)
         try:
@@ -452,11 +452,11 @@ class TestDeployVM(cloudstackTestCase):
         # 4. Change service offering
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     startvm=False,
@@ -464,7 +464,7 @@ class TestDeployVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -488,16 +488,16 @@ class TestDeployVM(cloudstackTestCase):
             "VM should be in Stopped state after deployment with startvm=false"
         )
         self.debug("Creating a volume in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         volume = Volume.create(
                                 self.apiclient,
                                 self.services["volume"],
                                 zoneid=self.zone.id,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid,
                                 diskofferingid=self.disk_offering.id
                                 )
-        self.debug("Created volume in account: %s" % self.account.account.name)
+        self.debug("Created volume in account: %s" % self.account.name)
         self.debug("Attaching volume to instance: %s" %
                                                 self.virtual_machine.name)
         try:
@@ -565,11 +565,11 @@ class TestDeployVM(cloudstackTestCase):
         # 4. Detach volume from instance. Detach should be successful
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     startvm=False,
@@ -577,7 +577,7 @@ class TestDeployVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -601,16 +601,16 @@ class TestDeployVM(cloudstackTestCase):
             "VM should be in Stopped state after deployment with startvm=false"
         )
         self.debug("Creating a volume in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         volume = Volume.create(
                                 self.apiclient,
                                 self.services["volume"],
                                 zoneid=self.zone.id,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid,
                                 diskofferingid=self.disk_offering.id
                                 )
-        self.debug("Created volume in account: %s" % self.account.account.name)
+        self.debug("Created volume in account: %s" % self.account.name)
         self.debug("Attaching volume to instance: %s" %
                                                 self.virtual_machine.name)
         try:
@@ -648,11 +648,11 @@ class TestDeployVM(cloudstackTestCase):
         # 3. Attach ISO to the instance. Attach ISO should be successful
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     startvm=False,
@@ -660,7 +660,7 @@ class TestDeployVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -684,11 +684,11 @@ class TestDeployVM(cloudstackTestCase):
             "VM should be in Stopped state after deployment with startvm=false"
         )
         self.debug("Registering a ISO in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         iso = Iso.create(
                          self.apiclient,
                          self.services["iso"],
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
 
@@ -741,18 +741,18 @@ class TestDeployVM(cloudstackTestCase):
         # 4. Attach the volume to first virtual machine.
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         self.virtual_machine_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,
                                     startvm=False,
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine_1.id
@@ -777,18 +777,18 @@ class TestDeployVM(cloudstackTestCase):
         )
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         self.virtual_machine_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,
                                     diskofferingid=self.disk_offering.id
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine_2.id
@@ -818,7 +818,7 @@ class TestDeployVM(cloudstackTestCase):
         volumes = Volume.list(
                               self.apiclient,
                               type='DATADISK',
-                              account=self.account.account.name,
+                              account=self.account.name,
                               domainid=self.account.account.domainid,
                               listall=True
                               )
@@ -938,11 +938,11 @@ class TestDeployHaEnabledVM(cloudstackTestCase):
         #    should be "Created".
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     diskofferingid=self.disk_offering.id,
@@ -950,7 +950,7 @@ class TestDeployHaEnabledVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -989,7 +989,7 @@ class TestDeployHaEnabledVM(cloudstackTestCase):
         self.iso = Iso.create(
                                 self.apiclient,
                                 self.services["iso"],
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid
                                 )
         try:
@@ -1002,11 +1002,11 @@ class TestDeployHaEnabledVM(cloudstackTestCase):
 
         self.debug("Registered ISO: %s" % self.iso.name)
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     templateid=self.iso.id,
                                     serviceofferingid=self.service_offering.id,
@@ -1015,7 +1015,7 @@ class TestDeployHaEnabledVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -1052,11 +1052,11 @@ class TestDeployHaEnabledVM(cloudstackTestCase):
         #    should be "Stopped".
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     diskofferingid=self.disk_offering.id,
@@ -1064,7 +1064,7 @@ class TestDeployHaEnabledVM(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -1170,11 +1170,11 @@ class TestRouterStateAfterDeploy(cloudstackTestCase):
         #    should be "Running".
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         self.virtual_machine_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,
                                     diskofferingid=self.disk_offering.id,
@@ -1182,7 +1182,7 @@ class TestRouterStateAfterDeploy(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine_1.id
@@ -1209,7 +1209,7 @@ class TestRouterStateAfterDeploy(cloudstackTestCase):
         self.debug("Checking the router state after VM deployment")
         routers = Router.list(
                               self.apiclient,
-                              account=self.account.account.name,
+                              account=self.account.name,
                               domainid=self.account.account.domainid,
                               listall=True
                               )
@@ -1220,11 +1220,11 @@ class TestRouterStateAfterDeploy(cloudstackTestCase):
                          )
         self.debug(
             "Deploying another instance (startvm=true) in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         self.virtual_machine_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,
                                     diskofferingid=self.disk_offering.id,
@@ -1232,7 +1232,7 @@ class TestRouterStateAfterDeploy(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine_2.id
@@ -1259,7 +1259,7 @@ class TestRouterStateAfterDeploy(cloudstackTestCase):
         self.debug("Checking the router state after VM deployment")
         routers = Router.list(
                               self.apiclient,
-                              account=self.account.account.name,
+                              account=self.account.name,
                               domainid=self.account.account.domainid,
                               listall=True
                               )
@@ -1294,7 +1294,7 @@ class TestRouterStateAfterDeploy(cloudstackTestCase):
         self.debug("Checking the router state after VM deployment")
         routers = Router.list(
                               self.apiclient,
-                              account=self.account.account.name,
+                              account=self.account.name,
                               domainid=self.account.account.domainid,
                               listall=True
                               )
@@ -1392,11 +1392,11 @@ class TestDeployVMBasicZone(cloudstackTestCase):
                          "Zone must be configured in basic networking mode"
                          )
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     startvm=True,
@@ -1405,7 +1405,7 @@ class TestDeployVMBasicZone(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance ion account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -1450,11 +1450,11 @@ class TestDeployVMBasicZone(cloudstackTestCase):
                          "Zone must be configured in basic networking mode"
                          )
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     startvm=False,
@@ -1462,7 +1462,7 @@ class TestDeployVMBasicZone(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -1569,7 +1569,7 @@ class TestDeployVMFromTemplate(cloudstackTestCase):
                                         self.apiclient,
                                         self.services["template"],
                                         zoneid=self.zone.id,
-                                        account=self.account.account.name,
+                                        account=self.account.name,
                                         domainid=self.account.account.domainid
                                         )
         try:
@@ -1601,11 +1601,11 @@ class TestDeployVMFromTemplate(cloudstackTestCase):
         #    and running state
 
         self.debug("Deploying instance in the account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         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,
                                     templateid=self.template.id,
@@ -1613,7 +1613,7 @@ class TestDeployVMFromTemplate(cloudstackTestCase):
                                 )
 
         self.debug("Deployed instance in account: %s" %
-                                                    self.account.account.name)
+                                                    self.account.name)
         list_vm_response = list_virtual_machines(
                                                  self.apiclient,
                                                  id=self.virtual_machine.id
@@ -1738,24 +1738,24 @@ class TestVMAccountLimit(cloudstackTestCase):
 
         self.debug(
             "Updating instance resource limit for account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         # Set usage_vm=1 for Account 1
         update_resource_limit(
                               self.apiclient,
                               0,    # Instance
-                              account=self.account.account.name,
+                              account=self.account.name,
                               domainid=self.account.account.domainid,
                               max=1
                               )
         self.debug(
             "Deploying VM instance in account: %s" %
-                                        self.account.account.name)
+                                        self.account.name)
 
         virtual_machine = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["virtual_machine"],
                                 templateid=self.template.id,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 serviceofferingid=self.service_offering.id,
                                 startvm=False
@@ -1774,7 +1774,7 @@ class TestVMAccountLimit(cloudstackTestCase):
                                 self.apiclient,
                                 self.services["virtual_machine"],
                                 templateid=self.template.id,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 serviceofferingid=self.service_offering.id,
                                 startvm=False
@@ -1860,7 +1860,7 @@ class TestUploadAttachVolume(cloudstackTestCase):
                                self.apiclient,
                                self.services["volume"],
                                zoneid=self.zone.id,
-                               account=self.account.account.name,
+                               account=self.account.name,
                                domainid=self.account.account.domainid
                                )
             self.debug("Uploading the volume: %s" % volume.name)
@@ -1871,13 +1871,13 @@ class TestUploadAttachVolume(cloudstackTestCase):
 
         self.debug(
             "Deploying VM instance in account: %s" %
-                                        self.account.account.name)
+                                        self.account.name)
 
         virtual_machine = VirtualMachine.create(
                                 self.apiclient,
                                 self.services["virtual_machine"],
                                 templateid=self.template.id,
-                                accountid=self.account.account.name,
+                                accountid=self.account.name,
                                 domainid=self.account.account.domainid,
                                 serviceofferingid=self.service_offering.id,
                                 startvm=False
@@ -1998,7 +1998,7 @@ class TestDeployOnSpecificHost(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["virtual_machine"],
                                     templateid=self.template.id,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     domainid=self.account.account.domainid,
                                     serviceofferingid=self.service_offering.id,
                                     hostid=host.id
@@ -2012,7 +2012,7 @@ class TestDeployOnSpecificHost(cloudstackTestCase):
                                 self.apiclient,
                                 id=vm.id,
                                 listall=True,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid
                                 )
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f57a851/test/integration/component/test_tags.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_tags.py b/test/integration/component/test_tags.py
index 7b8cd57..ab5ab31 100644
--- a/test/integration/component/test_tags.py
+++ b/test/integration/component/test_tags.py
@@ -215,7 +215,7 @@ class TestResourceTags(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,
                                     mode=cls.zone.networktype
@@ -223,7 +223,7 @@ class TestResourceTags(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,
                                     mode=cls.zone.networktype
@@ -276,10 +276,10 @@ class TestResourceTags(cloudstackTestCase):
         # 3. Delete the LB rule
 
         self.debug("Fetching the network details for account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         networks = Network.list(
                                 self.apiclient,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid,
                                 listall=True
                                 )
@@ -290,12 +290,12 @@ class TestResourceTags(cloudstackTestCase):
                          )
         network = networks[0]
         self.debug("Network for the account: %s is %s" %
-                                    (self.account.account.name, network.name))
+                                    (self.account.name, network.name))
 
         self.debug("Associating public IP for network: %s" % network.id)
         public_ip = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
                                     domainid=self.account.account.domainid,
                                     networkid=network.id
@@ -310,7 +310,7 @@ class TestResourceTags(cloudstackTestCase):
                                     self.apiclient,
                                     self.services["lbrule"],
                                     ipaddressid=public_ip.ipaddress.id,
-                                    accountid=self.account.account.name
+                                    accountid=self.account.name
                                     )
 
         # Check if the LB rule created successfully
@@ -345,7 +345,7 @@ class TestResourceTags(cloudstackTestCase):
                         listall=True,
                         resourceType='LoadBalancer',
                         key='LB',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         value=40
                         )
@@ -392,7 +392,7 @@ class TestResourceTags(cloudstackTestCase):
                         listall=True,
                         resourceType='LoadBalancer',
                         key='LB',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid
                         )
 
@@ -419,10 +419,10 @@ class TestResourceTags(cloudstackTestCase):
         # 3. Delete the PF rule
 
         self.debug("Fetching the network details for account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         networks = Network.list(
                                 self.apiclient,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid,
                                 listall=True
                                 )
@@ -433,12 +433,12 @@ class TestResourceTags(cloudstackTestCase):
                          )
         network = networks[0]
         self.debug("Network for the account: %s is %s" %
-                                    (self.account.account.name, network.name))
+                                    (self.account.name, network.name))
 
         self.debug("Associating public IP for network: %s" % network.id)
         public_ip = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
                                     domainid=self.account.account.domainid,
                                     networkid=network.id
@@ -483,7 +483,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='portForwardingRule',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='PF',
                         value=40
@@ -528,7 +528,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='portForwardingRule',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='PF',
                         value=40
@@ -556,10 +556,10 @@ class TestResourceTags(cloudstackTestCase):
         # 3. Delete the firewall rule
 
         self.debug("Fetching the network details for account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         networks = Network.list(
                                 self.apiclient,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid,
                                 listall=True
                                 )
@@ -570,12 +570,12 @@ class TestResourceTags(cloudstackTestCase):
                          )
         network = networks[0]
         self.debug("Network for the account: %s is %s" %
-                                    (self.account.account.name, network.name))
+                                    (self.account.name, network.name))
 
         self.debug("Associating public IP for network: %s" % network.id)
         public_ip = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
                                     domainid=self.account.account.domainid,
                                     networkid=network.id
@@ -625,7 +625,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='FirewallRule',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='FW',
                         value='40'
@@ -670,7 +670,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='FirewallRule',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='FW',
                         value='40'
@@ -700,10 +700,10 @@ class TestResourceTags(cloudstackTestCase):
         # 3. Delete the VPN rule
 
         self.debug("Fetching the network details for account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         networks = Network.list(
                                 self.apiclient,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid,
                                 listall=True
                                 )
@@ -714,12 +714,12 @@ class TestResourceTags(cloudstackTestCase):
                          )
         network = networks[0]
         self.debug("Network for the account: %s is %s" %
-                                    (self.account.account.name, network.name))
+                                    (self.account.name, network.name))
 
         self.debug("Associating public IP for network: %s" % network.id)
         public_ip = PublicIPAddress.create(
                                     self.apiclient,
-                                    accountid=self.account.account.name,
+                                    accountid=self.account.name,
                                     zoneid=self.zone.id,
                                     domainid=self.account.account.domainid,
                                     networkid=network.id
@@ -753,7 +753,7 @@ class TestResourceTags(cloudstackTestCase):
             vpn = Vpn.create(
                         self.apiclient,
                         public_ip.ipaddress.id,
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid
                         )
 
@@ -791,7 +791,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='VPN',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='protocol',
                         value='L2TP'
@@ -822,7 +822,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='VPN',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='protocol',
                         value='L2TP'
@@ -862,7 +862,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -906,7 +906,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -977,7 +977,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='Template',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='OS',
                         value='CentOS'
@@ -1018,7 +1018,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='Template',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='OS',
                         value='CentOS'
@@ -1041,7 +1041,7 @@ class TestResourceTags(cloudstackTestCase):
         iso = Iso.create(
                          self.apiclient,
                          self.services["iso"],
-                         account=self.account.account.name,
+                         account=self.account.name,
                          domainid=self.account.account.domainid
                          )
         self.debug("ISO created with ID: %s" % iso.id)
@@ -1069,7 +1069,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='ISO',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='OS',
                         value='CentOS'
@@ -1114,7 +1114,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='ISO',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='OS',
                         value='CentOS'
@@ -1135,12 +1135,12 @@ class TestResourceTags(cloudstackTestCase):
         # 2. Delete above created tag using deleteTags API
 
         self.debug("Creating volume for account: %s " %
-                                                self.account.account.name)
+                                                self.account.name)
         volume = Volume.create(
                                self.apiclient,
                                self.services["volume"],
                                zoneid=self.zone.id,
-                               account=self.account.account.name,
+                               account=self.account.name,
                                domainid=self.account.account.domainid,
                                diskofferingid=self.disk_offering.id
                                )
@@ -1161,7 +1161,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='volume',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -1204,7 +1204,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='volume',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region'
                         )
@@ -1261,7 +1261,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='snapshot',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='type',
                         value='manual'
@@ -1311,7 +1311,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='snapshot',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='type',
                         value='manual'
@@ -1333,10 +1333,10 @@ class TestResourceTags(cloudstackTestCase):
         # 2. Delete above created tag using deleteTags API
 
         self.debug("Fetching the network details for account: %s" %
-                                                self.account.account.name)
+                                                self.account.name)
         networks = Network.list(
                                 self.apiclient,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid,
                                 listall=True
                                 )
@@ -1347,7 +1347,7 @@ class TestResourceTags(cloudstackTestCase):
                          )
         network = networks[0]
         self.debug("Network for the account: %s is %s" %
-                                    (self.account.account.name, network.name))
+                                    (self.account.name, network.name))
 
         self.debug("Creating a tag for load balancer rule")
         tag = Tag.create(
@@ -1362,7 +1362,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='Network',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -1380,7 +1380,7 @@ class TestResourceTags(cloudstackTestCase):
         
         networks = Network.list(
                                 self.apiclient,
-                                account=self.account.account.name,
+                                account=self.account.name,
                                 domainid=self.account.account.domainid,
                                 listall=True,
                                 key='region',
@@ -1408,7 +1408,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='Network',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -1478,7 +1478,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -1515,7 +1515,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -1549,7 +1549,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -1595,7 +1595,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -1641,7 +1641,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -1690,7 +1690,7 @@ class TestResourceTags(cloudstackTestCase):
         project = Project.create(
                                  self.apiclient,
                                  self.services["project"],
-                                 account=self.account.account.name,
+                                 account=self.account.name,
                                  domainid=self.account.account.domainid
                                  )
         # Cleanup created project at end of test
@@ -1757,7 +1757,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='project',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -1798,7 +1798,7 @@ class TestResourceTags(cloudstackTestCase):
         iso = Iso.create(
                          self.apiclient,
                          self.services["iso"],
-                         account=user_account.account.name,
+                         account=user_account.name,
                          domainid=user_account.account.domainid
                          )
         self.debug("ISO created with ID: %s" % iso.id)
@@ -1826,7 +1826,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='ISO',
-                        account=user_account.account.name,
+                        account=user_account.name,
                         domainid=user_account.account.domainid,
                         key='region',
                         )
@@ -1848,7 +1848,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='ISO',
-                        account=other_user_account.account.name,
+                        account=other_user_account.name,
                         domainid=other_user_account.account.domainid,
                         key='region',
                         )
@@ -1883,7 +1883,7 @@ class TestResourceTags(cloudstackTestCase):
         iso = Iso.create(
                          self.apiclient,
                          self.services["iso"],
-                         account=user_account.account.name,
+                         account=user_account.name,
                          domainid=user_account.account.domainid
                          )
         self.debug("ISO created with ID: %s" % iso.id)
@@ -1911,7 +1911,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='ISO',
-                        account=user_account.account.name,
+                        account=user_account.name,
                         domainid=user_account.account.domainid,
                         key='region',
                         )
@@ -2008,7 +2008,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -2041,7 +2041,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -2064,7 +2064,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -2097,12 +2097,12 @@ class TestResourceTags(cloudstackTestCase):
         "Test creation of same tag on multiple resources"
 
         self.debug("Creating volume for account: %s " %
-                                                self.account.account.name)
+                                                self.account.name)
         volume = Volume.create(
                                self.apiclient,
                                self.services["volume"],
                                zoneid=self.zone.id,
-                               account=self.account.account.name,
+                               account=self.account.name,
                                domainid=self.account.account.domainid,
                                diskofferingid=self.disk_offering.id
                                )
@@ -2123,7 +2123,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='volume',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         )
@@ -2151,7 +2151,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -2184,7 +2184,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -2245,7 +2245,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'
@@ -2294,7 +2294,7 @@ class TestResourceTags(cloudstackTestCase):
                         self.apiclient,
                         listall=True,
                         resourceType='userVM',
-                        account=self.account.account.name,
+                        account=self.account.name,
                         domainid=self.account.account.domainid,
                         key='region',
                         value='India'


Mime
View raw message