Cover both enabled and disabled cases in nested snat validation test
Check connectivity when nested SNAT is enabled; expect no connectivity otherwise.
Change-Id: I50cbdc50a6689a7dada10c5a00233afd4ee6c93a
diff --git a/neutron_tempest_plugin/scenario/test_floatingip.py b/neutron_tempest_plugin/scenario/test_floatingip.py
index 9b7bfcc..f3d03e6 100644
--- a/neutron_tempest_plugin/scenario/test_floatingip.py
+++ b/neutron_tempest_plugin/scenario/test_floatingip.py
@@ -201,12 +201,7 @@
gateway_external_ip,
servers=[proxy, src_server])
- @decorators.idempotent_id('b911b124-b6cb-449d-83d9-b34f3665741d')
- @utils.requires_ext(extension='extraroute', service='network')
- @testtools.skipUnless(
- CONF.neutron_plugin_options.snat_rules_apply_to_nested_networks,
- "Backend doesn't enable nested SNAT.")
- def test_nested_snat_external_ip(self):
+ def _test_nested_snat_external_ip(self, feature_enabled_bool):
"""Check connectivity to an external IP from a nested network."""
gateway_external_ip = self._get_external_gateway()
@@ -245,7 +240,7 @@
src_server = self._create_server(create_floating_ip=False,
network=network)
- # Validate that it can access external gw ip (via nested snat)
+ # Check connectivity if nested SNAT is enabled, else no connectivity
src_server_ip = src_server['port']['fixed_ips'][0]['ip_address']
ssh_client = ssh.Client(src_server_ip,
CONF.validation.image_ssh_user,
@@ -253,8 +248,17 @@
proxy_client=proxy_client)
self.check_remote_connectivity(ssh_client,
gateway_external_ip,
+ should_succeed=feature_enabled_bool,
servers=[proxy, src_server])
+ @decorators.idempotent_id('b911b124-b6cb-449d-83d9-b34f3665741d')
+ @utils.requires_ext(extension='extraroute', service='network')
+ def test_nested_snat_external_ip(self):
+ feature_enabled_bool = (
+ CONF.neutron_plugin_options.snat_rules_apply_to_nested_networks
+ )
+ self._test_nested_snat_external_ip(feature_enabled_bool)
+
class FloatingIPPortDetailsTest(FloatingIpTestCasesMixin,
base.BaseTempestTestCase):
diff --git a/zuul.d/master_jobs.yaml b/zuul.d/master_jobs.yaml
index 8a45e3a..b8d2103 100644
--- a/zuul.d/master_jobs.yaml
+++ b/zuul.d/master_jobs.yaml
@@ -683,6 +683,10 @@
type_drivers: local,flat,vlan,geneve
ml2_type_vlan:
network_vlan_ranges: foo:1:10,public
+ ovn:
+ # This feature is available in OVN v24.03.4
+ # Latest Ubuntu 24.04 provides OVN v24.03.2
+ ovn_router_indirect_snat: false
test-config:
$TEMPEST_CONFIG:
network-feature-enabled: