Merge "Add auth_version option in nova::api"
This commit is contained in:
@@ -43,6 +43,11 @@
|
||||
# (optional) Prefix to prepend at the beginning of the keystone path
|
||||
# Defaults to false
|
||||
#
|
||||
# [*auth_version*]
|
||||
# (optional) API version of the admin Identity API endpoint
|
||||
# for example, use 'v3.0' for the keystone version 3.0 api
|
||||
# Defaults to false
|
||||
#
|
||||
# [*admin_tenant_name*]
|
||||
# (optional) The name of the tenant to create in keystone for use by the nova services
|
||||
# Defaults to 'services'
|
||||
@@ -105,6 +110,7 @@ class nova::api(
|
||||
$auth_protocol = 'http',
|
||||
$auth_uri = false,
|
||||
$auth_admin_prefix = false,
|
||||
$auth_version = false,
|
||||
$admin_tenant_name = 'services',
|
||||
$admin_user = 'nova',
|
||||
$api_bind_address = '0.0.0.0',
|
||||
@@ -175,6 +181,12 @@ class nova::api(
|
||||
nova_config { 'keystone_authtoken/auth_uri': value => "${auth_protocol}://${auth_host}:5000/"; }
|
||||
}
|
||||
|
||||
if $auth_version {
|
||||
nova_config { 'keystone_authtoken/auth_version': value => $auth_version; }
|
||||
} else {
|
||||
nova_config { 'keystone_authtoken/auth_version': ensure => absent; }
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'keystone_authtoken/auth_host': value => $auth_host;
|
||||
'keystone_authtoken/auth_port': value => $auth_port;
|
||||
|
@@ -43,6 +43,8 @@ describe 'nova::api' do
|
||||
'keystone_authtoken/auth_uri').with_value('http://127.0.0.1:5000/')
|
||||
should contain_nova_config(
|
||||
'keystone_authtoken/auth_admin_prefix').with_ensure('absent')
|
||||
should contain_nova_config(
|
||||
'keystone_authtoken/auth_version').with_ensure('absent')
|
||||
should contain_nova_config(
|
||||
'keystone_authtoken/admin_tenant_name').with_value('services')
|
||||
should contain_nova_config(
|
||||
@@ -74,6 +76,7 @@ describe 'nova::api' do
|
||||
:auth_protocol => 'https',
|
||||
:auth_admin_prefix => '/keystone/admin',
|
||||
:auth_uri => 'https://10.0.0.1:9999/',
|
||||
:auth_version => 'v3.0',
|
||||
:admin_tenant_name => 'service2',
|
||||
:admin_user => 'nova2',
|
||||
:admin_password => 'passw0rd2',
|
||||
@@ -110,6 +113,8 @@ describe 'nova::api' do
|
||||
'keystone_authtoken/auth_admin_prefix').with_value('/keystone/admin')
|
||||
should contain_nova_config(
|
||||
'keystone_authtoken/auth_uri').with_value('https://10.0.0.1:9999/')
|
||||
should contain_nova_config(
|
||||
'keystone_authtoken/auth_version').with_value('v3.0')
|
||||
should contain_nova_config(
|
||||
'keystone_authtoken/admin_tenant_name').with_value('service2')
|
||||
should contain_nova_config(
|
||||
|
Reference in New Issue
Block a user