Add identity_uri to glance config
Old auth_host, port, protocol are depricated now but are left for compatibility. Closes-Bug: 1391235 Change-Id: Ifeac9085d83bae47c476160a8b223ba3c76376ba
This commit is contained in:
parent
c7b71bd1ee
commit
3d0294ce8d
@ -61,6 +61,10 @@
|
||||
# (optional) Authentication URL.
|
||||
# Defaults to 'http://localhost:5000/v2.0'.
|
||||
#
|
||||
# [*identity_uri*]
|
||||
# (optional) Complete admin Identity API endpoint.
|
||||
# Defaults to "${auth_protocol}://${auth_host}:${auth_port}/"
|
||||
#
|
||||
# [* auth_port*]
|
||||
# (optional) Port to use for auth service on auth_host.
|
||||
# Defaults to '35357'.
|
||||
@ -162,6 +166,7 @@ class glance::api(
|
||||
$auth_url = 'http://localhost:5000/v2.0',
|
||||
$auth_port = '35357',
|
||||
$auth_uri = false,
|
||||
$identity_uri = false,
|
||||
$auth_admin_prefix = false,
|
||||
$auth_protocol = 'http',
|
||||
$pipeline = 'keystone+cachemanagement',
|
||||
@ -280,6 +285,16 @@ class glance::api(
|
||||
}
|
||||
|
||||
# auth config
|
||||
if $identity_uri {
|
||||
glance_api_config { 'keystone_authtoken/identity_uri': value => $identity_uri; }
|
||||
} else {
|
||||
if $auth_admin_prefix {
|
||||
glance_api_config { 'keystone_authtoken/identity_uri': value => "${auth_protocol}://${auth_host}:${auth_port}/${auth_admin_prefix}"; }
|
||||
} else {
|
||||
glance_api_config { 'keystone_authtoken/identity_uri': value => "${auth_protocol}://${auth_host}:${auth_port}/"; }
|
||||
}
|
||||
}
|
||||
|
||||
glance_api_config {
|
||||
'keystone_authtoken/auth_host': value => $auth_host;
|
||||
'keystone_authtoken/auth_port': value => $auth_port;
|
||||
|
@ -59,6 +59,9 @@
|
||||
# [*auth_uri*]
|
||||
# (optional) Complete public Identity API endpoint.
|
||||
#
|
||||
# [*identity_uri*]
|
||||
# (optional) Complete admin Identity API endpoint.
|
||||
#
|
||||
# [*keystone_tenant*]
|
||||
# (optional) administrative tenant name to connect to keystone.
|
||||
# Defaults to 'services'.
|
||||
@ -115,6 +118,7 @@ class glance::registry(
|
||||
$auth_port = '35357',
|
||||
$auth_admin_prefix = false,
|
||||
$auth_uri = false,
|
||||
$identity_uri = false,
|
||||
$auth_protocol = 'http',
|
||||
$keystone_tenant = 'services',
|
||||
$keystone_user = 'glance',
|
||||
@ -186,6 +190,16 @@ class glance::registry(
|
||||
}
|
||||
|
||||
# auth config
|
||||
if $identity_uri {
|
||||
glance_registry_config { 'keystone_authtoken/identity_uri': value => $identity_uri; }
|
||||
} else {
|
||||
if $auth_admin_prefix {
|
||||
glance_registry_config { 'keystone_authtoken/identity_uri': value => "${auth_protocol}://${auth_host}:${auth_port}/${auth_admin_prefix}"; }
|
||||
} else {
|
||||
glance_registry_config { 'keystone_authtoken/identity_uri': value => "${auth_protocol}://${auth_host}:${auth_port}/"; }
|
||||
}
|
||||
}
|
||||
|
||||
glance_registry_config {
|
||||
'keystone_authtoken/auth_host': value => $auth_host;
|
||||
'keystone_authtoken/auth_port': value => $auth_port;
|
||||
|
@ -27,6 +27,7 @@ describe 'glance::api' do
|
||||
:auth_port => '35357',
|
||||
:auth_protocol => 'http',
|
||||
:auth_uri => 'http://127.0.0.1:5000/',
|
||||
:identity_uri => 'http://127.0.0.1:35357/',
|
||||
:keystone_tenant => 'services',
|
||||
:keystone_user => 'glance',
|
||||
:keystone_password => 'ChangeMe',
|
||||
@ -55,6 +56,7 @@ describe 'glance::api' do
|
||||
:auth_port => '35358',
|
||||
:auth_protocol => 'https',
|
||||
:auth_uri => 'https://127.0.0.2:5000/v2.0/',
|
||||
:identity_uri => 'https://127.0.0.2:35358/',
|
||||
:keystone_tenant => 'admin2',
|
||||
:keystone_user => 'admin2',
|
||||
:keystone_password => 'ChangeMe2',
|
||||
|
@ -23,6 +23,7 @@ describe 'glance::registry' do
|
||||
:auth_port => '35357',
|
||||
:auth_protocol => 'http',
|
||||
:auth_uri => 'http://127.0.0.1:5000/',
|
||||
:identity_uri => 'http://127.0.0.1:35357/',
|
||||
:keystone_tenant => 'services',
|
||||
:keystone_user => 'glance',
|
||||
:keystone_password => 'ChangeMe',
|
||||
@ -46,6 +47,7 @@ describe 'glance::registry' do
|
||||
:auth_port => '35357',
|
||||
:auth_protocol => 'http',
|
||||
:auth_uri => 'http://127.0.0.1:5000/',
|
||||
:identity_uri => 'http://127.0.0.1:35357/',
|
||||
:keystone_tenant => 'admin',
|
||||
:keystone_user => 'admin',
|
||||
:keystone_password => 'ChangeMe',
|
||||
|
Loading…
Reference in New Issue
Block a user