From 1af926405db28ba2e8fa457043ecdcb07fcfdc7c Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Mon, 29 Aug 2016 14:46:38 +0800 Subject: [PATCH] Deprecate allow_sorting and allow_pagination options The ``allow_sorting`` and ``allow_pagination`` configuration options are deprecated and will be removed in a future release. Change-Id: Ia988328818d7312b0a4f2d2e723ff485e1a1b26b --- manifests/init.pp | 30 +++++++++++-------- ...w_pagination_options-451a3d961df892d2.yaml | 4 +++ spec/classes/neutron_init_spec.rb | 2 -- 3 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 releasenotes/notes/deprecate_allow_sorting_allow_pagination_options-451a3d961df892d2.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 6c0ff3055..5598a0b22 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -83,14 +83,6 @@ # (optional) Enable bulk crud operations # Defaults to $::os_service_default # -# [*allow_pagination*] -# (optional) Enable pagination -# Defaults to $::os_service_default -# -# [*allow_sorting*] -# (optional) Enable sorting -# Defaults to $::os_service_default -# # [*allow_overlapping_ips*] # (optional) Enables network namespaces # Defaults to $::os_service_default @@ -373,6 +365,14 @@ # (optional) VMs will receive DHCP and RA MTU option when the network's preferred MTU is known # Defaults to undef # +# [*allow_sorting*] +# (optional) Enable sorting +# Defaults to undef +# +# [*allow_pagination*] +# (optional) Enable pagination +# Defaults to undef +# class neutron ( $enabled = true, $package_ensure = 'present', @@ -391,8 +391,6 @@ class neutron ( $global_physnet_mtu = $::os_service_default, $dhcp_agent_notification = $::os_service_default, $allow_bulk = $::os_service_default, - $allow_pagination = $::os_service_default, - $allow_sorting = $::os_service_default, $allow_overlapping_ips = $::os_service_default, $api_extensions_path = $::os_service_default, $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', @@ -457,6 +455,8 @@ class neutron ( $verbose = undef, $log_facility = undef, $advertise_mtu = undef, + $allow_pagination = undef, + $allow_sorting = undef, ) { include ::neutron::deps @@ -499,6 +499,14 @@ class neutron ( warning('advertise_mtu is deprecated, has no effect and will be removed in Ocata.') } + if $allow_sorting { + warning('allow_sorting is deprecated, has no effect and will be removed in a future release.') + } + + if $allow_pagination { + warning('allow_pagination is deprecated, has no effect and will be removed in a future release.') + } + if $memcache_servers { validate_array($memcache_servers) } @@ -526,8 +534,6 @@ class neutron ( 'DEFAULT/dhcp_agents_per_network': value => $dhcp_agents_per_network; 'DEFAULT/dhcp_agent_notification': value => $dhcp_agent_notification; 'DEFAULT/allow_bulk': value => $allow_bulk; - 'DEFAULT/allow_pagination': value => $allow_pagination; - 'DEFAULT/allow_sorting': value => $allow_sorting; 'DEFAULT/allow_overlapping_ips': value => $allow_overlapping_ips; 'DEFAULT/api_extensions_path': value => $api_extensions_path; 'DEFAULT/state_path': value => $state_path; diff --git a/releasenotes/notes/deprecate_allow_sorting_allow_pagination_options-451a3d961df892d2.yaml b/releasenotes/notes/deprecate_allow_sorting_allow_pagination_options-451a3d961df892d2.yaml new file mode 100644 index 000000000..75d0e4ab5 --- /dev/null +++ b/releasenotes/notes/deprecate_allow_sorting_allow_pagination_options-451a3d961df892d2.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - The ``allow_sorting`` and ``allow_pagination`` configuration options + are deprecated and will be removed in a future release. diff --git a/spec/classes/neutron_init_spec.rb b/spec/classes/neutron_init_spec.rb index 3a32077b9..c31c7d147 100644 --- a/spec/classes/neutron_init_spec.rb +++ b/spec/classes/neutron_init_spec.rb @@ -144,8 +144,6 @@ describe 'neutron' do 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/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('') is_expected.to contain_neutron_config('DEFAULT/allow_overlapping_ips').with_value('') is_expected.to contain_neutron_config('DEFAULT/api_extensions_path').with_value('') is_expected.to contain_neutron_config('DEFAULT/control_exchange').with_value('neutron')