Deprecate auth_uri option

Option auth_uri from group keystone_authtoken is deprecated [1].
Use option www_authenticate_uri from group keystone_authtoken.

Does not change auth_uri for providers because [2] will change
that to auth_url.

[1] https://review.openstack.org/#/c/508522/
[2] https://review.openstack.org/#/c/588504/

Change-Id: I134f6318f3d409f9aa3368e93e9ef55a82ab6788
This commit is contained in:
Tobias Urdin 2018-08-06 10:46:17 +02:00 committed by Tobias Urdin
parent 4699a63ef0
commit 567ea6183c
3 changed files with 28 additions and 13 deletions

View File

@ -239,7 +239,7 @@
# (Optional) Tenant for admin_username
# Defaults to 'services'
#
# [*auth_uri*]
# [*www_authenticate_uri*]
# (Optional) Public identity endpoint
# Defaults to 'http://127.0.0.1:5000/v3'
#
@ -267,6 +267,10 @@
# (Optional) Admin identity endpoint
# Defaults to 'http://127.0.0.1:5000/'
#
# [*auth_uri*]
# (Optional) Complete public Identity API endpoint.
# Defaults to undef
#
class murano(
$admin_password,
$package_ensure = 'present',
@ -321,7 +325,7 @@ class murano(
$sync_db = true,
$admin_user = 'murano',
$admin_tenant_name = 'services',
$auth_uri = 'http://127.0.0.1:5000/v3',
$www_authenticate_uri = 'http://127.0.0.1:5000/v3',
$user_domain_name = 'Default',
$project_domain_name = 'Default',
$memcached_servers = $::os_service_default,
@ -329,6 +333,7 @@ class murano(
$amqp_durable_queues = $::os_service_default,
# Deprecated
$identity_uri = 'http://127.0.0.1:5000/',
$auth_uri = undef,
) inherits murano::params {
include ::murano::deps
@ -338,6 +343,11 @@ class murano(
validate_string($admin_password)
if $auth_uri {
warning('The auth_uri parameter is deprecated. Please use www_authenticate_uri instead.')
}
$www_authenticate_uri_real = pick($auth_uri, $www_authenticate_uri)
package { 'murano-common':
ensure => $package_ensure,
name => $::murano::params::common_package_name,
@ -413,14 +423,14 @@ class murano(
}
keystone::resource::authtoken { 'murano_config':
auth_uri => $auth_uri,
auth_url => $identity_uri,
username => $admin_user,
password => $admin_password,
project_name => $admin_tenant_name,
user_domain_name => $user_domain_name,
project_domain_name => $project_domain_name,
memcached_servers => $memcached_servers,
www_authenticate_uri => $www_authenticate_uri_real,
auth_url => $identity_uri,
username => $admin_user,
password => $admin_password,
project_name => $admin_tenant_name,
user_domain_name => $user_domain_name,
project_domain_name => $project_domain_name,
memcached_servers => $memcached_servers,
}
oslo::messaging::rabbit { 'murano_config':

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
murano::auth_uri is deprecated and will be removed in a future release.
Please use www_authenticate_uri instead.

View File

@ -63,7 +63,7 @@ describe 'murano' do
it { is_expected.to contain_murano_config('networking/create_router').with_value(true) }
it { is_expected.to contain_murano_config('networking/external_network').with_value('public') }
it { is_expected.to contain_murano_config('keystone_authtoken/auth_uri').with_value('http://127.0.0.1:5000/v3') }
it { is_expected.to contain_murano_config('keystone_authtoken/www_authenticate_uri').with_value('http://127.0.0.1:5000/v3') }
it { is_expected.to contain_murano_config('keystone_authtoken/username').with_value('murano') }
it { is_expected.to contain_murano_config('keystone_authtoken/project_name').with_value('services') }
it { is_expected.to contain_murano_config('keystone_authtoken/password').with_value('secrete') }
@ -112,7 +112,7 @@ describe 'murano' do
:sync_db => false,
:admin_user => 'muranoy',
:admin_tenant_name => 'secrete',
:auth_uri => 'http://10.255.0.1:5000/v2.0/',
:www_authenticate_uri => 'http://10.255.0.1:5000/v2.0/',
:identity_uri => 'http://10.255.0.1:5000/',
:user_domain_name => 'new_domain',
:project_domain_name => 'new_domain',
@ -161,7 +161,7 @@ describe 'murano' do
it { is_expected.to contain_murano_config('rabbitmq/virtual_host').with_value('murano_vhost') }
it { is_expected.to contain_murano_config('rabbitmq/ssl').with_value(true) }
it { is_expected.to contain_murano_config('keystone_authtoken/auth_uri').with_value('http://10.255.0.1:5000/v2.0/') }
it { is_expected.to contain_murano_config('keystone_authtoken/www_authenticate_uri').with_value('http://10.255.0.1:5000/v2.0/') }
it { is_expected.to contain_murano_config('keystone_authtoken/username').with_value('muranoy') }
it { is_expected.to contain_murano_config('keystone_authtoken/project_name').with_value('secrete') }
it { is_expected.to contain_murano_config('keystone_authtoken/auth_url').with_value('http://10.255.0.1:5000/') }