Fix explicit endpoint configuration
When trying to specify the endpoint type in the identity service catalog to use for communication with OpenStack services an outdated configuration option was written: endpoint_type was replaced by interface in aodh. This change therefore also deprecates the aodh::auth::auth_endpoint_type parameter in favor of a new aodh::auth::interface parameter. Change-Id: Ifca3ddc47e02752dcf8503e5691005382bb6073c
This commit is contained in:
parent
1143576ea7
commit
a4f6673a02
|
@ -42,6 +42,13 @@
|
||||||
# Certificate chain for SSL validation.
|
# Certificate chain for SSL validation.
|
||||||
# Optional. Defaults to $::os_service_default
|
# Optional. Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*interface*]
|
||||||
|
# Type of endpoint in Identity service catalog to use for
|
||||||
|
# communication with OpenStack services.
|
||||||
|
# Optional. Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
# [*auth_endpoint_type*]
|
# [*auth_endpoint_type*]
|
||||||
# Type of endpoint in Identity service catalog to use for
|
# Type of endpoint in Identity service catalog to use for
|
||||||
# communication with OpenStack services.
|
# communication with OpenStack services.
|
||||||
|
@ -58,11 +65,18 @@ class aodh::auth (
|
||||||
$auth_type = 'password',
|
$auth_type = 'password',
|
||||||
$auth_tenant_id = $::os_service_default,
|
$auth_tenant_id = $::os_service_default,
|
||||||
$auth_cacert = $::os_service_default,
|
$auth_cacert = $::os_service_default,
|
||||||
$auth_endpoint_type = $::os_service_default,
|
$interface = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$auth_endpoint_type = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::aodh::deps
|
include ::aodh::deps
|
||||||
|
|
||||||
|
if $auth_endpoint_type {
|
||||||
|
warning('The auth_endpoint_type parameter is deprecated. Please use interface instead.')
|
||||||
|
}
|
||||||
|
$interface_real = pick($auth_endpoint_type, $interface)
|
||||||
|
|
||||||
aodh_config {
|
aodh_config {
|
||||||
'service_credentials/auth_url' : value => $auth_url;
|
'service_credentials/auth_url' : value => $auth_url;
|
||||||
'service_credentials/region_name' : value => $auth_region;
|
'service_credentials/region_name' : value => $auth_region;
|
||||||
|
@ -71,7 +85,7 @@ class aodh::auth (
|
||||||
'service_credentials/project_name' : value => $auth_tenant_name;
|
'service_credentials/project_name' : value => $auth_tenant_name;
|
||||||
'service_credentials/cacert' : value => $auth_cacert;
|
'service_credentials/cacert' : value => $auth_cacert;
|
||||||
'service_credentials/tenant_id' : value => $auth_tenant_id;
|
'service_credentials/tenant_id' : value => $auth_tenant_id;
|
||||||
'service_credentials/endpoint_type' : value => $auth_endpoint_type;
|
'service_credentials/interface' : value => $interface_real;
|
||||||
'service_credentials/project_domain_id' : value => $project_domain_id;
|
'service_credentials/project_domain_id' : value => $project_domain_id;
|
||||||
'service_credentials/user_domain_id' : value => $user_domain_id;
|
'service_credentials/user_domain_id' : value => $user_domain_id;
|
||||||
'service_credentials/auth_type' : value => $auth_type;
|
'service_credentials/auth_type' : value => $auth_type;
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- When trying to specify the endpoint type in the identity service catalog to
|
||||||
|
use for communication with OpenStack services an outdated configuration
|
||||||
|
option was written.
|
||||||
|
deprecations:
|
||||||
|
- aodh::auth::auth_endpoint_type is deprecated and will be removed in a future
|
||||||
|
release. Please use aodh::auth::interface instead.
|
|
@ -28,12 +28,12 @@ describe 'aodh::auth' do
|
||||||
context 'when overriding parameters' do
|
context 'when overriding parameters' do
|
||||||
before do
|
before do
|
||||||
params.merge!(
|
params.merge!(
|
||||||
:auth_cacert => '/tmp/dummy.pem',
|
:auth_cacert => '/tmp/dummy.pem',
|
||||||
:auth_endpoint_type => 'internalURL',
|
:interface => 'internalURL',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
it { is_expected.to contain_aodh_config('service_credentials/cacert').with_value(params[:auth_cacert]) }
|
it { is_expected.to contain_aodh_config('service_credentials/cacert').with_value(params[:auth_cacert]) }
|
||||||
it { is_expected.to contain_aodh_config('service_credentials/endpoint_type').with_value(params[:auth_endpoint_type]) }
|
it { is_expected.to contain_aodh_config('service_credentials/interface').with_value(params[:interface]) }
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue