From 8f57a851be69afd548cabb0c82897f9a3ca1681e Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Tue, 14 May 2013 10:34:01 +0530 Subject: [PATCH] account name dereferences as account.name Fix to tests to conform to library changes. Signed-off-by: Prasanna Santhanam --- .../integration/component/test_asa1000v_fw.py | 2 +- .../component/test_high_availability.py | 44 ++-- .../component/test_host_high_availability.py | 14 +- .../component/test_netscaler_configs.py | 32 +-- .../component/test_netscaler_lb.py | 138 ++++++------- .../component/test_netscaler_lb_algo.py | 80 ++++---- .../component/test_netscaler_lb_sticky.py | 24 +-- .../component/test_redundant_router.py | 190 +++++++++--------- .../component/test_regions_accounts.py | 2 +- .../component/test_shared_networks.py | 56 +++--- test/integration/component/test_stopped_vm.py | 158 +++++++-------- test/integration/component/test_tags.py | 138 ++++++------- test/integration/component/test_vpc.py | 162 +++++++-------- .../component/test_vpc_host_maintenance.py | 44 ++-- .../integration/component/test_vpc_network.py | 132 ++++++------ .../component/test_vpc_network_lbrules.py | 22 +- .../component/test_vpc_network_pfrules.py | 22 +- .../test_vpc_network_staticnatrule.py | 22 +- .../component/test_vpc_offerings.py | 72 +++---- .../integration/component/test_vpc_routers.py | 58 +++--- .../component/test_vpc_vm_life_cycle.py | 148 +++++++------- .../component/test_vpc_vms_deployment.py | 170 ++++++++-------- 22 files changed, 865 insertions(+), 865 deletions(-) diff --git a/test/integration/component/test_asa1000v_fw.py b/test/integration/component/test_asa1000v_fw.py index 0b66f971946..cd29fdadcc9 100644 --- a/test/integration/component/test_asa1000v_fw.py +++ b/test/integration/component/test_asa1000v_fw.py @@ -131,4 +131,4 @@ class TestASASetup(cloudstackTestCase): self.debug("Cisco ASA 1000v appliance with id %s deployed"%(Asa.id)) AsaList = ASA1000V.list(self.apiclient, physicalnetworkid = self.physicalnetworks[0].id) self.assertNotEqual(len(AsaList), 0, "List ASA 1000v API returned an empty response") - Asa.delete(self.apiclient) \ No newline at end of file + Asa.delete(self.apiclient) diff --git a/test/integration/component/test_high_availability.py b/test/integration/component/test_high_availability.py index af2cda1d4d0..12753c1707f 100644 --- a/test/integration/component/test_high_availability.py +++ b/test/integration/component/test_high_availability.py @@ -214,12 +214,12 @@ class TestHighAvailability(cloudstackTestCase): hosts[0].name, hosts[1].name )) - 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 ) @@ -247,7 +247,7 @@ class TestHighAvailability(cloudstackTestCase): ) networks = Network.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -259,10 +259,10 @@ class TestHighAvailability(cloudstackTestCase): network = networks[0] self.debug("Associating public IP for account: %s" % - self.account.account.name) + self.account.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 @@ -289,7 +289,7 @@ class TestHighAvailability(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name + accountid=self.account.name ) self.debug("Created LB rule with ID: %s" % lb_rule.id) @@ -366,12 +366,12 @@ class TestHighAvailability(cloudstackTestCase): self.fail("SSH Access failed for %s: %s" % \ (virtual_machine.ipaddress, e) ) - self.debug("Deploying VM in account: %s" % self.account.account.name) + self.debug("Deploying VM in account: %s" % self.account.name) # Spawn an instance on other host 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 ) @@ -423,7 +423,7 @@ class TestHighAvailability(cloudstackTestCase): while True: vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -463,7 +463,7 @@ class TestHighAvailability(cloudstackTestCase): while True: vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -512,7 +512,7 @@ class TestHighAvailability(cloudstackTestCase): virtual_machine_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id ) @@ -609,12 +609,12 @@ class TestHighAvailability(cloudstackTestCase): hosts[0].name, hosts[1].name )) - 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 ) @@ -642,7 +642,7 @@ class TestHighAvailability(cloudstackTestCase): ) networks = Network.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -654,10 +654,10 @@ class TestHighAvailability(cloudstackTestCase): network = networks[0] self.debug("Associating public IP for account: %s" % - self.account.account.name) + self.account.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 @@ -684,7 +684,7 @@ class TestHighAvailability(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name + accountid=self.account.name ) self.debug("Created LB rule with ID: %s" % lb_rule.id) @@ -827,12 +827,12 @@ class TestHighAvailability(cloudstackTestCase): self.fail("SSH Access failed for %s: %s" % \ (virtual_machine.ipaddress, e) ) - self.debug("Deploying VM in account: %s" % self.account.account.name) + self.debug("Deploying VM in account: %s" % self.account.name) # Spawn an instance on other host 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 ) @@ -951,7 +951,7 @@ class TestHighAvailability(cloudstackTestCase): while True: vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -989,7 +989,7 @@ class TestHighAvailability(cloudstackTestCase): while True: vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1036,7 +1036,7 @@ class TestHighAvailability(cloudstackTestCase): virtual_machine_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id ) diff --git a/test/integration/component/test_host_high_availability.py b/test/integration/component/test_host_high_availability.py index 03ea0671558..7a3f62a520f 100644 --- a/test/integration/component/test_host_high_availability.py +++ b/test/integration/component/test_host_high_availability.py @@ -189,7 +189,7 @@ class TestHostHighAvailability(cloudstackTestCase): virtual_machine = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering_with_ha.id ) @@ -234,7 +234,7 @@ class TestHostHighAvailability(cloudstackTestCase): virtual_machine_with_ha = 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_with_ha.id ) @@ -288,7 +288,7 @@ class TestHostHighAvailability(cloudstackTestCase): virtual_machine_without_ha = 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_without_ha.id ) @@ -357,7 +357,7 @@ class TestHostHighAvailability(cloudstackTestCase): virtual_machine_with_ha = 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_with_ha.id ) @@ -463,7 +463,7 @@ class TestHostHighAvailability(cloudstackTestCase): virtual_machine_with_ha = 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_with_ha.id ) @@ -572,7 +572,7 @@ class TestHostHighAvailability(cloudstackTestCase): virtual_machine_with_ha = 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_with_ha.id ) @@ -704,7 +704,7 @@ class TestHostHighAvailability(cloudstackTestCase): virtual_machine_without_ha = 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_without_ha.id ) diff --git a/test/integration/component/test_netscaler_configs.py b/test/integration/component/test_netscaler_configs.py index 2cfe463aff4..1c67bc4c29e 100644 --- a/test/integration/component/test_netscaler_configs.py +++ b/test/integration/component/test_netscaler_configs.py @@ -2134,7 +2134,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -2144,7 +2144,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase): cls.vm_1 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] @@ -2152,14 +2152,14 @@ class TestGuestNetworkShutDown(cloudstackTestCase): cls.vm_2 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] ) cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -2168,7 +2168,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase): cls.api_client, cls.services["lbrule"], ipaddressid=cls.public_ip.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network.id ) cls.lb_rule.assign(cls.api_client, [cls.vm_1, cls.vm_2]) @@ -2237,7 +2237,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase): self.debug( "Stopping all the VM instances for the account: %s" % - self.account.account.name) + self.account.name) self.vm_1.stop(self.apiclient) self.vm_2.stop(self.apiclient) @@ -2311,7 +2311,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase): self.debug( "starting one VM instances for the account: %s" % - self.account.account.name) + self.account.name) self.vm_1.start(self.apiclient) vms = VirtualMachine.list( @@ -2657,7 +2657,7 @@ class TestServiceProvider(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id @@ -2690,7 +2690,7 @@ class TestServiceProvider(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id @@ -2720,20 +2720,20 @@ class TestServiceProvider(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 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)] @@ -2764,7 +2764,7 @@ class TestServiceProvider(cloudstackTestCase): self.debug("Acquiring a public IP for Network: %s" % self.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=self.network.id @@ -2777,7 +2777,7 @@ class TestServiceProvider(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.debug("Created the load balancing rule for public IP: %s" % @@ -2806,13 +2806,13 @@ class TestServiceProvider(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) 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)] diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py index 898f8b1aa15..80b3f0b8b93 100644 --- a/test/integration/component/test_netscaler_lb.py +++ b/test/integration/component/test_netscaler_lb.py @@ -244,20 +244,20 @@ class TestLbSourceNat(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 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, networkids=[str(self.network.id)] @@ -287,13 +287,13 @@ class TestLbSourceNat(cloudstackTestCase): ) self.debug("Deploying another VM in account: %s" % - self.account.account.name) + self.account.name) # Spawn an instance in that network 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, networkids=[str(self.network.id)] @@ -324,7 +324,7 @@ class TestLbSourceNat(cloudstackTestCase): src_nat_list = PublicIPAddress.list( self.apiclient, associatednetworkid=self.network.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True, issourcenat=True, @@ -350,7 +350,7 @@ class TestLbSourceNat(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=src_nat.id, - accountid=self.account.account.name + accountid=self.account.name ) return @@ -453,20 +453,20 @@ class TestLbOnIpWithPf(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 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, networkids=[str(self.network.id)] @@ -496,13 +496,13 @@ class TestLbOnIpWithPf(cloudstackTestCase): ) self.debug("Deploying another VM in account: %s" % - self.account.account.name) + self.account.name) # Spawn an instance in that network 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, networkids=[str(self.network.id)] @@ -533,7 +533,7 @@ class TestLbOnIpWithPf(cloudstackTestCase): self.debug("Associating public IP for network: %s" % self.network.id) ip_with_nat_rule = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id @@ -561,7 +561,7 @@ class TestLbOnIpWithPf(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=ip_with_nat_rule.ipaddress.id, - accountid=self.account.account.name + accountid=self.account.name ) return @@ -664,20 +664,20 @@ class TestPfOnIpWithLb(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 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, networkids=[str(self.network.id)] @@ -707,13 +707,13 @@ class TestPfOnIpWithLb(cloudstackTestCase): ) self.debug("Deploying another VM in account: %s" % - self.account.account.name) + self.account.name) # Spawn an instance in that network 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, networkids=[str(self.network.id)] @@ -745,7 +745,7 @@ class TestPfOnIpWithLb(cloudstackTestCase): ip_with_lb_rule = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id @@ -761,7 +761,7 @@ class TestPfOnIpWithLb(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=ip_with_lb_rule.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -876,20 +876,20 @@ class TestLbOnNonSourceNat(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 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, networkids=[str(self.network.id)] @@ -919,13 +919,13 @@ class TestLbOnNonSourceNat(cloudstackTestCase): ) self.debug("Deploying another VM in account: %s" % - self.account.account.name) + self.account.name) # Spawn an instance in that network 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, networkids=[str(self.network.id)] @@ -957,7 +957,7 @@ class TestLbOnNonSourceNat(cloudstackTestCase): ip_with_lb_rule = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id @@ -973,7 +973,7 @@ class TestLbOnNonSourceNat(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=ip_with_lb_rule.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -1096,20 +1096,20 @@ class TestAddMultipleVmsLb(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 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, networkids=[str(self.network.id)] @@ -1139,13 +1139,13 @@ class TestAddMultipleVmsLb(cloudstackTestCase): ) self.debug("Deploying another VM in account: %s" % - self.account.account.name) + self.account.name) # Spawn an instance in that network 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, networkids=[str(self.network.id)] @@ -1177,7 +1177,7 @@ class TestAddMultipleVmsLb(cloudstackTestCase): ip_with_lb_rule = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id @@ -1193,7 +1193,7 @@ class TestAddMultipleVmsLb(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=ip_with_lb_rule.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -1370,20 +1370,20 @@ class TestMultipleLbRules(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 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, networkids=[str(self.network.id)] @@ -1413,13 +1413,13 @@ class TestMultipleLbRules(cloudstackTestCase): ) self.debug("Deploying another VM in account: %s" % - self.account.account.name) + self.account.name) # Spawn an instance in that network 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, networkids=[str(self.network.id)] @@ -1453,7 +1453,7 @@ class TestMultipleLbRules(cloudstackTestCase): public_ip_1 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id @@ -1472,7 +1472,7 @@ class TestMultipleLbRules(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip_1.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -1499,7 +1499,7 @@ class TestMultipleLbRules(cloudstackTestCase): public_ip_2 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id @@ -1518,7 +1518,7 @@ class TestMultipleLbRules(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip_2.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -1687,20 +1687,20 @@ class TestMultipleLbRulesSameIp(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 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, networkids=[str(self.network.id)] @@ -1730,13 +1730,13 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase): ) self.debug("Deploying another VM in account: %s" % - self.account.account.name) + self.account.name) # Spawn an instance in that network 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, networkids=[str(self.network.id)] @@ -1770,7 +1770,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase): 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=self.network.id @@ -1789,7 +1789,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -1823,7 +1823,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.debug("Create LB rule on same port failed!") @@ -1838,7 +1838,7 @@ class TestMultipleLbRulesSameIp(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -1952,7 +1952,7 @@ class TestLoadBalancingRule(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -1962,14 +1962,14 @@ class TestLoadBalancingRule(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] ) cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -1978,7 +1978,7 @@ class TestLoadBalancingRule(cloudstackTestCase): cls.api_client, cls.services["lbrule"], ipaddressid=cls.public_ip.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network.id ) cls._cleanup = [ @@ -2176,7 +2176,7 @@ class TestDeleteCreateLBRule(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -2186,14 +2186,14 @@ class TestDeleteCreateLBRule(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] ) cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -2231,7 +2231,7 @@ class TestDeleteCreateLBRule(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup = [] @@ -2267,7 +2267,7 @@ class TestDeleteCreateLBRule(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -2315,7 +2315,7 @@ class TestVmWithLb(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -2325,7 +2325,7 @@ class TestVmWithLb(cloudstackTestCase): cls.vm_1 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] @@ -2333,14 +2333,14 @@ class TestVmWithLb(cloudstackTestCase): cls.vm_2 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] ) cls.public_ip_1 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -2349,12 +2349,12 @@ class TestVmWithLb(cloudstackTestCase): cls.api_client, cls.services["lbrule"], ipaddressid=cls.public_ip_1.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network.id ) cls.public_ip_2 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -2363,7 +2363,7 @@ class TestVmWithLb(cloudstackTestCase): cls.api_client, cls.services["lbrule"], ipaddressid=cls.public_ip_2.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network.id ) cls._cleanup = [ diff --git a/test/integration/component/test_netscaler_lb_algo.py b/test/integration/component/test_netscaler_lb_algo.py index 75b15d61c43..4a2d1fe4c2b 100644 --- a/test/integration/component/test_netscaler_lb_algo.py +++ b/test/integration/component/test_netscaler_lb_algo.py @@ -211,20 +211,20 @@ class TestLbWithRoundRobin(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)] @@ -257,7 +257,7 @@ class TestLbWithRoundRobin(cloudstackTestCase): ip_with_lb_rule = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id @@ -275,7 +275,7 @@ class TestLbWithRoundRobin(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=ip_with_lb_rule.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -424,20 +424,20 @@ class TestLbWithLeastConn(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)] @@ -470,14 +470,14 @@ class TestLbWithLeastConn(cloudstackTestCase): PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id ) ip_with_lb_rule = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id @@ -495,7 +495,7 @@ class TestLbWithLeastConn(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=ip_with_lb_rule.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -643,20 +643,20 @@ class TestLbWithSourceIp(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)] @@ -689,7 +689,7 @@ class TestLbWithSourceIp(cloudstackTestCase): ip_with_lb_rule = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network.id @@ -707,7 +707,7 @@ class TestLbWithSourceIp(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=ip_with_lb_rule.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) @@ -790,7 +790,7 @@ class TestLbAlgoRrLc(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -807,14 +807,14 @@ class TestLbAlgoRrLc(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] ) cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -885,7 +885,7 @@ class TestLbAlgoRrLc(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -1002,7 +1002,7 @@ class TestLbAlgoLcRr(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -1019,14 +1019,14 @@ class TestLbAlgoLcRr(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] ) cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -1097,7 +1097,7 @@ class TestLbAlgoLcRr(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -1211,7 +1211,7 @@ class TestLbAlgoRrSb(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -1228,7 +1228,7 @@ class TestLbAlgoRrSb(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] @@ -1236,7 +1236,7 @@ class TestLbAlgoRrSb(cloudstackTestCase): cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -1307,7 +1307,7 @@ class TestLbAlgoRrSb(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -1424,7 +1424,7 @@ class TestLbAlgoSbRr(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -1441,7 +1441,7 @@ class TestLbAlgoSbRr(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] @@ -1449,7 +1449,7 @@ class TestLbAlgoSbRr(cloudstackTestCase): cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -1519,7 +1519,7 @@ class TestLbAlgoSbRr(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -1638,7 +1638,7 @@ class TestLbAlgoSbLc(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -1655,7 +1655,7 @@ class TestLbAlgoSbLc(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] @@ -1663,7 +1663,7 @@ class TestLbAlgoSbLc(cloudstackTestCase): cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -1734,7 +1734,7 @@ class TestLbAlgoSbLc(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -1852,7 +1852,7 @@ class TestLbAlgoLcSb(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -1869,14 +1869,14 @@ class TestLbAlgoLcSb(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] ) cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -1947,7 +1947,7 @@ class TestLbAlgoLcSb(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) diff --git a/test/integration/component/test_netscaler_lb_sticky.py b/test/integration/component/test_netscaler_lb_sticky.py index a921f4b3afe..7f391d0f79a 100644 --- a/test/integration/component/test_netscaler_lb_sticky.py +++ b/test/integration/component/test_netscaler_lb_sticky.py @@ -155,7 +155,7 @@ class TestLbStickyPolicy(cloudstackTestCase): cls.network = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.network_offering.id, zoneid=cls.zone.id @@ -165,14 +165,14 @@ class TestLbStickyPolicy(cloudstackTestCase): cls.virtual_machine = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network.id)] ) cls.public_ip = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network.id @@ -242,7 +242,7 @@ class TestLbStickyPolicy(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -331,7 +331,7 @@ class TestLbStickyPolicy(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -420,7 +420,7 @@ class TestLbStickyPolicy(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -511,7 +511,7 @@ class TestLbStickyPolicy(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -602,7 +602,7 @@ class TestLbStickyPolicy(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -693,7 +693,7 @@ class TestLbStickyPolicy(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -784,7 +784,7 @@ class TestLbStickyPolicy(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -875,7 +875,7 @@ class TestLbStickyPolicy(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) @@ -966,7 +966,7 @@ class TestLbStickyPolicy(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=self.public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=self.network.id ) self.cleanup.append(lb_rule) diff --git a/test/integration/component/test_redundant_router.py b/test/integration/component/test_redundant_router.py index c24a58a694f..aaac13df781 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)], diff --git a/test/integration/component/test_regions_accounts.py b/test/integration/component/test_regions_accounts.py index 113f725f598..886e6209f20 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) diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py index 8d602067eec..9845826bea6 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 diff --git a/test/integration/component/test_stopped_vm.py b/test/integration/component/test_stopped_vm.py index 68f5edc8958..10e3d4d0b83 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 ) diff --git a/test/integration/component/test_tags.py b/test/integration/component/test_tags.py index 7b8cd5774ec..ab5ab310094 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' diff --git a/test/integration/component/test_vpc.py b/test/integration/component/test_vpc.py index 82eeac10a98..1156b5b6c3e 100644 --- a/test/integration/component/test_vpc.py +++ b/test/integration/component/test_vpc.py @@ -309,13 +309,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -341,13 +341,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -372,7 +372,7 @@ class TestVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -396,7 +396,7 @@ class TestVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering_no_lb.id, zoneid=self.zone.id, @@ -425,13 +425,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -468,13 +468,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -499,7 +499,7 @@ class TestVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -523,7 +523,7 @@ class TestVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering_no_lb.id, zoneid=self.zone.id, @@ -574,7 +574,7 @@ class TestVPC(cloudstackTestCase): self.debug("Check if VR is deleted or not?") routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -606,13 +606,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc_1 = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc_1) @@ -623,7 +623,7 @@ class TestVPC(cloudstackTestCase): self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc_2) @@ -713,7 +713,7 @@ class TestVPC(cloudstackTestCase): self.apiclient, supportedservices='Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL', listall=True, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.assertEqual( @@ -732,7 +732,7 @@ class TestVPC(cloudstackTestCase): self.apiclient, restartrequired=True, listall=True, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) if vpcs is not None: @@ -747,7 +747,7 @@ class TestVPC(cloudstackTestCase): self.apiclient, restartrequired=False, listall=True, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.assertEqual( @@ -782,13 +782,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc_1 = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc_1) @@ -861,14 +861,14 @@ class TestVPC(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -897,7 +897,7 @@ class TestVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering_no_lb.id, zoneid=self.zone.id, @@ -912,7 +912,7 @@ class TestVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -926,7 +926,7 @@ class TestVPC(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -936,7 +936,7 @@ class TestVPC(cloudstackTestCase): vm_2 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -948,7 +948,7 @@ class TestVPC(cloudstackTestCase): vm_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_2.id)] @@ -958,7 +958,7 @@ class TestVPC(cloudstackTestCase): vm_4 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_2.id)] @@ -968,7 +968,7 @@ class TestVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_1.name) public_ip_1 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_1.id, @@ -1000,7 +1000,7 @@ class TestVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_1.name) public_ip_2 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_1.id, @@ -1030,7 +1030,7 @@ class TestVPC(cloudstackTestCase): networkid=network_1.id, listall=True, isstaticnat=True, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.assertEqual( @@ -1047,7 +1047,7 @@ class TestVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % vpc.name) public_ip_3 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_2.id, @@ -1065,7 +1065,7 @@ class TestVPC(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip_3.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network_2.id, vpcid=vpc.id, domainid=self.account.account.domainid @@ -1206,14 +1206,14 @@ class TestVPC(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1242,7 +1242,7 @@ class TestVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering_no_lb.id, zoneid=self.zone.id, @@ -1257,7 +1257,7 @@ class TestVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1271,7 +1271,7 @@ class TestVPC(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -1281,7 +1281,7 @@ class TestVPC(cloudstackTestCase): vm_2 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -1293,7 +1293,7 @@ class TestVPC(cloudstackTestCase): vm_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_2.id)] @@ -1303,7 +1303,7 @@ class TestVPC(cloudstackTestCase): vm_4 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_2.id)] @@ -1313,7 +1313,7 @@ class TestVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_1.name) public_ip_1 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_1.id, @@ -1345,7 +1345,7 @@ class TestVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_1.name) public_ip_2 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_1.id, @@ -1375,7 +1375,7 @@ class TestVPC(cloudstackTestCase): networkid=network_1.id, listall=True, isstaticnat=True, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.assertEqual( @@ -1392,7 +1392,7 @@ class TestVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % vpc.name) public_ip_3 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_2.id, @@ -1410,7 +1410,7 @@ class TestVPC(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip_3.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network_2.id, vpcid=vpc.id, domainid=self.account.account.domainid @@ -1551,13 +1551,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1573,7 +1573,7 @@ class TestVPC(cloudstackTestCase): self.debug("Verify if the Router has started") routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1589,7 +1589,7 @@ class TestVPC(cloudstackTestCase): src_nat_list = PublicIPAddress.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True, issourcenat=True, @@ -1607,13 +1607,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("Creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc_1 = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc_1) @@ -1621,27 +1621,27 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.2.1.1/16" self.debug( "Creating a non-overlapping VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc_2 = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc_2) self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("Creating a overlapping VPC network in the account: %s" % - self.account.account.name) + self.account.name) try: vpc_3 = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.debug("%s" % vpc_3) @@ -1669,14 +1669,14 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1700,7 +1700,7 @@ class TestVPC(cloudstackTestCase): network = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1713,7 +1713,7 @@ class TestVPC(cloudstackTestCase): virtual_machine = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)] @@ -1728,7 +1728,7 @@ class TestVPC(cloudstackTestCase): src_nat_ip_addr = PublicIPAddress.create( self.apiclient, zoneid=self.zone.id, - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkid=network.id, vpcid=vpc.id @@ -1816,13 +1816,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1851,7 +1851,7 @@ class TestVPC(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1871,14 +1871,14 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) netdomain = "cl2.internal" vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkDomain=netdomain ) @@ -1903,7 +1903,7 @@ class TestVPC(cloudstackTestCase): network = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1916,7 +1916,7 @@ class TestVPC(cloudstackTestCase): virtual_machine = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)] @@ -2346,7 +2346,7 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) # Create VPC without vpcOffering param with self.assertRaises(Exception): @@ -2354,7 +2354,7 @@ class TestVPC(cloudstackTestCase): self.apiclient, self.services["vpc"], zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) @@ -2366,7 +2366,7 @@ class TestVPC(cloudstackTestCase): self.services["vpc_no_name"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) @@ -2376,7 +2376,7 @@ class TestVPC(cloudstackTestCase): self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) @@ -2391,7 +2391,7 @@ class TestVPC(cloudstackTestCase): vpc_wo_cidr, vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) @@ -2407,13 +2407,13 @@ class TestVPC(cloudstackTestCase): self.services["vpc"]["cidr"] = "10.1.1.1/16" self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -2438,7 +2438,7 @@ class TestVPC(cloudstackTestCase): network = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -2664,14 +2664,14 @@ class TestVPCHostMaintenance(cloudstackTestCase): # 3. VPC will be created but will be in "Disabled" state self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc, state='Disabled') @@ -2690,14 +2690,14 @@ class TestVPCHostMaintenance(cloudstackTestCase): # get deleted self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc, state='Disabled') diff --git a/test/integration/component/test_vpc_host_maintenance.py b/test/integration/component/test_vpc_host_maintenance.py index b2ffcbfb073..4c14f991954 100644 --- a/test/integration/component/test_vpc_host_maintenance.py +++ b/test/integration/component/test_vpc_host_maintenance.py @@ -241,7 +241,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -257,7 +257,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): cls.network_1 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off.id, zoneid=cls.zone.id, @@ -276,7 +276,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): cls.network_2 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off_no_lb.id, zoneid=cls.zone.id, @@ -287,7 +287,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): cls.vm_1 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_1.id, networkids=[str(cls.network_1.id)] @@ -296,7 +296,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): cls.vm_2 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_1.id, networkids=[str(cls.network_1.id)] @@ -304,14 +304,14 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): cls.vm_3 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_2.id, networkids=[str(cls.network_2.id)] ) routers = Router.list( cls.api_client, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid, listall=True ) @@ -375,7 +375,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=self.network_1.id, listall=True @@ -390,7 +390,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=self.network_2.id, listall=True @@ -440,7 +440,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): "Check if all instances belonging to the account are up again?") routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -457,7 +457,7 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): ) vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -617,7 +617,7 @@ class TestVPCNetworkRules(cloudstackTestCase): cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -633,7 +633,7 @@ class TestVPCNetworkRules(cloudstackTestCase): cls.network_1 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off.id, zoneid=cls.zone.id, @@ -652,7 +652,7 @@ class TestVPCNetworkRules(cloudstackTestCase): cls.network_2 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off_no_lb.id, zoneid=cls.zone.id, @@ -663,7 +663,7 @@ class TestVPCNetworkRules(cloudstackTestCase): cls.vm_1 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_1.id, networkids=[str(cls.network_1.id)] @@ -672,7 +672,7 @@ class TestVPCNetworkRules(cloudstackTestCase): cls.vm_2 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_2.id, networkids=[str(cls.network_1.id)] @@ -680,7 +680,7 @@ class TestVPCNetworkRules(cloudstackTestCase): cls.vm_3 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_1.id, networkids=[str(cls.network_2.id)] @@ -688,7 +688,7 @@ class TestVPCNetworkRules(cloudstackTestCase): cls.vm_4 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_2.id, networkids=[str(cls.network_2.id)] @@ -738,7 +738,7 @@ class TestVPCNetworkRules(cloudstackTestCase): vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=self.network_1.id, listall=True @@ -753,7 +753,7 @@ class TestVPCNetworkRules(cloudstackTestCase): vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=self.network_2.id, listall=True @@ -798,7 +798,7 @@ class TestVPCNetworkRules(cloudstackTestCase): self.network_1.name) public_ip_1 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network_1.id, @@ -823,7 +823,7 @@ class TestVPCNetworkRules(cloudstackTestCase): self.network_2.name) public_ip_2 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=self.network_2.id, diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py index e09b4157e8b..0adf9d7fcdc 100644 --- a/test/integration/component/test_vpc_network.py +++ b/test/integration/component/test_vpc_network.py @@ -325,14 +325,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -352,7 +352,7 @@ class TestVPCNetwork(cloudstackTestCase): network = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -418,14 +418,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -450,7 +450,7 @@ class TestVPCNetwork(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -489,14 +489,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -516,7 +516,7 @@ class TestVPCNetwork(cloudstackTestCase): network = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -580,14 +580,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -607,7 +607,7 @@ class TestVPCNetwork(cloudstackTestCase): network = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -645,7 +645,7 @@ class TestVPCNetwork(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -685,14 +685,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -736,14 +736,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -771,7 +771,7 @@ class TestVPCNetwork(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -813,14 +813,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -841,7 +841,7 @@ class TestVPCNetwork(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -882,14 +882,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -944,14 +944,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -975,7 +975,7 @@ class TestVPCNetwork(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1014,14 +1014,14 @@ class TestVPCNetwork(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1192,7 +1192,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1214,7 +1214,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1254,7 +1254,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1276,7 +1276,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1316,7 +1316,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1341,7 +1341,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1383,7 +1383,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1405,7 +1405,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): network = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1446,7 +1446,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1464,7 +1464,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1504,7 +1504,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1539,7 +1539,7 @@ class TestVPCNetworkRanges(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=account.account.name, + accountid=account.name, domainid=account.account.domainid, networkofferingid=self.network_offering.id, zoneid=self.zone.id, @@ -1702,14 +1702,14 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1750,7 +1750,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_pf.id, zoneid=self.zone.id, @@ -1764,7 +1764,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -1773,7 +1773,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): vm_2 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -1783,7 +1783,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_1.name) public_ip_1 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_1.id, @@ -1801,7 +1801,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip_1.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network_1.id, vpcid=vpc.id, domainid=self.account.account.domainid @@ -1814,7 +1814,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_1.name) public_ip_2 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_1.id, @@ -1844,7 +1844,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): networkid=network_1.id, listall=True, isstaticnat=True, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.assertEqual( @@ -1932,7 +1932,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): self.debug("Associating public IP for network: %s" % vpc.name) public_ip_3 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_1.id, @@ -2051,14 +2051,14 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -2098,7 +2098,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -2112,7 +2112,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -2181,7 +2181,7 @@ class TestVPCNetworkGc(cloudstackTestCase): cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -2196,7 +2196,7 @@ class TestVPCNetworkGc(cloudstackTestCase): cls.network_1 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off.id, zoneid=cls.zone.id, @@ -2207,7 +2207,7 @@ class TestVPCNetworkGc(cloudstackTestCase): cls.vm_1 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id)] @@ -2215,14 +2215,14 @@ class TestVPCNetworkGc(cloudstackTestCase): cls.vm_2 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id)] ) cls.public_ip_1 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -2232,7 +2232,7 @@ class TestVPCNetworkGc(cloudstackTestCase): cls.api_client, cls.services["lbrule"], ipaddressid=cls.public_ip_1.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network_1.id, vpcid=cls.vpc.id, domainid=cls.account.account.domainid @@ -2241,7 +2241,7 @@ class TestVPCNetworkGc(cloudstackTestCase): cls.public_ip_2 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -2288,7 +2288,7 @@ class TestVPCNetworkGc(cloudstackTestCase): # Stop all the VMs as part of test vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -2304,7 +2304,7 @@ class TestVPCNetworkGc(cloudstackTestCase): # Start all the VMs after test execution vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -2395,7 +2395,7 @@ class TestVPCNetworkGc(cloudstackTestCase): self.debug("Check if the VPC router is in stopped state?") routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -2511,10 +2511,10 @@ class TestVPCNetworkGc(cloudstackTestCase): ["network.gc.interval", "network.gc.wait"]) self.debug("Finding the VPC virtual router for account: %s" % - self.account.account.name) + self.account.name) routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) diff --git a/test/integration/component/test_vpc_network_lbrules.py b/test/integration/component/test_vpc_network_lbrules.py index 6f7b05fd754..a24e8139b95 100644 --- a/test/integration/component/test_vpc_network_lbrules.py +++ b/test/integration/component/test_vpc_network_lbrules.py @@ -236,14 +236,14 @@ class TestVPCNetworkLBRules(cloudstackTestCase): self.debug("Enabling the VPC offering created") self.vpc_off.update(self.apiclient, state='Enabled') - self.debug("Creating a VPC network in the account: %s" % self.account.account.name) + self.debug("Creating a VPC network in the account: %s" % self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' self.vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) return @@ -263,7 +263,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase): def get_Router_For_VPC(self): routers = list_routers(self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, ) self.assertEqual(isinstance(routers, list), @@ -286,7 +286,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase): self.apiclient.stopRouter(cmd) routers = list_routers(self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, ) self.assertEqual(isinstance(routers, list), @@ -307,7 +307,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase): self.apiclient.startRouter(cmd) routers = list_routers(self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, zoneid=self.zone.id ) @@ -389,7 +389,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase): def acquire_Public_IP(self, network): self.debug("Associating public IP for network: %s" % network.name) public_ip = PublicIPAddress.create(self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=None, #network.id, @@ -412,14 +412,14 @@ class TestVPCNetworkLBRules(cloudstackTestCase): self.debug("Enabling the VPC offering created") vpc_off.update(self.apiclient, state='Enabled') - self.debug("Creating a VPC network in the account: %s" % self.account.account.name) + self.debug("Creating a VPC network in the account: %s" % self.account.name) self.services["vpc"]["cidr"] = cidr vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) return vpc @@ -441,7 +441,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase): self.debug('Adding Network=%s' % self.services["network"]) obj_network = Network.create(self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -459,7 +459,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase): vm = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)], @@ -484,7 +484,7 @@ class TestVPCNetworkLBRules(cloudstackTestCase): self.apiclient, objservices, ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network.id, vpcid=self.vpc.id, domainid=self.account.account.domainid diff --git a/test/integration/component/test_vpc_network_pfrules.py b/test/integration/component/test_vpc_network_pfrules.py index 95254d84eb6..aac956810d1 100644 --- a/test/integration/component/test_vpc_network_pfrules.py +++ b/test/integration/component/test_vpc_network_pfrules.py @@ -235,14 +235,14 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.debug("Enabling the VPC offering created") self.vpc_off.update(self.apiclient, state='Enabled') - self.debug("Creating a VPC network in the account: %s" % self.account.account.name) + self.debug("Creating a VPC network in the account: %s" % self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' self.vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) return @@ -261,7 +261,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): def get_Router_For_VPC(self): routers = list_routers(self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, ) self.assertEqual(isinstance(routers, list), @@ -284,7 +284,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.apiclient.stopRouter(cmd) routers = list_routers(self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, ) self.assertEqual(isinstance(routers, list), @@ -305,7 +305,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.apiclient.startRouter(cmd) routers = list_routers(self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, zoneid=self.zone.id ) @@ -389,7 +389,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): def acquire_Public_IP(self, network): self.debug("Associating public IP for network: %s" % network.name) public_ip = PublicIPAddress.create(self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=None, #network.id, @@ -412,14 +412,14 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.debug("Enabling the VPC offering created") vpc_off.update(self.apiclient, state='Enabled') - self.debug("Creating a VPC network in the account: %s" % self.account.account.name) + self.debug("Creating a VPC network in the account: %s" % self.account.name) self.services["vpc"]["cidr"] = cidr vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) return vpc @@ -441,7 +441,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.debug('Adding Network=%s' % self.services["network"]) obj_network = Network.create(self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -459,7 +459,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): vm = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)], @@ -484,7 +484,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.apiclient, objservices, ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network.id, vpcid=self.vpc.id, domainid=self.account.account.domainid diff --git a/test/integration/component/test_vpc_network_staticnatrule.py b/test/integration/component/test_vpc_network_staticnatrule.py index 3b3d41a2573..842d20ad089 100644 --- a/test/integration/component/test_vpc_network_staticnatrule.py +++ b/test/integration/component/test_vpc_network_staticnatrule.py @@ -235,14 +235,14 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.debug("Enabling the VPC offering created") self.vpc_off.update(self.apiclient, state='Enabled') - self.debug("Creating a VPC network in the account: %s" % self.account.account.name) + self.debug("Creating a VPC network in the account: %s" % self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' self.vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=self.vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) return @@ -261,7 +261,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): def get_Router_For_VPC(self): routers = list_routers(self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, ) self.assertEqual(isinstance(routers, list), @@ -284,7 +284,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.apiclient.stopRouter(cmd) routers = list_routers(self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, ) self.assertEqual(isinstance(routers, list), @@ -305,7 +305,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.apiclient.startRouter(cmd) routers = list_routers(self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, zoneid=self.zone.id ) @@ -389,7 +389,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): def acquire_Public_IP(self, network): self.debug("Associating public IP for network: %s" % network.name) public_ip = PublicIPAddress.create(self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=None, #network.id, @@ -412,14 +412,14 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.debug("Enabling the VPC offering created") vpc_off.update(self.apiclient, state='Enabled') - self.debug("Creating a VPC network in the account: %s" % self.account.account.name) + self.debug("Creating a VPC network in the account: %s" % self.account.name) self.services["vpc"]["cidr"] = cidr vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) return vpc @@ -441,7 +441,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.debug('Adding Network=%s' % self.services["network"]) obj_network = Network.create(self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -459,7 +459,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): vm = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)], @@ -484,7 +484,7 @@ class TestVPCNetworkPFRules(cloudstackTestCase): self.apiclient, objservices, ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network.id, vpcid=self.vpc.id, domainid=self.account.account.domainid diff --git a/test/integration/component/test_vpc_offerings.py b/test/integration/component/test_vpc_offerings.py index 5cf62b83621..033a90522c4 100644 --- a/test/integration/component/test_vpc_offerings.py +++ b/test/integration/component/test_vpc_offerings.py @@ -308,13 +308,13 @@ class TestVPCOffering(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -339,7 +339,7 @@ class TestVPCOffering(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, @@ -351,7 +351,7 @@ class TestVPCOffering(cloudstackTestCase): virtual_machine = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)] @@ -361,7 +361,7 @@ class TestVPCOffering(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, @@ -379,7 +379,7 @@ class TestVPCOffering(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network.id, vpcid=vpc.id, domainid=self.account.account.domainid @@ -388,7 +388,7 @@ class TestVPCOffering(cloudstackTestCase): self.debug("Associating public IP for network: %s" % vpc.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, @@ -436,7 +436,7 @@ class TestVPCOffering(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, @@ -466,7 +466,7 @@ class TestVPCOffering(cloudstackTestCase): networkid=network.id, listall=True, isstaticnat=True, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.assertEqual( @@ -483,7 +483,7 @@ class TestVPCOffering(cloudstackTestCase): # self.debug("Associating public IP for network: %s" % network.name) # public_ip_4 = 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, @@ -495,27 +495,27 @@ class TestVPCOffering(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_4.ipaddress.id, -# account=self.account.account.name, +# account=self.account.name, # domainid=self.account.account.domainid, # networkid=network.id, # vpcid=vpc.id # ) # 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: @@ -524,7 +524,7 @@ class TestVPCOffering(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_4.ipaddress.id, # listall=True @@ -535,7 +535,7 @@ class TestVPCOffering(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) return @attr(tags=["advanced", "intervlan"]) @@ -589,13 +589,13 @@ class TestVPCOffering(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -611,7 +611,7 @@ class TestVPCOffering(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, @@ -625,7 +625,7 @@ class TestVPCOffering(cloudstackTestCase): virtual_machine = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)] @@ -635,7 +635,7 @@ class TestVPCOffering(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, @@ -653,7 +653,7 @@ class TestVPCOffering(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network.id, vpcid=vpc.id ) @@ -708,13 +708,13 @@ class TestVPCOffering(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -730,7 +730,7 @@ class TestVPCOffering(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, @@ -744,7 +744,7 @@ class TestVPCOffering(cloudstackTestCase): virtual_machine = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)] @@ -754,7 +754,7 @@ class TestVPCOffering(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, @@ -829,13 +829,13 @@ class TestVPCOffering(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -851,7 +851,7 @@ class TestVPCOffering(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, @@ -863,7 +863,7 @@ class TestVPCOffering(cloudstackTestCase): virtual_machine = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)] @@ -873,7 +873,7 @@ class TestVPCOffering(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, @@ -967,14 +967,14 @@ class TestVPCOffering(cloudstackTestCase): vpc_off.update(self.apiclient, state='Disabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) with self.assertRaises(Exception): VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.debug("VPC network creation failed! (Test succeeded)") @@ -982,13 +982,13 @@ class TestVPCOffering(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) diff --git a/test/integration/component/test_vpc_routers.py b/test/integration/component/test_vpc_routers.py index 5beb0a12214..55cb513130f 100644 --- a/test/integration/component/test_vpc_routers.py +++ b/test/integration/component/test_vpc_routers.py @@ -206,14 +206,14 @@ class TestVPCRoutersBasic(cloudstackTestCase): cls.vpc_off.update(cls.apiclient, state='Enabled') #cls.debug("creating a VPC network in the account: %s" % - # cls.account.account.name) + # cls.account.name) cls.services["vpc"]["cidr"] = '10.1.1.1/16' cls.vpc = VPC.create( cls.apiclient, cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -360,7 +360,7 @@ class TestVPCRoutersBasic(cloudstackTestCase): # Stop the VPC Router routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -435,7 +435,7 @@ class TestVPCRoutersBasic(cloudstackTestCase): self.validate_vpc_network(self.vpc) routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -482,7 +482,7 @@ class TestVPCRoutersBasic(cloudstackTestCase): self.validate_vpc_network(self.vpc) routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -498,7 +498,7 @@ class TestVPCRoutersBasic(cloudstackTestCase): routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -519,7 +519,7 @@ class TestVPCRoutersBasic(cloudstackTestCase): routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -547,7 +547,7 @@ class TestVPCRoutersBasic(cloudstackTestCase): routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -580,7 +580,7 @@ class TestVPCRoutersBasic(cloudstackTestCase): self.debug("Router %s" % router) routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -638,7 +638,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -655,7 +655,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): cls.network_1 = Network.create( cls.apiclient, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off.id, zoneid=cls.zone.id, @@ -667,7 +667,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): vm_1 = VirtualMachine.create( cls.apiclient, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id)] @@ -675,7 +675,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): vm_2 = VirtualMachine.create( cls.apiclient, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id)] @@ -685,7 +685,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): vm_3 = VirtualMachine.create( cls.apiclient, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id)] @@ -693,13 +693,13 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): vms = VirtualMachine.list( cls.apiclient, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid, listall=True ) public_ip_1 = PublicIPAddress.create( cls.apiclient, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -725,7 +725,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): public_ip_2 = PublicIPAddress.create( cls.apiclient, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -747,7 +747,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): networkid=cls.network_1.id, listall=True, isstaticnat=True, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) # cls.assertEqual( @@ -764,7 +764,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): public_ip_3 = PublicIPAddress.create( cls.apiclient, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -776,7 +776,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): cls.apiclient, cls.services["lbrule"], ipaddressid=public_ip_3.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network_1.id, vpcid=cls.vpc.id, domainid=cls.account.account.domainid @@ -960,13 +960,13 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): """ vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) public_ips = PublicIPAddress.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1085,7 +1085,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): # Stop the VPC Router routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1179,7 +1179,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1246,7 +1246,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1262,7 +1262,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1305,7 +1305,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): ) routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1350,7 +1350,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1383,7 +1383,7 @@ class TestVPCRouterOneNetwork(cloudstackTestCase): self.debug("Router %s" % router) routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 247599e7251..13726c58ce4 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -236,7 +236,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -252,7 +252,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): cls.network_1 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off.id, zoneid=cls.zone.id, @@ -271,7 +271,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): cls.network_2 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off_no_lb.id, zoneid=cls.zone.id, @@ -282,7 +282,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): cls.vm_1 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id)] @@ -291,7 +291,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): cls.vm_2 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id)] @@ -299,7 +299,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): cls.vm_3 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_2.id)] @@ -307,7 +307,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): cls.public_ip_1 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -317,7 +317,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): cls.api_client, cls.services["lbrule"], ipaddressid=cls.public_ip_1.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network_1.id, vpcid=cls.vpc.id, domainid=cls.account.account.domainid @@ -326,7 +326,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): cls.public_ip_2 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -515,7 +515,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -543,7 +543,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): # 2. Rules should be still configured on virtual router. self.debug("Stopping the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.stop(self.apiclient) self.vm_2.stop(self.apiclient) @@ -588,7 +588,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): # 3. Make sure that we are able to access google.com from this user Vm self.debug("Starting the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.start(self.apiclient) self.vm_2.start(self.apiclient) @@ -614,7 +614,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): self.validate_network_rules() self.debug("Starting the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.reboot(self.apiclient) self.vm_2.reboot(self.apiclient) @@ -638,7 +638,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): self.validate_network_rules() self.debug("Destroying the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.delete(self.apiclient) self.vm_2.delete(self.apiclient) @@ -683,7 +683,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): # 3. Make sure that we are able to access google.com from this user Vm self.debug("Recovering the expunged virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.recover(self.apiclient) self.vm_2.recover(self.apiclient) @@ -874,7 +874,7 @@ class TestVMLifeCycleVPC(cloudstackTestCase): self.validate_network_rules() self.debug("Delete virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.delete(self.apiclient) self.vm_2.delete(self.apiclient) @@ -965,7 +965,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -981,7 +981,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): cls.network_1 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off.id, zoneid=cls.zone.id, @@ -1005,7 +1005,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): cls.network_2 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.shared_nw_off.id, zoneid=cls.zone.id, @@ -1016,7 +1016,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): cls.vm_1 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id), @@ -1026,7 +1026,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): cls.vm_2 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id), @@ -1035,7 +1035,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): cls.vm_3 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id), @@ -1043,7 +1043,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): ) cls.public_ip_1 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -1053,7 +1053,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): cls.api_client, cls.services["lbrule"], ipaddressid=cls.public_ip_1.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network_1.id, vpcid=cls.vpc.id, domainid=cls.account.account.domainid @@ -1062,7 +1062,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): cls.public_ip_2 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -1241,7 +1241,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1275,7 +1275,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): self.validate_network_rules() self.debug("Stopping one of the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_2.stop(self.apiclient) except Exception as e: @@ -1316,7 +1316,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): self.validate_network_rules() self.debug("Starting one of the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_2.start(self.apiclient) except Exception as e: @@ -1357,7 +1357,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): self.validate_network_rules() self.debug("Restarting the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.reboot(self.apiclient) self.vm_2.reboot(self.apiclient) @@ -1367,7 +1367,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): self.debug("Check if the instance is in stopped state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1397,7 +1397,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): # 2. Rules should be still configured on virtual router. self.debug("Destroying one of the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_2.delete(self.apiclient) except Exception as e: @@ -1438,7 +1438,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): # 3. Make sure that we are able to access google.com from this user Vm self.debug("Recovering the expunged virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_2.recover(self.apiclient) except Exception as e: @@ -1662,7 +1662,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): self.validate_network_rules() self.debug("Delete virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_2.delete(self.apiclient) except Exception as e: @@ -1681,7 +1681,7 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): self.debug( "Deleting the rest of the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.delete(self.apiclient) self.vm_3.delete(self.apiclient) @@ -1772,7 +1772,7 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase): cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -1788,7 +1788,7 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase): cls.network_1 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off.id, zoneid=cls.zone.id, @@ -1808,7 +1808,7 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase): cls.network_2 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off_no_lb.id, zoneid=cls.zone.id, @@ -1964,7 +1964,7 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase): 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_1.id), @@ -1989,7 +1989,7 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase): self.network_1.name) routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=self.network_1.id, listall=True @@ -2032,7 +2032,7 @@ class TestVMLifeCycleBothIsolated(cloudstackTestCase): vm = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(self.network_1.id)] @@ -2110,7 +2110,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -2126,7 +2126,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): cls.network_1 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off.id, zoneid=cls.zone.id, @@ -2145,7 +2145,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): cls.network_2 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off_no_lb.id, zoneid=cls.zone.id, @@ -2156,7 +2156,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): cls.vm_1 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id)] @@ -2165,7 +2165,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): cls.vm_2 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_1.id)] @@ -2173,7 +2173,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): cls.vm_3 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering.id, networkids=[str(cls.network_2.id)] @@ -2181,7 +2181,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): cls.public_ip_1 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -2191,7 +2191,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): cls.api_client, cls.services["lbrule"], ipaddressid=cls.public_ip_1.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network_1.id, vpcid=cls.vpc.id, domainid=cls.account.account.domainid @@ -2200,7 +2200,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): cls.public_ip_2 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -2404,7 +2404,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -2432,7 +2432,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): # 2. Rules should be still configured on virtual router. self.debug("Stopping the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.stop(self.apiclient) self.vm_2.stop(self.apiclient) @@ -2478,7 +2478,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): # 3. Make sure that we are able to access google.com from this user Vm self.debug("Starting the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.start(self.apiclient) self.vm_2.start(self.apiclient) @@ -2505,7 +2505,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): self.validate_network_rules() self.debug("Starting the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.reboot(self.apiclient) self.vm_2.reboot(self.apiclient) @@ -2530,7 +2530,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): self.validate_network_rules() self.debug("Destroying the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.delete(self.apiclient) self.vm_2.delete(self.apiclient) @@ -2576,7 +2576,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): # 3. Make sure that we are able to access google.com from this user Vm self.debug("Recovering the expunged virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.recover(self.apiclient) self.vm_2.recover(self.apiclient) @@ -2771,7 +2771,7 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): self.validate_network_rules() self.debug("Delete virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.delete(self.apiclient) self.vm_2.delete(self.apiclient) @@ -2867,7 +2867,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): cls.services["vpc"], vpcofferingid=cls.vpc_off.id, zoneid=cls.zone.id, - account=cls.account.account.name, + account=cls.account.name, domainid=cls.account.account.domainid ) @@ -2883,7 +2883,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): cls.network_1 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off.id, zoneid=cls.zone.id, @@ -2902,7 +2902,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): cls.network_2 = Network.create( cls.api_client, cls.services["network"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, networkofferingid=cls.nw_off_no_lb.id, zoneid=cls.zone.id, @@ -2913,7 +2913,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): cls.vm_1 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_1.id, networkids=[str(cls.network_1.id)] @@ -2922,7 +2922,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): cls.vm_2 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_1.id, networkids=[str(cls.network_1.id)] @@ -2930,7 +2930,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): cls.vm_3 = VirtualMachine.create( cls.api_client, cls.services["virtual_machine"], - accountid=cls.account.account.name, + accountid=cls.account.name, domainid=cls.account.account.domainid, serviceofferingid=cls.service_offering_2.id, networkids=[str(cls.network_2.id)] @@ -2938,7 +2938,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): cls.public_ip_1 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -2948,7 +2948,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): cls.api_client, cls.services["lbrule"], ipaddressid=cls.public_ip_1.ipaddress.id, - accountid=cls.account.account.name, + accountid=cls.account.name, networkid=cls.network_1.id, vpcid=cls.vpc.id, domainid=cls.account.account.domainid @@ -2957,7 +2957,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): cls.public_ip_2 = PublicIPAddress.create( cls.api_client, - accountid=cls.account.account.name, + accountid=cls.account.name, zoneid=cls.zone.id, domainid=cls.account.account.domainid, networkid=cls.network_1.id, @@ -3056,7 +3056,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=self.network_1.id, listall=True @@ -3071,7 +3071,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=self.network_2.id, listall=True @@ -3203,7 +3203,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -3231,7 +3231,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): # 2. Rules should be still configured on virtual router. self.debug("Stopping the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.stop(self.apiclient) self.vm_2.stop(self.apiclient) @@ -3276,7 +3276,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): # 3. Make sure that we are able to access google.com from this user Vm self.debug("Starting the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.start(self.apiclient) self.vm_2.start(self.apiclient) @@ -3302,7 +3302,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): self.validate_network_rules() self.debug("Starting the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.reboot(self.apiclient) self.vm_2.reboot(self.apiclient) @@ -3326,7 +3326,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): self.validate_network_rules() self.debug("Destroying the virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.delete(self.apiclient) self.vm_2.delete(self.apiclient) @@ -3371,7 +3371,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): # 3. Make sure that we are able to access google.com from this user Vm self.debug("Recovering the expunged virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.recover(self.apiclient) self.vm_2.recover(self.apiclient) @@ -3562,7 +3562,7 @@ class TestVMLifeCycleDiffHosts(cloudstackTestCase): self.validate_network_rules() self.debug("Delete virtual machines in account: %s" % - self.account.account.name) + self.account.name) try: self.vm_1.delete(self.apiclient) self.vm_2.delete(self.apiclient) diff --git a/test/integration/component/test_vpc_vms_deployment.py b/test/integration/component/test_vpc_vms_deployment.py index b3a05d45614..d29faa5c8a0 100644 --- a/test/integration/component/test_vpc_vms_deployment.py +++ b/test/integration/component/test_vpc_vms_deployment.py @@ -312,14 +312,14 @@ class TestVMDeployVPC(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -338,7 +338,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -362,7 +362,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -377,7 +377,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_3 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -391,7 +391,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -403,7 +403,7 @@ class TestVMDeployVPC(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_2.id)] @@ -414,7 +414,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_3.id)] @@ -424,7 +424,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -467,7 +467,7 @@ class TestVMDeployVPC(cloudstackTestCase): vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, state="Running", listall=True @@ -527,14 +527,14 @@ class TestVMDeployVPC(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -553,7 +553,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -577,7 +577,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -592,7 +592,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_3 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -606,7 +606,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -618,7 +618,7 @@ class TestVMDeployVPC(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_2.id)] @@ -629,7 +629,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_3.id)] @@ -639,7 +639,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -719,7 +719,7 @@ class TestVMDeployVPC(cloudstackTestCase): vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, state="Running", listall=True @@ -780,14 +780,14 @@ class TestVMDeployVPC(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -806,7 +806,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -830,7 +830,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -845,7 +845,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_3 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -859,7 +859,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -871,7 +871,7 @@ class TestVMDeployVPC(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_2.id)] @@ -882,7 +882,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_3.id)] @@ -892,7 +892,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -964,7 +964,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_4 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -977,7 +977,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_4 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_4.id)] @@ -988,7 +988,7 @@ class TestVMDeployVPC(cloudstackTestCase): "should still be accessible") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, state="Running", listall=True @@ -1049,14 +1049,14 @@ class TestVMDeployVPC(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1075,7 +1075,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -1099,7 +1099,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -1114,7 +1114,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_3 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -1128,7 +1128,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -1140,7 +1140,7 @@ class TestVMDeployVPC(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_2.id)] @@ -1151,7 +1151,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_3.id)] @@ -1161,7 +1161,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1235,7 +1235,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_4 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -1248,7 +1248,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_4 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_4.id)] @@ -1282,7 +1282,7 @@ class TestVMDeployVPC(cloudstackTestCase): "should still be accessible") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, state="Running", listall=True @@ -1329,14 +1329,14 @@ class TestVMDeployVPC(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1359,7 +1359,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -1398,7 +1398,7 @@ class TestVMDeployVPC(cloudstackTestCase): network = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -1416,7 +1416,7 @@ class TestVMDeployVPC(cloudstackTestCase): Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -1435,7 +1435,7 @@ class TestVMDeployVPC(cloudstackTestCase): network = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -1452,7 +1452,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network.id)] @@ -1504,14 +1504,14 @@ class TestVMDeployVPC(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1530,7 +1530,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -1554,7 +1554,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -1568,7 +1568,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -1577,7 +1577,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_2 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -1589,7 +1589,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_2.id)] @@ -1598,7 +1598,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_4 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_2.id)] @@ -1608,7 +1608,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1649,7 +1649,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("List virtual machines to ensure that VMs are expunged") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=network_1.id, listall=True @@ -1684,7 +1684,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("List virtual machines to ensure that VMs are expunged") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=network_2.id, listall=True @@ -1703,7 +1703,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Virtual router should be in running state") routers = Router.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1769,14 +1769,14 @@ class TestVMDeployVPC(cloudstackTestCase): vpc_off.update(self.apiclient, state='Enabled') self.debug("creating a VPC network in the account: %s" % - self.account.account.name) + self.account.name) self.services["vpc"]["cidr"] = '10.1.1.1/16' vpc = VPC.create( self.apiclient, self.services["vpc"], vpcofferingid=vpc_off.id, zoneid=self.zone.id, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.validate_vpc_network(vpc) @@ -1795,7 +1795,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_1 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off.id, zoneid=self.zone.id, @@ -1819,7 +1819,7 @@ class TestVMDeployVPC(cloudstackTestCase): network_2 = Network.create( self.apiclient, self.services["network"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, networkofferingid=nw_off_no_lb.id, zoneid=self.zone.id, @@ -1833,7 +1833,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_1 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -1842,7 +1842,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_2 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_1.id)] @@ -1854,7 +1854,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_3 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_2.id)] @@ -1863,7 +1863,7 @@ class TestVMDeployVPC(cloudstackTestCase): vm_4 = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], - accountid=self.account.account.name, + accountid=self.account.name, domainid=self.account.account.domainid, serviceofferingid=self.service_offering.id, networkids=[str(network_2.id)] @@ -1873,7 +1873,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Check if deployed VMs are in running state?") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, listall=True ) @@ -1893,7 +1893,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_1.name) public_ip_1 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_1.id, @@ -1925,7 +1925,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_1.name) public_ip_2 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_1.id, @@ -1955,7 +1955,7 @@ class TestVMDeployVPC(cloudstackTestCase): networkid=network_1.id, listall=True, isstaticnat=True, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.assertEqual( @@ -1972,7 +1972,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % vpc.name) public_ip_3 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_2.id, @@ -1990,7 +1990,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip_3.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network_2.id, vpcid=vpc.id, domainid=self.account.account.domainid @@ -2064,7 +2064,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_2.name) public_ip_5 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_2.id, @@ -2096,7 +2096,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % network_2.name) public_ip_6 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_2.id, @@ -2126,7 +2126,7 @@ class TestVMDeployVPC(cloudstackTestCase): networkid=network_2.id, listall=True, isstaticnat=True, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.assertEqual( @@ -2143,7 +2143,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("Associating public IP for network: %s" % vpc.name) public_ip_7 = PublicIPAddress.create( self.apiclient, - accountid=self.account.account.name, + accountid=self.account.name, zoneid=self.zone.id, domainid=self.account.account.domainid, networkid=network_2.id, @@ -2161,7 +2161,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.apiclient, self.services["lbrule"], ipaddressid=public_ip_7.ipaddress.id, - accountid=self.account.account.name, + accountid=self.account.name, networkid=network_2.id, vpcid=vpc.id, domainid=self.account.account.domainid @@ -2338,7 +2338,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("List virtual machines to ensure that VMs are expunged") vms = VirtualMachine.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid, networkid=network_1.id, listall=True @@ -2431,7 +2431,7 @@ class TestVMDeployVPC(cloudstackTestCase): self.account.delete(self.apiclient) except Exception as e: self.fail("Failed to delete account: %s" % - self.account.account.name) + self.account.name) wait_for_cleanup(self.apiclient, ["account.cleanup.interval"]) self.debug("Check if the VPC network is created successfully?") @@ -2446,7 +2446,7 @@ class TestVMDeployVPC(cloudstackTestCase): ) networks = Network.list( self.apiclient, - account=self.account.account.name, + account=self.account.name, domainid=self.account.account.domainid ) self.assertEqual(