Merge "Add ability to specify auth_region"
This commit is contained in:
@@ -52,6 +52,11 @@
|
|||||||
# (where '/keystone' is the admin prefix)
|
# (where '/keystone' is the admin prefix)
|
||||||
# Defaults to false for empty. If defined, should be a string with a leading '/' and no trailing '/'.
|
# Defaults to false for empty. If defined, should be a string with a leading '/' and no trailing '/'.
|
||||||
#
|
#
|
||||||
|
# [*auth_region*]
|
||||||
|
# (optional) The authentication region. Note this value is case-sensitive and
|
||||||
|
# must match the endpoint region defined in Keystone.
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
# [*auth_tenant*]
|
# [*auth_tenant*]
|
||||||
# (optional) The tenant of the auth user
|
# (optional) The tenant of the auth user
|
||||||
# Defaults to services
|
# Defaults to services
|
||||||
@@ -196,6 +201,7 @@ class neutron::server (
|
|||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$service_name = $::neutron::params::server_service,
|
$service_name = $::neutron::params::server_service,
|
||||||
$auth_password = false,
|
$auth_password = false,
|
||||||
|
$auth_region = undef,
|
||||||
$auth_type = 'keystone',
|
$auth_type = 'keystone',
|
||||||
$auth_tenant = 'services',
|
$auth_tenant = 'services',
|
||||||
$auth_user = 'neutron',
|
$auth_user = 'neutron',
|
||||||
@@ -471,6 +477,12 @@ class neutron::server (
|
|||||||
'filter:authtoken/auth_uri': value => $auth_uri_real;
|
'filter:authtoken/auth_uri': value => $auth_uri_real;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $auth_region {
|
||||||
|
neutron_config {
|
||||||
|
'keystone_authtoken/auth_region': value => $auth_region;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if $identity_uri {
|
if $identity_uri {
|
||||||
neutron_config {
|
neutron_config {
|
||||||
'keystone_authtoken/identity_uri': value => $identity_uri;
|
'keystone_authtoken/identity_uri': value => $identity_uri;
|
||||||
|
@@ -316,6 +316,20 @@ describe 'neutron::server' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "with custom auth region" do
|
||||||
|
let :facts do
|
||||||
|
default_facts.merge({ :osfamily => 'RedHat' })
|
||||||
|
end
|
||||||
|
before do
|
||||||
|
params.merge!({
|
||||||
|
:auth_region => 'MyRegion',
|
||||||
|
})
|
||||||
|
end
|
||||||
|
it 'configures auth_region' do
|
||||||
|
is_expected.to contain_neutron_config('keystone_authtoken/auth_region').with_value('MyRegion');
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'on Debian platforms' do
|
context 'on Debian platforms' do
|
||||||
let :facts do
|
let :facts do
|
||||||
default_facts.merge(
|
default_facts.merge(
|
||||||
|
Reference in New Issue
Block a user