From ddb0f14f95156c483c499fe95982d2e5777b236f Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 23 Feb 2022 23:10:10 +0900 Subject: [PATCH] Deprecate the use_neutron parameter ... because nova-network was removed a while ago and now neutron should be used always. Change-Id: Icc23d46b18c0bdc0564219d3773f2a3b5d99a829 --- manifests/init.pp | 32 ++++++++----------- ...eprecate-use_neutron-d39ccd82299c38b7.yaml | 5 +++ spec/classes/trove_init_spec.rb | 16 ---------- 3 files changed, 19 insertions(+), 34 deletions(-) create mode 100644 releasenotes/notes/deprecate-use_neutron-d39ccd82299c38b7.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 817647c2..b2ec2b50 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -256,13 +256,9 @@ # (optional) Service endpoint type to use when searching catalog. # Defaults to $::os_service_default # -# [*use_neutron*] -# (optional) Use Neutron -# Defaults to true -# # [*default_neutron_networks*] # (optional) The network that trove will attach by default. -# Defaults to undef. +# Defaults to $::os_service_default. # # [*package_ensure*] # (optional) The state of the package. @@ -289,6 +285,10 @@ # exceptions in the trove API service. # Defaults to undef. # +# [*use_neutron*] +# (optional) Use Neutron +# Defaults to undef +# class trove( $default_transport_url = $::os_service_default, $notification_transport_url = $::os_service_default, @@ -344,7 +344,6 @@ class trove( $glance_endpoint_type = $::os_service_default, $trove_endpoint_type = $::os_service_default, $neutron_endpoint_type = $::os_service_default, - $use_neutron = true, $default_neutron_networks = $::os_service_default, $package_ensure = 'present', # DEPRECATED PARAMETERS @@ -352,12 +351,17 @@ class trove( $nova_proxy_admin_pass = undef, $nova_proxy_admin_tenant_name = undef, $os_region_name = undef, + $use_neutron = undef, ) { include trove::deps include trove::policy include trove::params + if $use_neutron != undef { + warning('The trove::use_neutron parameter has been deprecated and has no effect.') + } + if $nova_compute_url { trove_config { 'DEFAULT/nova_compute_url': value => $nova_compute_url } } @@ -426,18 +430,10 @@ class trove( } } - if $use_neutron { - trove_config { - 'DEFAULT/network_label_regex': value => '.*'; - 'DEFAULT/network_driver': value => 'trove.network.neutron.NeutronDriver'; - 'DEFAULT/default_neutron_networks': value => $default_neutron_networks; - } - } else { - trove_config { - 'DEFAULT/network_label_regex': value => '^private$'; - 'DEFAULT/network_driver': value => 'trove.network.nova.NovaNetwork'; - 'DEFAULT/default_neutron_networks': ensure => absent; - } + trove_config { + 'DEFAULT/network_label_regex': value => '.*'; + 'DEFAULT/network_driver': value => 'trove.network.neutron.NeutronDriver'; + 'DEFAULT/default_neutron_networks': value => $default_neutron_networks; } oslo::messaging::default { 'trove_config': diff --git a/releasenotes/notes/deprecate-use_neutron-d39ccd82299c38b7.yaml b/releasenotes/notes/deprecate-use_neutron-d39ccd82299c38b7.yaml new file mode 100644 index 00000000..b2fd3f23 --- /dev/null +++ b/releasenotes/notes/deprecate-use_neutron-d39ccd82299c38b7.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``trove:use_neutron`` parameter has been deprecated and has no effect + now. This parameter will be removed in a future release. diff --git a/spec/classes/trove_init_spec.rb b/spec/classes/trove_init_spec.rb index 7cb955db..0a198932 100644 --- a/spec/classes/trove_init_spec.rb +++ b/spec/classes/trove_init_spec.rb @@ -130,22 +130,6 @@ describe 'trove' do is_expected.to contain_trove_config('DEFAULT/network_label_regex').with_value('.*') end end - - context 'when using Nova Network' do - let :params do - { :use_neutron => false } - end - - it 'configures trove to use the Nova Network network driver' do - is_expected.to contain_trove_config('DEFAULT/default_neutron_networks').with_ensure('absent') - is_expected.to contain_trove_config('DEFAULT/network_driver').with_value('trove.network.nova.NovaNetwork') - end - - it 'configures trove to use the "private" network label' do - is_expected.to contain_trove_config('DEFAULT/network_label_regex').with_value('^private$') - end - end - end on_supported_os({