Consistent with other core module, auth_uri,identity_uri
keystone_auth_ui and keystone_identity_uri parameters are inconsistent with other modules, change keystone_auth_ui,keystone_identity_uri to auth_uri,identity_uri Change-Id: I0c606b62678c3c293dc0e15c47825909f0c64ee0 Closes-Bug: #1532920
This commit is contained in:
parent
b787d19d9e
commit
e7ed2b8f9c
@ -27,11 +27,11 @@
|
|||||||
# [*keystone_password*]
|
# [*keystone_password*]
|
||||||
# (Required) Password to authenticate with.
|
# (Required) Password to authenticate with.
|
||||||
#
|
#
|
||||||
# [*keystone_auth_uri*]
|
# [*auth_uri*]
|
||||||
# (Optional) Public Identity API endpoint.
|
# (Optional) Public Identity API endpoint.
|
||||||
# Defaults to 'http://127.0.0.1:5000/'.
|
# Defaults to 'http://127.0.0.1:5000/'.
|
||||||
#
|
#
|
||||||
# [*keystone_identity_uri*]
|
# [*identity_uri*]
|
||||||
# (Optional) Complete admin Identity API endpoint.
|
# (Optional) Complete admin Identity API endpoint.
|
||||||
# Defaults to 'http://127.0.0.1:35357/'.
|
# Defaults to 'http://127.0.0.1:35357/'.
|
||||||
#
|
#
|
||||||
@ -60,6 +60,16 @@
|
|||||||
# (Optional) Number of workers for Ceilometer API server (integer value).
|
# (Optional) Number of workers for Ceilometer API server (integer value).
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
|
# [*keystone_auth_uri*]
|
||||||
|
# (optional) DEPRECATED Public Identity API endpoint.
|
||||||
|
# Defaults to false.
|
||||||
|
# Use auth_uri instead.
|
||||||
|
#
|
||||||
|
# [*keystone_identity_uri*]
|
||||||
|
# (optional) DEPRECATED Complete admin Identity API endpoint.
|
||||||
|
# Defaults to false.
|
||||||
|
# Use identity_uri instead.
|
||||||
|
#
|
||||||
class ceilometer::api (
|
class ceilometer::api (
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
@ -67,12 +77,15 @@ class ceilometer::api (
|
|||||||
$keystone_user = 'ceilometer',
|
$keystone_user = 'ceilometer',
|
||||||
$keystone_tenant = 'services',
|
$keystone_tenant = 'services',
|
||||||
$keystone_password = false,
|
$keystone_password = false,
|
||||||
$keystone_auth_uri = 'http://127.0.0.1:5000/',
|
$auth_uri = 'http://127.0.0.1:5000/',
|
||||||
$keystone_identity_uri = 'http://127.0.0.1:35357/',
|
$identity_uri = 'http://127.0.0.1:35357/',
|
||||||
$host = '0.0.0.0',
|
$host = '0.0.0.0',
|
||||||
$port = '8777',
|
$port = '8777',
|
||||||
$service_name = $::ceilometer::params::api_service_name,
|
$service_name = $::ceilometer::params::api_service_name,
|
||||||
$api_workers = $::os_service_default,
|
$api_workers = $::os_service_default,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$keystone_auth_uri = false,
|
||||||
|
$keystone_identity_uri = false,
|
||||||
) inherits ceilometer::params {
|
) inherits ceilometer::params {
|
||||||
|
|
||||||
include ::ceilometer::params
|
include ::ceilometer::params
|
||||||
@ -136,9 +149,23 @@ class ceilometer::api (
|
|||||||
'api/port' : value => $port;
|
'api/port' : value => $port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $keystone_auth_uri {
|
||||||
|
warning('The keystone_auth_uri parameter is deprecated. Please use auth_uri instead.')
|
||||||
|
$auth_uri_real = $keystone_auth_uri
|
||||||
|
} else {
|
||||||
|
$auth_uri_real = $auth_uri
|
||||||
|
}
|
||||||
|
|
||||||
|
if $keystone_identity_uri {
|
||||||
|
warning('The keystone_identity_uri parameter is deprecated. Please use identity_uri instead.')
|
||||||
|
$identity_uri_real = $keystone_identity_uri
|
||||||
|
} else {
|
||||||
|
$identity_uri_real = $identity_uri
|
||||||
|
}
|
||||||
|
|
||||||
ceilometer_config {
|
ceilometer_config {
|
||||||
'keystone_authtoken/auth_uri' : value => $keystone_auth_uri;
|
'keystone_authtoken/auth_uri' : value => $auth_uri_real;
|
||||||
'keystone_authtoken/identity_uri' : value => $keystone_identity_uri;
|
'keystone_authtoken/identity_uri' : value => $identity_uri_real;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ describe 'ceilometer::api' do
|
|||||||
it_configures 'ceilometer-api'
|
it_configures 'ceilometer-api'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "with custom keystone identity_uri and auth_uri" do
|
describe "with deprecated custom keystone_identity_uri and keystone_auth_uri" do
|
||||||
let :facts do
|
let :facts do
|
||||||
@default_facts.merge({ :osfamily => 'RedHat' })
|
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||||
end
|
end
|
||||||
@ -177,4 +177,20 @@ describe 'ceilometer::api' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "with custom keystone identity_uri and auth_uri" do
|
||||||
|
let :facts do
|
||||||
|
@default_facts.merge({ :osfamily => 'RedHat' })
|
||||||
|
end
|
||||||
|
before do
|
||||||
|
params.merge!({
|
||||||
|
:identity_uri => 'https://foo.bar:35357/',
|
||||||
|
:auth_uri => 'https://foo.bar:5000/',
|
||||||
|
})
|
||||||
|
end
|
||||||
|
it 'configures identity_uri and auth_uri but deprecates old auth settings' do
|
||||||
|
is_expected.to contain_ceilometer_config('keystone_authtoken/identity_uri').with_value("https://foo.bar:35357/");
|
||||||
|
is_expected.to contain_ceilometer_config('keystone_authtoken/auth_uri').with_value("https://foo.bar:5000/");
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user