Deprecate management of [watcher_clients_auth] auth_uri

... becaushe the auth_uri parameter is ineffective and has never been
implemented in keystoneauth.

Change-Id: Ib2fce8b7ec03b5d2a42a5ab68bcd5734f908677e
This commit is contained in:
Takashi Kajinami 2022-03-04 02:53:21 +09:00
parent a3f46348de
commit c507b55112
3 changed files with 18 additions and 9 deletions

View File

@ -17,10 +17,6 @@
# (optional) The name of the auth user
# Defaults to watcher.
#
# [*watcher_client_auth_uri*]
# (Optional) Public Identity API endpoint.
# Defaults to 'http://localhost:5000/'
#
# [*watcher_client_auth_url*]
# Specifies the admin Identity URI for Watcher to use.
# Default 'http://localhost:5000/'
@ -163,10 +159,13 @@
# API endpoint to represent SSL termination URL with 'public_endpoint' option.
# Defaults to undef.
#
# [*watcher_client_auth_uri*]
# (Optional) Public Identity API endpoint.
# Defaults to undef
#
class watcher::api (
$watcher_client_password,
$watcher_client_username = 'watcher',
$watcher_client_auth_uri = 'http://localhost:5000/',
$watcher_client_auth_url = 'http://localhost:5000/',
$package_ensure = 'present',
$enabled = true,
@ -197,6 +196,7 @@ class watcher::api (
$watcher_api_bind_host = undef,
$watcher_api_workers = undef,
$watcher_api_enable_ssl_api = undef,
$watcher_client_auth_uri = undef,
) inherits watcher::params {
include watcher::policy
@ -288,7 +288,6 @@ as a standalone service, or httpd for being run by a httpd server")
'watcher_clients_auth/username': value => $watcher_client_username;
'watcher_clients_auth/password': value => $watcher_client_password, secret => true;
'watcher_clients_auth/auth_url': value => $watcher_client_auth_url;
'watcher_clients_auth/auth_uri': value => $watcher_client_auth_uri;
'watcher_clients_auth/project_name': value => $watcher_client_project_name;
'watcher_clients_auth/project_domain_name': value => $watcher_client_project_domain_name;
'watcher_clients_auth/user_domain_name': value => $watcher_client_user_domain_name;
@ -298,4 +297,12 @@ as a standalone service, or httpd for being run by a httpd server")
'watcher_clients_auth/certfile': value => $watcher_client_certfile;
'watcher_clients_auth/keyfile': value => $watcher_client_keyfile;
}
if $watcher_client_auth_uri != undef {
warning('The watcher_client_auth_uri is deprecated and has no effect.')
}
watcher_config {
'watcher_clients_auth/auth_uri': ensure => absent;
}
}

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The ``watcher::api::watcher_client_auth_uri`` parameter has been deprecated
and has no effect.

View File

@ -75,7 +75,6 @@ describe 'watcher::api' do
is_expected.to contain_watcher_config('watcher_clients_auth/username').with_value('watcher')
is_expected.to contain_watcher_config('watcher_clients_auth/password').with_value( params[:watcher_client_password] )
is_expected.to contain_watcher_config('watcher_clients_auth/auth_url').with_value('http://localhost:5000/')
is_expected.to contain_watcher_config('watcher_clients_auth/auth_uri').with_value('http://localhost:5000/')
is_expected.to contain_watcher_config('watcher_clients_auth/project_name').with_value('services')
is_expected.to contain_watcher_config('watcher_clients_auth/project_domain_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_watcher_config('watcher_clients_auth/user_domain_name').with_value('<SERVICE DEFAULT>')
@ -92,7 +91,6 @@ describe 'watcher::api' do
params.merge! ({
:watcher_client_username => 'watcher_user',
:watcher_client_password => 'PassWoRD',
:watcher_client_auth_uri => 'http://localhost:5001/',
:watcher_client_auth_url => 'http://localhost:35358/',
:watcher_client_project_name => 'ProjectZero',
:watcher_client_project_domain_name => 'WatcherDomain',
@ -107,7 +105,6 @@ describe 'watcher::api' do
it 'configures watcher clients auth' do
is_expected.to contain_watcher_config('watcher_clients_auth/username').with_value( params[:watcher_client_username] )
is_expected.to contain_watcher_config('watcher_clients_auth/password').with_value( params[:watcher_client_password] )
is_expected.to contain_watcher_config('watcher_clients_auth/auth_uri').with_value('http://localhost:5001/')
is_expected.to contain_watcher_config('watcher_clients_auth/auth_url').with_value('http://localhost:35358/')
is_expected.to contain_watcher_config('watcher_clients_auth/project_name').with_value( params[:watcher_client_project_name] )
is_expected.to contain_watcher_config('watcher_clients_auth/project_domain_name').with_value( params[:watcher_client_project_domain_name] )