Skip to content

Commit b0490c5

Browse files
rsmeetsfmaximus
authored andcommitted
fixed test_nuage_extra_dhcp test failures due to refactoring
duplicate validate_vpc methods, renamed one to validate_vpc_and_vpcoffering fixed a typo in remove default_nic test
1 parent 6041582 commit b0490c5

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

test/integration/plugins/nuagevsp/test_nuage_extra_dhcp.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,7 @@ def remove_lease_file(self, ssh_client, dhcpleasefile):
456456
self.debug("clear lease is done properly:" + completeoutput)
457457

458458
def update_zone_details(self, value):
459-
"""Updates the VM data"""
460-
# update Network Domain at zone level
459+
"""Updates Network Domain at zone level"""
461460
cmd = updateZone.updateZoneCmd()
462461
cmd.id = self.zone.id
463462
cmd.domain = value
@@ -490,7 +489,7 @@ def validate_isolated_network(
490489
self.validate_NetworkOffering(network_offering, state="Enabled")
491490
self.validate_Network(network)
492491

493-
def validate_vpc(self, vpc, vpc_offering):
492+
def validate_vpc_and_vpcoffering(self, vpc, vpc_offering):
494493
self.debug("Validating vpc...")
495494
self.validate_vpc(vpc)
496495
self.validate_VpcOffering(vpc_offering)
@@ -1268,8 +1267,9 @@ def validate_all_extra_dhcp_for_remove_nic_from_vm(
12681267
self.when_i_stop_and_start_a_vm(vm1)
12691268
with self.assertRaises(Exception):
12701269
vm1.remove_nic(
1271-
self.api_client, [nic for nic in result.nic
1272-
if nic.networkid == network.id][0])
1270+
self.api_client,
1271+
[nic for nic in result.nic
1272+
if nic.networkid == network.id][0].id)
12731273

12741274
def validate_all_extra_dhcp_for_update_multinic(
12751275
self, network,
@@ -1684,7 +1684,7 @@ def test_01_nuage_extra_dhcp_single_nic_in_isolated_network(self):
16841684
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
16851685
def test_02_nuage_extra_dhcp_single_nic_in_vpc(self):
16861686
self.update_zone_details("testvpc.com")
1687-
self.validate_vpc(self.vpc1, self.vpc_offering)
1687+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
16881688
self.validate_Network(self.vpc_network)
16891689

16901690
self.validate_all_extra_dhcp_deploy_vm(
@@ -1711,7 +1711,7 @@ def test_04_nuage_extra_dhcp_update_vm_in_isoltated_network(self):
17111711
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
17121712
def test_05_nuage_extra_dhcp_update_vm_in_vpc(self):
17131713
self.update_zone_details("testvpc.com")
1714-
self.validate_vpc(self.vpc1, self.vpc_offering)
1714+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
17151715
self.validate_Network(self.vpc_network)
17161716

17171717
self.validate_all_extra_dhcp_after_vm_update(
@@ -1737,7 +1737,7 @@ def test_07_nuage_extra_dhcp_add_nic_in_isolated_network(self):
17371737
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
17381738
def test_08_nuage_extra_dhcp_add_nic_in_vpc(self):
17391739
self.update_zone_details("testvpc.com")
1740-
self.validate_vpc(self.vpc1, self.vpc_offering)
1740+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
17411741
self.validate_Network(self.vpc_network)
17421742

17431743
self.validate_all_extra_dhcp_after_plug_nic(
@@ -1763,7 +1763,7 @@ def test_10_nuage_extra_dhcp_deploy_multi_nic_vm_in_isolated_network(self):
17631763
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
17641764
def test_11_nuage_extra_dhcp_deploy_multi_nic_vm_in_vpc(self):
17651765
self.update_zone_details("testvpc.com")
1766-
self.validate_vpc(self.vpc1, self.vpc_offering)
1766+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
17671767
self.validate_Network(self.vpc_network)
17681768

17691769
self.validate_all_extra_dhcp_for_multi_nic(
@@ -1789,7 +1789,7 @@ def test_13_nuage_extra_dhcp_update_multi_nic_in_isolated_network(self):
17891789
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
17901790
def test_14_nuage_extra_dhcp_update_multi_nic_in_vpc(self):
17911791
self.update_zone_details("testvpc.com")
1792-
self.validate_vpc(self.vpc1, self.vpc_offering)
1792+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
17931793
self.validate_Network(self.vpc_network)
17941794

17951795
self.validate_all_extra_dhcp_for_update_multinic(
@@ -1815,7 +1815,7 @@ def test_16_nuage_extra_dhcp_remove_nic_in_isolated_network(self):
18151815
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
18161816
def test_17_nuage_extra_dhcp_remove_nic_in_vpc(self):
18171817
self.update_zone_details("testvpc.com")
1818-
self.validate_vpc(self.vpc1, self.vpc_offering)
1818+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
18191819
self.validate_Network(self.vpc_network)
18201820

18211821
self.validate_all_extra_dhcp_for_remove_nic_from_vm(
@@ -1842,7 +1842,7 @@ def test_19_nuage_extra_dhcp_vm_actions_in_isolated_network(self):
18421842
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
18431843
def test_20_nuage_nuage_extra_dhcp_vm_actions_in_vpc(self):
18441844
self.update_zone_details("testvpc.com")
1845-
self.validate_vpc(self.vpc1, self.vpc_offering)
1845+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
18461846
self.validate_Network(self.vpc_network)
18471847

18481848
self.validate_all_extra_dhcp_for_vm_actions_in_network(
@@ -1869,7 +1869,7 @@ def test_22_nuage_extra_dhcp_network_actions_in_isolated_network(self):
18691869
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
18701870
def test_23_nuage_nuage_extra_dhcp_network_actions_in_vpc(self):
18711871
self.update_zone_details("testvpc.com")
1872-
self.validate_vpc(self.vpc1, self.vpc_offering)
1872+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
18731873
self.validate_Network(self.vpc_network)
18741874

18751875
self.validate_all_extra_dhcp_for_network_actions_in_network(
@@ -1896,7 +1896,7 @@ def test_25_nuage_extra_dhcp_nic_after_migrate_in_isolated_network(self):
18961896
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
18971897
def test_26_nuage_nuage_extra_dhcp_nic_after_migrate_in_vpc(self):
18981898
self.update_zone_details("testvpc.com")
1899-
self.validate_vpc(self.vpc1, self.vpc_offering)
1899+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
19001900
self.validate_Network(self.vpc_network)
19011901

19021902
self.validate_all_extra_dhcp_for_add_remove_nic_after_migrate(
@@ -1930,7 +1930,7 @@ def test_29_nuage_extra_dhcp_allocated_isolated_network(self):
19301930
@attr(tags=["advanced", "nuagevsp"], required_hardware="false")
19311931
def test_30_nuage_extra_dhcp_allocated_vpc(self):
19321932
self.update_zone_details("testvpc.com")
1933-
self.validate_vpc(self.vpc1, self.vpc_offering)
1933+
self.validate_vpc_and_vpcoffering(self.vpc1, self.vpc_offering)
19341934
self.validate_Network(self.vpc_network)
19351935

19361936
self.validate_all_extra_dhcp_for_network_in_allocated(

0 commit comments

Comments
 (0)