From f86de77b8054f77539d9a804d65046b0178dfb44 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Tue, 12 Jul 2016 09:00:00 +0800 Subject: [PATCH] Deprecate advertise_mtu option The advertise_mtu option is deprecated, has no effect and will be removed in Ocata. The information[1] can explain. [1] http://git.openstack.org/cgit/openstack/neutron/tree/releasenotes/notes/deprecate-advertise-mtu-51e3f78475a14efc.yaml Change-Id: I30b675942dddb209019199667ff064e03c620c10 --- manifests/init.pp | 15 +++++++++------ ...ate_advertise_mtu_option-a3d1893411c7ef89.yaml | 4 ++++ spec/classes/neutron_init_spec.rb | 13 ------------- 3 files changed, 13 insertions(+), 19 deletions(-) create mode 100644 releasenotes/notes/deprecate_advertise_mtu_option-a3d1893411c7ef89.yaml diff --git a/manifests/init.pp b/manifests/init.pp index d5110409a..265ee6645 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -79,10 +79,6 @@ # (optional) Allow sending resource operation notification to DHCP agent. # Defaults to $::os_service_default # -# [*advertise_mtu*] -# (optional) VMs will receive DHCP and RA MTU option when the network's preferred MTU is known -# Defaults to $::os_service_default -# # [*allow_bulk*] # (optional) Enable bulk crud operations # Defaults to $::os_service_default @@ -371,6 +367,10 @@ # (optional) Syslog facility to receive log lines # Defaults to undef # +# [*advertise_mtu*] +# (optional) VMs will receive DHCP and RA MTU option when the network's preferred MTU is known +# Defaults to undef +# class neutron ( $enabled = true, $package_ensure = 'present', @@ -388,7 +388,6 @@ class neutron ( $dhcp_agents_per_network = $::os_service_default, $global_physnet_mtu = $::os_service_default, $dhcp_agent_notification = $::os_service_default, - $advertise_mtu = $::os_service_default, $allow_bulk = $::os_service_default, $allow_pagination = $::os_service_default, $allow_sorting = $::os_service_default, @@ -455,6 +454,7 @@ class neutron ( $network_device_mtu = undef, $verbose = undef, $log_facility = undef, + $advertise_mtu = undef, ) { include ::neutron::deps @@ -493,6 +493,10 @@ class neutron ( warning('log_facility is deprecated, has no effect and will be removed after Newton cycle.') } + if $advertise_mtu { + warning('advertise_mtu is deprecated, has no effect and will be removed in Ocata.') + } + if $memcache_servers { validate_array($memcache_servers) } @@ -519,7 +523,6 @@ class neutron ( 'DEFAULT/dns_domain': value => $dns_domain; 'DEFAULT/dhcp_agents_per_network': value => $dhcp_agents_per_network; 'DEFAULT/dhcp_agent_notification': value => $dhcp_agent_notification; - 'DEFAULT/advertise_mtu': value => $advertise_mtu; 'DEFAULT/allow_bulk': value => $allow_bulk; 'DEFAULT/allow_pagination': value => $allow_pagination; 'DEFAULT/allow_sorting': value => $allow_sorting; diff --git a/releasenotes/notes/deprecate_advertise_mtu_option-a3d1893411c7ef89.yaml b/releasenotes/notes/deprecate_advertise_mtu_option-a3d1893411c7ef89.yaml new file mode 100644 index 000000000..d22d59fbb --- /dev/null +++ b/releasenotes/notes/deprecate_advertise_mtu_option-a3d1893411c7ef89.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - The advertise_mtu option is deprecated, has no effect + and will be removed in Ocata. diff --git a/spec/classes/neutron_init_spec.rb b/spec/classes/neutron_init_spec.rb index 5f645a972..bd4ff5472 100644 --- a/spec/classes/neutron_init_spec.rb +++ b/spec/classes/neutron_init_spec.rb @@ -142,7 +142,6 @@ describe 'neutron' do is_expected.to contain_neutron_config('DEFAULT/dhcp_agents_per_network').with_value('') is_expected.to contain_neutron_config('DEFAULT/global_physnet_mtu').with_value('') is_expected.to contain_neutron_config('DEFAULT/dhcp_agent_notification').with_value('') - is_expected.to contain_neutron_config('DEFAULT/advertise_mtu').with_value('') is_expected.to contain_neutron_config('DEFAULT/allow_bulk').with_value('') is_expected.to contain_neutron_config('DEFAULT/allow_pagination').with_value('') is_expected.to contain_neutron_config('DEFAULT/allow_sorting').with_value('') @@ -452,18 +451,6 @@ describe 'neutron' do end end - shared_examples_for 'with advertise_mtu defined' do - before do - params.merge!( - :advertise_mtu => true - ) - end - - it do - is_expected.to contain_neutron_config('DEFAULT/advertise_mtu').with_value(params[:advertise_mtu]) - end - end - shared_examples_for 'with host defined' do before do params.merge!(