diff --git a/manifests/api.pp b/manifests/api.pp index b4e57d10..0094045a 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -50,6 +50,7 @@ class glance::api( $auth_host = '127.0.0.1', $auth_port = '35357', $auth_protocol = 'http', + $pipeline = 'keystone+cachemanagement', $keystone_tenant = 'admin', $keystone_user = 'admin', $enabled = true, @@ -136,7 +137,7 @@ class glance::api( # keystone config if $auth_type == 'keystone' { glance_api_config { - 'paste_deploy/flavor': value => 'keystone+cachemanagement'; + 'paste_deploy/flavor': value => $pipeline; 'keystone_authtoken/admin_tenant_name': value => $keystone_tenant; 'keystone_authtoken/admin_user': value => $keystone_user; 'keystone_authtoken/admin_password': value => $keystone_password; diff --git a/spec/classes/glance_api_spec.rb b/spec/classes/glance_api_spec.rb index 960929a4..88f30de4 100644 --- a/spec/classes/glance_api_spec.rb +++ b/spec/classes/glance_api_spec.rb @@ -129,4 +129,16 @@ describe 'glance::api' do end end end + + describe 'with overridden pipeline' do + let :params do + { + :keystone_password => 'ChangeMe', + :pipeline => 'keystone', + } + end + + it { should contain_glance_api_config('paste_deploy/flavor').with_value('keystone') } + end + end