From 4110754021340974c48bffc44032b100fbedd329 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 10 Sep 2024 10:21:06 +0900 Subject: [PATCH] Add support for [ovn] ovn_router_indirect_snat ... which was added during this cycle. Depends-on: https://review.opendev.org/926495 Change-Id: Ib53d335714283a719dcb99013d1bad224386a1ae --- manifests/plugins/ml2/ovn.pp | 7 +++++++ .../notes/ovn_router_indirect_snat-735d59868ddc9ed2.yaml | 5 +++++ spec/classes/neutron_plugins_ml2_ovn_spec.rb | 4 ++++ 3 files changed, 16 insertions(+) create mode 100644 releasenotes/notes/ovn_router_indirect_snat-735d59868ddc9ed2.yaml diff --git a/manifests/plugins/ml2/ovn.pp b/manifests/plugins/ml2/ovn.pp index 2a654215f..70564e2b9 100644 --- a/manifests/plugins/ml2/ovn.pp +++ b/manifests/plugins/ml2/ovn.pp @@ -142,6 +142,11 @@ # Type: boolean # Defaults to $facts['os_service_default'] # +# [*ovn_router_indirect_snat*] +# (optional) Whether to configure SNAT for all nested subnets connected to +# the router through any routers. +# Defaults to $facts['os_service_default'] +# # [*ignore_lsp_down*] # (optional) Do not install ARP/ND reply flows for logical switch ports # if the port is DOWN. @@ -199,6 +204,7 @@ class neutron::plugins::ml2::ovn( $fdb_age_threshold = $facts['os_service_default'], $mac_binding_age_threshold = $facts['os_service_default'], $broadcast_arps_to_all_routers = $facts['os_service_default'], + $ovn_router_indirect_snat = $facts['os_service_default'], $ignore_lsp_down = $facts['os_service_default'], $fdb_removal_limit = $facts['os_service_default'], $mac_binding_removal_limit = $facts['os_service_default'], @@ -249,6 +255,7 @@ class neutron::plugins::ml2::ovn( 'ovn/fdb_age_threshold' : value => $fdb_age_threshold; 'ovn/mac_binding_age_threshold' : value => $mac_binding_age_threshold; 'ovn/broadcast_arps_to_all_routers' : value => $broadcast_arps_to_all_routers; + 'ovn/ovn_router_indirect_snat' : value => $ovn_router_indirect_snat; 'ovn_nb_global/ignore_lsp_down' : value => $ignore_lsp_down; 'ovn_nb_global/fdb_removal_limit' : value => $fdb_removal_limit; 'ovn_nb_global/mac_binding_removal_limit' : value => $mac_binding_removal_limit; diff --git a/releasenotes/notes/ovn_router_indirect_snat-735d59868ddc9ed2.yaml b/releasenotes/notes/ovn_router_indirect_snat-735d59868ddc9ed2.yaml new file mode 100644 index 000000000..60f70e5de --- /dev/null +++ b/releasenotes/notes/ovn_router_indirect_snat-735d59868ddc9ed2.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``neutron::plugins::ml2::ovn::ovn_router_indirect_snat`` parameter + has been added. diff --git a/spec/classes/neutron_plugins_ml2_ovn_spec.rb b/spec/classes/neutron_plugins_ml2_ovn_spec.rb index 174f2d444..6272d6f07 100644 --- a/spec/classes/neutron_plugins_ml2_ovn_spec.rb +++ b/spec/classes/neutron_plugins_ml2_ovn_spec.rb @@ -36,6 +36,7 @@ describe 'neutron::plugins::ml2::ovn' do :fdb_age_threshold => '', :mac_binding_age_threshold => '', :broadcast_arps_to_all_routers => '', + :ovn_router_indirect_snat => '', :ignore_lsp_down => '', :fdb_removal_limit => '', :mac_binding_removal_limit => '', @@ -82,6 +83,7 @@ describe 'neutron::plugins::ml2::ovn' do should contain_neutron_plugin_ml2('ovn/fdb_age_threshold').with_value(p[:fdb_age_threshold]) should contain_neutron_plugin_ml2('ovn/mac_binding_age_threshold').with_value(p[:mac_binding_age_threshold]) should contain_neutron_plugin_ml2('ovn/broadcast_arps_to_all_routers').with_value(p[:broadcast_arps_to_all_routers]) + should contain_neutron_plugin_ml2('ovn/ovn_router_indirect_snat').with_value(p[:ovn_router_indirect_snat]) should contain_neutron_plugin_ml2('ovn_nb_global/ignore_lsp_down').with_value(p[:ignore_lsp_down]) should contain_neutron_plugin_ml2('ovn_nb_global/fdb_removal_limit').with_value(p[:fdb_removal_limit]) should contain_neutron_plugin_ml2('ovn_nb_global/mac_binding_removal_limit').with_value(p[:mac_binding_removal_limit]) @@ -119,6 +121,7 @@ describe 'neutron::plugins::ml2::ovn' do :fdb_age_threshold => 10, :mac_binding_age_threshold => 11, :broadcast_arps_to_all_routers => true, + :ovn_router_indirect_snat => false, :ignore_lsp_down => false, :fdb_removal_limit => 12, :mac_binding_removal_limit => 13, @@ -151,6 +154,7 @@ describe 'neutron::plugins::ml2::ovn' do should contain_neutron_plugin_ml2('ovn/fdb_age_threshold').with_value(p[:fdb_age_threshold]) should contain_neutron_plugin_ml2('ovn/mac_binding_age_threshold').with_value(p[:mac_binding_age_threshold]) should contain_neutron_plugin_ml2('ovn/broadcast_arps_to_all_routers').with_value(p[:broadcast_arps_to_all_routers]) + should contain_neutron_plugin_ml2('ovn/ovn_router_indirect_snat').with_value(p[:ovn_router_indirect_snat]) should contain_neutron_plugin_ml2('ovn_nb_global/ignore_lsp_down').with_value(p[:ignore_lsp_down]) should contain_neutron_plugin_ml2('ovn_nb_global/fdb_removal_limit').with_value(p[:fdb_removal_limit]) should contain_neutron_plugin_ml2('ovn_nb_global/mac_binding_removal_limit').with_value(p[:mac_binding_removal_limit])