Add auth_strategy for cinder authtoken

To include the authtoken class we need to verify
if auth_strategy is set to keystone.

Change-Id: I111047021554f306e13b3133c8e461abf54c7b6d
This commit is contained in:
Iury Gregory Melo Ferreira 2016-08-26 17:52:49 -03:00
parent e14e4f4179
commit 4ff096f0c9
3 changed files with 20 additions and 6 deletions

View File

@ -62,7 +62,6 @@ class { 'cinder':
class { 'cinder::api':
keystone_password => $keystone_password,
keystone_enabled => $keystone_enabled,
keystone_user => $keystone_user,
keystone_auth_uri => $keystone_auth_uri,
service_port => $keystone_service_port,

View File

@ -4,10 +4,6 @@
#
# === Parameters
#
# [*keystone_enabled*]
# (optional) Use keystone for authentification
# Defaults to true
#
# [*privileged_user*]
# (optional) Enables OpenStack privileged account.
# Defaults to false.
@ -146,8 +142,16 @@
# (optional) CA certificate file to use to verify connecting clients
# Defaults to $::os_service_default
#
# [*auth_strategy*]
# (optional) Type of authentication to be used.
# Defaults to 'keystone'
#
# DEPRECATED PARAMETERS
#
# [*keystone_enabled*]
# (optional) Deprecated. Use auth_strategy instead.
# Defaults to undef
#
# [*keystone_tenant*]
# (optional) Deprecated. Use cinder::keystone::authtoken::project_name instead.
# Defaults to undef.
@ -221,6 +225,7 @@ class cinder::api (
$cert_file = $::os_service_default,
$key_file = $::os_service_default,
$ca_file = $::os_service_default,
$auth_strategy = 'keystone',
# DEPRECATED PARAMETERS
$validation_options = {},
$keystone_tenant = undef,
@ -262,6 +267,13 @@ class cinder::api (
warning('cinder::api::memcached_servers is deprecated, use cinder::keystone::authtoken::memcached_servers instead.')
}
if $keystone_enabled {
warning('keystone_enabled is deprecated, use auth_strategy instead.')
$auth_strategy_real = $keystone_enabled
} else {
$auth_strategy_real = $auth_strategy
}
if $use_ssl_real {
if is_service_default($cert_file_real) {
fail('The cert_file parameter is required when use_ssl is set to true')
@ -369,7 +381,7 @@ class cinder::api (
'keymgr/encryption_auth_url': value => $keymgr_encryption_auth_url;
}
if $keystone_enabled {
if $auth_strategy_real {
include ::cinder::keystone::authtoken
}

View File

@ -0,0 +1,3 @@
---
deprecations:
- keystone_enabled is deprecated in favor of auth_strategy