From 384891ba49cd548d5e6325c45dd05b9441ed1851 Mon Sep 17 00:00:00 2001 From: Harry Rybacki Date: Fri, 6 Oct 2017 09:50:29 -0400 Subject: [PATCH] Configure *_domain_name to Default by default Keystone v2.0 API was removed so we have no choice but configuring user_domain_name and project_domain_name otherwise it fallbacks to Keystone v2.0 and it fails. This patch sets the default value so we make sure Keystone v3 will be used out of the box for our users. Change-Id: If0a614520c4737e489147e18b1e9028e1f671f88 --- manifests/api/authtoken.pp | 8 ++++---- manifests/registry/authtoken.pp | 8 ++++---- releasenotes/notes/default-domain-e9adc769441e1381.yaml | 7 +++++++ spec/classes/glance_api_authtoken_spec.rb | 4 ++-- spec/classes/glance_registry_authtoken_spec.rb | 4 ++-- 5 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 releasenotes/notes/default-domain-e9adc769441e1381.yaml diff --git a/manifests/api/authtoken.pp b/manifests/api/authtoken.pp index 42e1ded6..a9d8fc7b 100644 --- a/manifests/api/authtoken.pp +++ b/manifests/api/authtoken.pp @@ -22,11 +22,11 @@ # # [*user_domain_name*] # (Optional) Name of domain for $username -# Defaults to $::os_service_default +# Defaults to 'Default' # # [*project_domain_name*] # (Optional) Name of domain for $project_name -# Defaults to $::os_service_default +# Defaults to 'Default' # # [*insecure*] # (Optional) If true, explicitly allow TLS without checking server cert @@ -192,8 +192,8 @@ class glance::api::authtoken( $password = $::os_service_default, $auth_url = 'http://127.0.0.1:35357', $project_name = 'services', - $user_domain_name = $::os_service_default, - $project_domain_name = $::os_service_default, + $user_domain_name = 'Default', + $project_domain_name = 'Default', $insecure = $::os_service_default, $auth_section = $::os_service_default, $auth_type = 'password', diff --git a/manifests/registry/authtoken.pp b/manifests/registry/authtoken.pp index 02d016ac..b21a051b 100644 --- a/manifests/registry/authtoken.pp +++ b/manifests/registry/authtoken.pp @@ -22,11 +22,11 @@ # # [*user_domain_name*] # (Optional) Name of domain for $username -# Defaults to $::os_service_default +# Defaults to 'Default' # # [*project_domain_name*] # (Optional) Name of domain for $project_name -# Defaults to $::os_service_default +# Defaults to 'Default' # # [*insecure*] # (Optional) If true, explicitly allow TLS without checking server cert @@ -192,8 +192,8 @@ class glance::registry::authtoken( $password = $::os_service_default, $auth_url = 'http://127.0.0.1:35357', $project_name = 'services', - $user_domain_name = $::os_service_default, - $project_domain_name = $::os_service_default, + $user_domain_name = 'Default', + $project_domain_name = 'Default', $insecure = $::os_service_default, $auth_section = $::os_service_default, $auth_type = 'password', diff --git a/releasenotes/notes/default-domain-e9adc769441e1381.yaml b/releasenotes/notes/default-domain-e9adc769441e1381.yaml new file mode 100644 index 00000000..c554c06f --- /dev/null +++ b/releasenotes/notes/default-domain-e9adc769441e1381.yaml @@ -0,0 +1,7 @@ +--- +issues: + - | + Keystone v2.0 API was removed so we need to set a default value + for user_domain_name and project_domain name, which will be + Default as it is already in some other classes in modules. + diff --git a/spec/classes/glance_api_authtoken_spec.rb b/spec/classes/glance_api_authtoken_spec.rb index 5d8565eb..ece65773 100644 --- a/spec/classes/glance_api_authtoken_spec.rb +++ b/spec/classes/glance_api_authtoken_spec.rb @@ -15,8 +15,8 @@ describe 'glance::api::authtoken' do is_expected.to contain_glance_api_config('keystone_authtoken/password').with_value('glance_api_password') is_expected.to contain_glance_api_config('keystone_authtoken/auth_url').with_value('http://127.0.0.1:35357') is_expected.to contain_glance_api_config('keystone_authtoken/project_name').with_value('services') - is_expected.to contain_glance_api_config('keystone_authtoken/user_domain_name').with_value('') - is_expected.to contain_glance_api_config('keystone_authtoken/project_domain_name').with_value('') + is_expected.to contain_glance_api_config('keystone_authtoken/user_domain_name').with_value('Default') + is_expected.to contain_glance_api_config('keystone_authtoken/project_domain_name').with_value('Default') is_expected.to contain_glance_api_config('keystone_authtoken/insecure').with_value('') is_expected.to contain_glance_api_config('keystone_authtoken/auth_section').with_value('') is_expected.to contain_glance_api_config('keystone_authtoken/auth_type').with_value('password') diff --git a/spec/classes/glance_registry_authtoken_spec.rb b/spec/classes/glance_registry_authtoken_spec.rb index a1d719f6..6e94c32f 100644 --- a/spec/classes/glance_registry_authtoken_spec.rb +++ b/spec/classes/glance_registry_authtoken_spec.rb @@ -15,8 +15,8 @@ describe 'glance::registry::authtoken' do is_expected.to contain_glance_registry_config('keystone_authtoken/password').with_value('glance_registry_password') is_expected.to contain_glance_registry_config('keystone_authtoken/auth_url').with_value('http://127.0.0.1:35357') is_expected.to contain_glance_registry_config('keystone_authtoken/project_name').with_value('services') - is_expected.to contain_glance_registry_config('keystone_authtoken/user_domain_name').with_value('') - is_expected.to contain_glance_registry_config('keystone_authtoken/project_domain_name').with_value('') + is_expected.to contain_glance_registry_config('keystone_authtoken/user_domain_name').with_value('Default') + is_expected.to contain_glance_registry_config('keystone_authtoken/project_domain_name').with_value('Default') is_expected.to contain_glance_registry_config('keystone_authtoken/insecure').with_value('') is_expected.to contain_glance_registry_config('keystone_authtoken/auth_section').with_value('') is_expected.to contain_glance_registry_config('keystone_authtoken/auth_type').with_value('password')