Do not autocomplete heat::trustee class

This behavior was deprecated a while ago when the separate class was
added.

Change-Id: Ic3bff87a551262fc9e343217c5c8a933691bc29d
This commit is contained in:
Takashi Kajinami 2023-05-10 10:55:57 +09:00
parent ef3d05c365
commit da923f2283
5 changed files with 16 additions and 111 deletions

View File

@ -359,15 +359,6 @@ class heat(
password => $amqp_password,
}
if !defined(Class[heat::trustee]) {
warning('The heat:trustee class will be required to set trustee option in a future release')
include heat::trustee
}
# TODO(tkajinam): Remove this when we remove the above logic
heat_config {
'trustee/project_domain_name': ensure => absent;
}
if $heat_clients_url != undef {
warning('The heat_clients_url parameter is deprecated. Use the heat::clients::heat class.')
}

View File

@ -30,37 +30,20 @@
# Defaults to 'Default'
#
class heat::trustee (
$password = undef,
$auth_type = undef,
$auth_url = undef,
$username = undef,
$user_domain_name = undef,
$password = $facts['os_service_default'],
$auth_type = 'password',
$auth_url = 'http://127.0.0.1:5000/',
$username = 'heat',
$user_domain_name = 'Default',
) {
include heat::deps
if defined(Class[heat::keystone::authtoken]) {
# TODO(tkajinam): The following logic was added to keep compatibility with
# the old version which determines the trustee parameters based on
# authtoken parameters. This should be removed after Y release.
$password_real = pick($password, $::heat::keystone::authtoken::password)
$auth_type_real = pick($auth_type, $::heat::keystone::authtoken::auth_type)
$auth_url_real = pick($auth_url, $::heat::keystone::authtoken::auth_url)
$username_real = pick($username, $::heat::keystone::authtoken::username)
$user_domain_name_real = pick($user_domain_name, $::heat::keystone::authtoken::user_domain_name)
} else {
$password_real = pick($password, $facts['os_service_default'])
$auth_type_real = pick($auth_type, 'password')
$auth_url_real = pick($auth_url, 'http://127.0.0.1:5000/')
$username_real = pick($username, 'heat')
$user_domain_name_real = pick($user_domain_name, 'Default')
}
heat_config {
'trustee/password': value => $password_real, secret => true;
'trustee/auth_type': value => $auth_type_real;
'trustee/auth_url': value => $auth_url_real;
'trustee/username': value => $username_real;
'trustee/user_domain_name': value => $user_domain_name_real;
'trustee/password': value => $password, secret => true;
'trustee/auth_type': value => $auth_type;
'trustee/auth_url': value => $auth_url;
'trustee/username': value => $username;
'trustee/user_domain_name': value => $user_domain_name;
}
}

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The ``heat`` class no longer includes the ``heat:trustee`` class
automatically. Add the ``heat::trustee`` class to your manifests to
configure the ``[trustee]`` options.

View File

@ -92,26 +92,6 @@ describe 'heat' do
is_expected.to contain_heat_config('DEFAULT/max_json_body_size').with_value('<SERVICE DEFAULT>')
end
it 'configures user_domain_*' do
is_expected.to contain_heat_config('trustee/user_domain_name').with_value( 'Default' )
end
it 'configures auth_type' do
is_expected.to contain_heat_config('trustee/auth_type').with_value( 'password' )
end
it 'configures auth_url' do
is_expected.to contain_heat_config('trustee/auth_url').with_value( 'http://127.0.0.1:5000/' )
end
it 'configures username' do
is_expected.to contain_heat_config('trustee/username').with_value( 'heat' )
end
it 'configures ' do
is_expected.to contain_heat_config('trustee/password').with_secret( true )
end
it 'configures endpoint_type for clients' do
is_expected.to contain_heat_config('clients/endpoint_type').with_value( '<SERVICE DEFAULT>' )
end
@ -302,17 +282,6 @@ describe 'heat' do
end
end
shared_examples_for "with custom keystone project_domain_* and user_domain_*" do
before do
params.merge!({
:keystone_user_domain_name => 'domain1',
})
end
it 'configures project_domain_* and user_domain_*' do
is_expected.to contain_heat_config('trustee/user_domain_name').with_value("domain1");
end
end
shared_examples_for "with enable_stack_adopt and enable_stack_abandon set" do
before do
params.merge!({

View File

@ -35,50 +35,6 @@ describe 'heat::trustee' do
is_expected.to contain_heat_config('trustee/user_domain_name').with_value('MyDomain')
end
end
context 'with authtoken defaults' do
let :pre_condition do
"class { 'heat::keystone::authtoken':
password => 'heat_password',
}"
end
let :params do
{}
end
it 'configures trustee options' do
is_expected.to contain_heat_config('trustee/password').with_value('heat_password').with_secret(true)
is_expected.to contain_heat_config('trustee/auth_url').with_value('http://127.0.0.1:5000/')
is_expected.to contain_heat_config('trustee/auth_type').with_value('password')
is_expected.to contain_heat_config('trustee/username').with_value('heat')
is_expected.to contain_heat_config('trustee/user_domain_name').with_value('Default')
end
end
context 'with authtoken parameters' do
let :pre_condition do
"class { 'heat::keystone::authtoken':
password => 'heat_password',
auth_type => 'v3password',
auth_url => 'https://localhost:13000/',
username => 'alt_heat',
user_domain_name => 'MyDomain',
}"
end
let :params do
{}
end
it 'configures trustee options' do
is_expected.to contain_heat_config('trustee/password').with_value('heat_password').with_secret(true)
is_expected.to contain_heat_config('trustee/auth_url').with_value('https://localhost:13000/')
is_expected.to contain_heat_config('trustee/auth_type').with_value('v3password')
is_expected.to contain_heat_config('trustee/username').with_value('alt_heat')
is_expected.to contain_heat_config('trustee/user_domain_name').with_value('MyDomain')
end
end
end
on_supported_os({