Remove the deprecated parameters of aodh::auth
Change-Id: I876d02605d346f4680672f9f4832bfbed91c4235
This commit is contained in:
parent
94555d4872
commit
77691c4c31
@ -43,24 +43,6 @@
|
||||
# communication with OpenStack services.
|
||||
# Optional. Defaults to $::os_service_default.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*project_domain_id*]
|
||||
# the keystone project domain id for aodh services
|
||||
# Optional. Defaults to undef
|
||||
#
|
||||
# [*user_domain_id*]
|
||||
# the keystone user domain id for aodh services
|
||||
# Optional. Defaults to undef
|
||||
#
|
||||
# [*auth_tenant_name*]
|
||||
# the keystone tenant name for aodh services
|
||||
# Optional. Defaults to undef
|
||||
#
|
||||
# [*auth_tenant_id*]
|
||||
# the keystone tenant id for aodh services.
|
||||
# Optional. Defaults to undef
|
||||
#
|
||||
class aodh::auth (
|
||||
$auth_password,
|
||||
$auth_url = 'http://localhost:5000/v3',
|
||||
@ -72,60 +54,20 @@ class aodh::auth (
|
||||
$auth_type = 'password',
|
||||
$auth_cacert = $::os_service_default,
|
||||
$interface = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$project_domain_id = undef,
|
||||
$user_domain_id = undef,
|
||||
$auth_tenant_name = undef,
|
||||
$auth_tenant_id = undef,
|
||||
) {
|
||||
|
||||
include aodh::deps
|
||||
|
||||
if $auth_tenant_name != undef {
|
||||
warning('aodh::auth::auth_tenant_name is deprecated and will be removed \
|
||||
in a future release. Use auth_project_name instead.')
|
||||
$auth_project_name_real = $auth_tenant_name
|
||||
} else {
|
||||
$auth_project_name_real = $auth_project_name
|
||||
}
|
||||
|
||||
if $auth_tenant_id != undef {
|
||||
warning('aodh::auth::auth_tenant_id is deprecated and has no effect')
|
||||
}
|
||||
|
||||
aodh_config {
|
||||
'service_credentials/auth_url' : value => $auth_url;
|
||||
'service_credentials/region_name' : value => $auth_region;
|
||||
'service_credentials/username' : value => $auth_user;
|
||||
'service_credentials/password' : value => $auth_password, secret => true;
|
||||
'service_credentials/project_name' : value => $auth_project_name_real;
|
||||
'service_credentials/cacert' : value => $auth_cacert;
|
||||
'service_credentials/interface' : value => $interface;
|
||||
'service_credentials/auth_type' : value => $auth_type;
|
||||
'service_credentials/auth_url' : value => $auth_url;
|
||||
'service_credentials/region_name' : value => $auth_region;
|
||||
'service_credentials/username' : value => $auth_user;
|
||||
'service_credentials/password' : value => $auth_password, secret => true;
|
||||
'service_credentials/project_name' : value => $auth_project_name;
|
||||
'service_credentials/project_domain_name' : value => $project_domain_name;
|
||||
'service_credentials/user_domain_name' : value => $user_domain_name;
|
||||
'service_credentials/cacert' : value => $auth_cacert;
|
||||
'service_credentials/interface' : value => $interface;
|
||||
'service_credentials/auth_type' : value => $auth_type;
|
||||
}
|
||||
|
||||
if $project_domain_id != undef {
|
||||
warning('aodh::auth::project_domain_id is deprecated and will be removed \
|
||||
in a future release. Use project_domain_name instead.')
|
||||
aodh_config{
|
||||
'service_credentials/project_domain_id' : value => $project_domain_id;
|
||||
}
|
||||
} else {
|
||||
aodh_config{
|
||||
'service_credentials/project_domain_name' : value => $project_domain_name;
|
||||
}
|
||||
}
|
||||
|
||||
if $user_domain_id != undef {
|
||||
warning('aodh::auth::user_domain_id is deprecated and will be removed \
|
||||
in a future release. Use user_domain_name instead.')
|
||||
aodh_config{
|
||||
'service_credentials/user_domain_id' : value => $user_domain_id;
|
||||
}
|
||||
} else {
|
||||
aodh_config{
|
||||
'service_credentials/user_domain_name' : value => $user_domain_name;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
10
releasenotes/notes/auth-cleanup-cbb03ab92a7275b5.yaml
Normal file
10
releasenotes/notes/auth-cleanup-cbb03ab92a7275b5.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The following deprecated parameters of the ``aodh::auth`` class have been
|
||||
removed.
|
||||
|
||||
- ``project_domain_id``
|
||||
- ``user_domain_id``
|
||||
- ``auth_tenant_name``
|
||||
- ``auth_tenant_id``
|
@ -27,22 +27,6 @@ describe 'aodh::auth' do
|
||||
is_expected.to contain_aodh_config('service_credentials/cacert').with(:value => '<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'when deprecated domain_id is set' do
|
||||
before do
|
||||
params.merge!(
|
||||
:user_domain_id => 'default',
|
||||
:project_domain_id => 'default',
|
||||
)
|
||||
end
|
||||
|
||||
it 'configures domain_id instead of domain_name' do
|
||||
is_expected.to_not contain_aodh_config('service_credentials/project_domain_name')
|
||||
is_expected.to contain_aodh_config('service_credentials/project_domain_id').with_value('default')
|
||||
is_expected.to_not contain_aodh_config('service_credentials/user_domain_name')
|
||||
is_expected.to contain_aodh_config('service_credentials/user_domain_id').with_value('default')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when overriding parameters' do
|
||||
before do
|
||||
params.merge!(
|
||||
|
Loading…
x
Reference in New Issue
Block a user