From d33c1e8945d6bd98df1c92a7a1963409d947e933 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Tue, 1 Aug 2017 16:32:26 -0400 Subject: [PATCH] Configure auth_strategy auth_strategy was never configured in cinder.conf, even though the module has a variable for it, which makes one think you can use hieradata to make it confiigurable. This patch will configure the specified value in cinder.conf. Change-Id: I248b5c4de37ae36a9b142f95eb2d4afa5406df14 Closes-Bug: #1708012 --- manifests/api.pp | 1 + .../configure-auth_strategy-f8005172e383ec94.yaml | 4 ++++ spec/classes/cinder_api_spec.rb | 14 ++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 releasenotes/notes/configure-auth_strategy-f8005172e383ec94.yaml diff --git a/manifests/api.pp b/manifests/api.pp index fa5f47a6..b7106a81 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -285,6 +285,7 @@ running as a standalone service, or httpd for being run by a httpd server") 'DEFAULT/osapi_volume_base_URL': value => $osapi_volume_base_url; 'DEFAULT/osapi_max_limit': value => $osapi_max_limit; 'DEFAULT/osapi_volume_listen_port': value => $osapi_volume_listen_port; + 'DEFAULT/auth_strategy': value => $auth_strategy; } cinder_config { diff --git a/releasenotes/notes/configure-auth_strategy-f8005172e383ec94.yaml b/releasenotes/notes/configure-auth_strategy-f8005172e383ec94.yaml new file mode 100644 index 00000000..c2dfcbd0 --- /dev/null +++ b/releasenotes/notes/configure-auth_strategy-f8005172e383ec94.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - auth_strategy will now be configured in cinder.conf + with the value passed for cinder::api::auth_strategy diff --git a/spec/classes/cinder_api_spec.rb b/spec/classes/cinder_api_spec.rb index 9aac6a97..1e4fa3df 100644 --- a/spec/classes/cinder_api_spec.rb +++ b/spec/classes/cinder_api_spec.rb @@ -52,6 +52,9 @@ describe 'cinder::api' do is_expected.to contain_cinder_config('DEFAULT/os_region_name').with( :value => '' ) + is_expected.to contain_cinder_config('DEFAULT/auth_strategy').with( + :value => 'keystone' + ) is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_name').with_value('') is_expected.to contain_cinder_config('DEFAULT/os_privileged_user_password').with_value('') @@ -268,6 +271,17 @@ describe 'cinder::api' do )} end + describe 'with a custom auth_strategy' do + let :params do + req_params.merge({'auth_strategy' => 'noauth'}) + end + it 'should configure the auth_strategy to noauth' do + is_expected.to contain_cinder_config('DEFAULT/auth_strategy').with( + :value => 'noauth' + ) + end + end + describe 'with a custom osapi_max_limit' do let :params do req_params.merge({'osapi_max_limit' => '10000'})