From c507b55112d09c80f1598a28fee40c522ff26a14 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 4 Mar 2022 02:53:21 +0900 Subject: [PATCH] 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 --- manifests/api.pp | 19 +++++++++++++------ .../deprecate-auth_uri-90a44ad54c0d57bb.yaml | 5 +++++ spec/classes/watcher_api_spec.rb | 3 --- 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/deprecate-auth_uri-90a44ad54c0d57bb.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 6ff603d..cd043ba 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -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; + } + } diff --git a/releasenotes/notes/deprecate-auth_uri-90a44ad54c0d57bb.yaml b/releasenotes/notes/deprecate-auth_uri-90a44ad54c0d57bb.yaml new file mode 100644 index 0000000..66b2bec --- /dev/null +++ b/releasenotes/notes/deprecate-auth_uri-90a44ad54c0d57bb.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``watcher::api::watcher_client_auth_uri`` parameter has been deprecated + and has no effect. diff --git a/spec/classes/watcher_api_spec.rb b/spec/classes/watcher_api_spec.rb index 77f481a..ed7032d 100644 --- a/spec/classes/watcher_api_spec.rb +++ b/spec/classes/watcher_api_spec.rb @@ -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('') is_expected.to contain_watcher_config('watcher_clients_auth/user_domain_name').with_value('') @@ -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] )