From 0a1647dfb63c30352e626f50deb1aad9e8f84e26 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 7 Feb 2025 22:35:58 +0900 Subject: [PATCH] Add support for [DEFAULT] vlan_qinq ... which was added during this cycle. Depends-on: https://review.opendev.org/937372 Change-Id: I04a290574906562e17d4687514fa2b151a5666e4 --- manifests/init.pp | 12 +++++++++-- .../notes/vlan-qinq-adc536baff31eb69.yaml | 4 ++++ spec/classes/neutron_init_spec.rb | 21 ++++++------------- 3 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 releasenotes/notes/vlan-qinq-adc536baff31eb69.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 70e5e1ef4..f763e840d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -278,8 +278,14 @@ # Defaults to $facts['os_service_default']. # # [*vlan_transparent*] -# (optional) Allow plugins that support it to create VLAN transparent networks -# Defaults to $facts['os_service_default'] +# (optional) Allow plugins that support it to create VLAN transparent +# networks. +# Defaults to $facts['os_service_default']. +# +# [*vlan_qinq*] +# (optional) Allow plugins that support it to create VLAN transparent +# networks using 0x8a88 ethertype. +# Defaults to $facts['os_service_default']. # class neutron ( $package_ensure = 'present', @@ -339,6 +345,7 @@ class neutron ( $notification_retry = $facts['os_service_default'], $max_allowed_address_pair = $facts['os_service_default'], $vlan_transparent = $facts['os_service_default'], + $vlan_qinq = $facts['os_service_default'], ) { include neutron::deps @@ -380,6 +387,7 @@ class neutron ( 'DEFAULT/global_physnet_mtu': value => $global_physnet_mtu; 'DEFAULT/max_allowed_address_pair': value => $max_allowed_address_pair; 'DEFAULT/vlan_transparent': value => $vlan_transparent; + 'DEFAULT/vlan_qinq': value => $vlan_qinq; 'agent/root_helper': value => $root_helper; 'agent/root_helper_daemon': value => $root_helper_daemon; 'agent/report_interval': value => $report_interval; diff --git a/releasenotes/notes/vlan-qinq-adc536baff31eb69.yaml b/releasenotes/notes/vlan-qinq-adc536baff31eb69.yaml new file mode 100644 index 000000000..cc481df05 --- /dev/null +++ b/releasenotes/notes/vlan-qinq-adc536baff31eb69.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``neutron::vlan_qinq`` parameter has been added. diff --git a/spec/classes/neutron_init_spec.rb b/spec/classes/neutron_init_spec.rb index 7f4faeef4..0d5137b2f 100644 --- a/spec/classes/neutron_init_spec.rb +++ b/spec/classes/neutron_init_spec.rb @@ -31,8 +31,7 @@ describe 'neutron' do it_behaves_like 'with transport_url defined' it_behaves_like 'with rootwrap daemon' it_behaves_like 'with max_allowed_address_pair defined' - it_behaves_like 'when disabling vlan_transparent' - it_behaves_like 'when enabling vlan_transparent' + it_behaves_like 'when vlan transparent options defined' end shared_examples 'a neutron base installation' do @@ -111,6 +110,7 @@ describe 'neutron' do ) should contain_neutron_config('DEFAULT/vlan_transparent').with_value('') + should contain_neutron_config('DEFAULT/vlan_qinq').with_value('') should contain_neutron_config('agent/root_helper').with_value('sudo neutron-rootwrap /etc/neutron/rootwrap.conf') should contain_neutron_config('agent/root_helper_daemon').with_value('') should contain_neutron_config('agent/report_interval').with_value('') @@ -301,25 +301,16 @@ describe 'neutron' do } end - shared_examples 'when disabling vlan_transparent' do + shared_examples 'when vlan transparent options defined' do before do params.merge!( - :vlan_transparent => false - ) - end - it do - should contain_neutron_config('DEFAULT/vlan_transparent').with_value(false) - end - end - - shared_examples 'when enabling vlan_transparent' do - before do - params.merge!( - :vlan_transparent => true + :vlan_transparent => true, + :vlan_qinq => false, ) end it do should contain_neutron_config('DEFAULT/vlan_transparent').with_value(true) + should contain_neutron_config('DEFAULT/vlan_qinq').with_value(false) end end