Deprecate broken trove::single_tenant_mode

Closes-Bug: #2058861
Change-Id: Ia275e45483cb5238c6440cb2abd2c96c3036306d
This commit is contained in:
Takashi Kajinami 2024-03-25 10:48:32 +09:00
parent 225592993c
commit 99c035e720
3 changed files with 18 additions and 46 deletions

View File

@ -195,11 +195,6 @@
# (Optional) Password for message broker authentication
# Defaults to $facts['os_service_default'].
#
# [*single_tenant_mode*]
# (optional) If set to true, will configure Trove to work in single
# tenant mode.
# Defaults to false.
#
# [*rpc_response_timeout*]
# (Optional) Seconds to wait for a response from a call.
# Defaults to $facts['os_service_default']
@ -292,6 +287,13 @@
# (optional) The state of the package.
# Defaults to 'present'
#
# DEPRECATED PARAMETERS
#
# [*single_tenant_mode*]
# (optional) If set to true, will configure Trove to work in single
# tenant mode.
# Defaults to undef.
#
class trove(
$default_transport_url = $facts['os_service_default'],
$notification_transport_url = $facts['os_service_default'],
@ -330,7 +332,6 @@ class trove(
$amqp_sasl_config_name = $facts['os_service_default'],
$amqp_username = $facts['os_service_default'],
$amqp_password = $facts['os_service_default'],
Boolean $single_tenant_mode = false,
$rpc_response_timeout = $facts['os_service_default'],
$control_exchange = 'trove',
$nova_compute_url = $facts['os_service_default'],
@ -354,12 +355,18 @@ class trove(
$volume_rootdisk_support = $facts['os_service_default'],
$volume_rootdisk_size = $facts['os_service_default'],
$package_ensure = 'present',
# DEPRECATED PARAMETERS
$single_tenant_mode = undef,
) {
include trove::deps
include trove::policy
include trove::params
if $single_tenant_mode != undef {
warning('The single_tenant_mode parameter is deprecated and has no effect.')
}
package { 'trove':
ensure => $package_ensure,
name => $::trove::params::common_package_name,
@ -394,21 +401,6 @@ class trove(
'DEFAULT/trove_endpoint_type': value => $trove_endpoint_type;
}
if $single_tenant_mode {
trove_config {
'DEFAULT/remote_nova_client': value => 'trove.common.single_tenant_remote.nova_client_trove_admin';
'DEFAULT/remote_cinder_client': value => 'trove.common.single_tenant_remote.cinder_client_trove_admin';
'DEFAULT/remote_neutron_client': value => 'trove.common.single_tenant_remote.neutron_client_trove_admin';
}
}
else {
trove_config {
'DEFAULT/remote_nova_client': ensure => absent;
'DEFAULT/remote_cinder_client': ensure => absent;
'DEFAULT/remote_neutron_client': ensure => absent;
}
}
# network
trove_config {
'DEFAULT/network_label_regex': value => '.*';

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The ``trove::single_tenant_mode`` parameter has been deprecated and it has
no effect now.

View File

@ -47,9 +47,6 @@ describe 'trove' do
is_expected.to contain_trove_config('DEFAULT/trove_volume_support').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_config('DEFAULT/volume_rootdisk_support').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_config('DEFAULT/volume_rootdisk_size').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_config('DEFAULT/remote_nova_client').with_ensure('absent')
is_expected.to contain_trove_config('DEFAULT/remote_cinder_client').with_ensure('absent')
is_expected.to contain_trove_config('DEFAULT/remote_neutron_client').with_ensure('absent')
is_expected.to contain_oslo__messaging__default('trove_config').with(
:transport_url => '<SERVICE DEFAULT>',
:rpc_response_timeout => '<SERVICE DEFAULT>',
@ -146,28 +143,6 @@ describe 'trove' do
is_expected.to contain_trove_config('DEFAULT/volume_rootdisk_size').with_value(10)
end
end
context 'with single tenant mode enabled' do
let :params do
{ :single_tenant_mode => true }
end
it 'single tenant client values are set' do
is_expected.to contain_trove_config('DEFAULT/remote_nova_client').with_value('trove.common.single_tenant_remote.nova_client_trove_admin')
is_expected.to contain_trove_config('DEFAULT/remote_cinder_client').with_value('trove.common.single_tenant_remote.cinder_client_trove_admin')
is_expected.to contain_trove_config('DEFAULT/remote_neutron_client').with_value('trove.common.single_tenant_remote.neutron_client_trove_admin')
end
end
context 'with management networks' do
let :params do
{ :management_networks => 'trove_service' }
end
it 'configures management networks' do
is_expected.to contain_trove_config('DEFAULT/management_networks').with_value('trove_service')
end
end
end
on_supported_os({