Fixed SG create override issue in IPv6RouterTests

{0} vmware_nsx_tempest_plugin.tests.nsxv3.scenario.test_ipv6_router.IPv6RoutersTest.test_ipv6_interface_and_ipv4_interface_to_rtr [178.567412s] ... ok
{0} vmware_nsx_tempest_plugin.tests.nsxv3.scenario.test_ipv6_router.IPv6RoutersTest.test_ipv4_interface_and_ipv6_interface_to_rtr [176.489470s] ... ok
{0} vmware_nsx_tempest_plugin.tests.nsxv3.scenario.test_ipv6_router.IPv6RoutersTest.test_deletion_router_ipv6_slacc_interface_use [283.302551s] ... ok
{0} vmware_nsx_tempest_plugin.tests.nsxv3.scenario.test_ipv6_router.IPv6RoutersTest.test_deletion_router_ipv6_slacc_use [183.033987s] ... ok
{0} vmware_nsx_tempest_plugin.tests.nsxv3.scenario.test_ipv6_router.IPv6RoutersTest.test_deletion_router_ipv6_static_interface_use [195.068963s] ... ok
{0} vmware_nsx_tempest_plugin.tests.nsxv3.scenario.test_ipv6_router.IPv6RoutersTest.test_deletion_router_ipv6_static_use [205.896675s] ... ok

Change-Id: I5eabe6c01257c8d2d17438a8ca999f07cc7e8ff2
This commit is contained in:
Shubham Naik 2021-10-06 10:01:26 +00:00
parent fca44216f1
commit d432d75142
1 changed files with 12 additions and 21 deletions

View File

@ -74,25 +74,6 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
cidr=cidr, router_id=router_id)
return subnet
def _create_security_group(self, network):
sec_rule_client = self.cmgr_adm.security_group_rules_client
sec_client = self.cmgr_adm.security_groups_client
sg = self._create_empty_security_group(
namestart="tempest-ipv6-", client=sec_client)
common_ruleset = [dict(direction='ingress', ethertype='IPv6'),
dict(direction='ingress', ethertype='IPv4'),
dict(direction='ingress', protocol='tcp',
port_range_min=22, port_range_max=22),
dict(direction='egress', protocol='icmp'),
dict(direction='ingress', protocol='icmp')]
for rule in common_ruleset:
self._create_security_group_rule(
sec_group_rules_client=sec_rule_client,
security_groups_client=sec_client,
secgroup=sg,
**rule)
return sg
def create_topo_single_network(self, namestart, create_instance=True,
set_gateway=True, slaac=True, **kwargs):
"""
@ -766,7 +747,12 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
networks_client = self.cmgr_adm.networks_client
network = self.create_topology_network(
name, networks_client=networks_client)
sg = self._create_security_group(network)
sec_rule_client = self.cmgr_adm.security_group_rules_client
sec_client = self.cmgr_adm.security_groups_client
sg = self.create_topology_security_group(
tenant_id=network['tenant_id'],
security_groups_client=sec_client,
security_group_rules_client=sec_rule_client)
subnet_ipv6 = self._create_ipv6_subnet(
network, cidr="4200::/64",
ipv6_ra_mode="dhcpv6-stateful",
@ -827,7 +813,12 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
networks_client = self.cmgr_adm.networks_client
network = self.create_topology_network(
name, networks_client=networks_client)
sg = self._create_security_group(network)
sec_rule_client = self.cmgr_adm.security_group_rules_client
sec_client = self.cmgr_adm.security_groups_client
sg = self.create_topology_security_group(
tenant_id=network['tenant_id'],
security_groups_client=sec_client,
security_group_rules_client=sec_rule_client)
subnet_client = self.cmgr_adm.subnets_client
subnet_ipv4_name = network['name'] + 'dual-ipv4-sub'
subnet_ipv4 = self.create_topology_subnet(