Add ability to specify auth_region
This change adds the ability to specify auth_region in neutron.conf. Change-Id: I475ba151a1fe841b3f84e301a9e68fdf05f5afa4 Closes-Bug: 1471018
This commit is contained in:
parent
32ca5213d5
commit
d9d6f2ae38
|
@ -52,6 +52,11 @@
|
|||
# (where '/keystone' is the admin prefix)
|
||||
# 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*]
|
||||
# (optional) The tenant of the auth user
|
||||
# Defaults to services
|
||||
|
@ -196,6 +201,7 @@ class neutron::server (
|
|||
$manage_service = true,
|
||||
$service_name = $::neutron::params::server_service,
|
||||
$auth_password = false,
|
||||
$auth_region = undef,
|
||||
$auth_type = 'keystone',
|
||||
$auth_tenant = 'services',
|
||||
$auth_user = 'neutron',
|
||||
|
@ -471,6 +477,12 @@ class neutron::server (
|
|||
'filter:authtoken/auth_uri': value => $auth_uri_real;
|
||||
}
|
||||
|
||||
if $auth_region {
|
||||
neutron_config {
|
||||
'keystone_authtoken/auth_region': value => $auth_region;
|
||||
}
|
||||
}
|
||||
|
||||
if $identity_uri {
|
||||
neutron_config {
|
||||
'keystone_authtoken/identity_uri': value => $identity_uri;
|
||||
|
|
|
@ -316,6 +316,20 @@ describe 'neutron::server' do
|
|||
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
|
||||
let :facts do
|
||||
default_facts.merge(
|
||||
|
|
Loading…
Reference in New Issue