Remove api-paste configuration

api-paste has been moved under the python code and does not
need to be configured in etc. Remove this configuration and
provider and type files. Now on just setting the auth mode
should handle everything automatically.

Change-Id: I96c93dc124d5b87465d2dde6b27a896266f71eb4
This commit is contained in:
Pradeep Kilambi 2017-01-20 14:50:23 -05:00
parent 765ff3ff2c
commit e7dc746107
5 changed files with 4 additions and 46 deletions

View File

@ -129,13 +129,5 @@ standalone service, or httpd for being run by a httpd server")
if $auth_strategy == 'keystone' {
include ::gnocchi::keystone::authtoken
gnocchi_api_paste_ini {
'pipeline:main/pipeline': value => 'gnocchi+auth',
}
} else {
gnocchi_api_paste_ini {
'pipeline:main/pipeline': value => 'gnocchi+noauth',
}
}
}

View File

@ -17,22 +17,16 @@
# DEFAULT/bar:
# value: barValue
#
# [*gnocchi_api_paste_ini*]
# (optional) Allow configuration of /etc/gnocchi/api-paste.ini options.
#
# NOTE: The configuration MUST NOT be already handled by this module
# or Puppet catalog compilation will fail with duplicate resources.
#
class gnocchi::config (
$gnocchi_config = {},
$gnocchi_api_paste_ini = {},
) {
include ::gnocchi::deps
validate_hash($gnocchi_config)
validate_hash($gnocchi_api_paste_ini)
create_resources('gnocchi_config', $gnocchi_config)
create_resources('gnocchi_api_paste_ini', $gnocchi_api_paste_ini)
}

View File

@ -0,0 +1,4 @@
---
deprecations:
- Remove api-paste configuration as its now moved into the
python code. There is no need to explicitly configure it.

View File

@ -132,28 +132,6 @@ describe 'gnocchi::api' do
it_raises 'a Puppet::Error', /Invalid service_name/
end
context "with noauth" do
before do
params.merge!({
:auth_strategy => 'noauth',
})
end
it 'configures pipeline' do
is_expected.to contain_gnocchi_api_paste_ini('pipeline:main/pipeline').with_value('gnocchi+noauth');
end
end
context "with keystone" do
before do
params.merge!({
:auth_strategy => 'keystone',
})
end
it 'configures pipeline' do
is_expected.to contain_gnocchi_api_paste_ini('pipeline:main/pipeline').with_value('gnocchi+auth');
end
end
context 'with enable_proxy_headers_parsing' do
before do
params.merge!({:enable_proxy_headers_parsing => true })

View File

@ -8,11 +8,6 @@ describe 'gnocchi::config' do
'DEFAULT/bar' => { 'value' => 'barValue' },
'DEFAULT/baz' => { 'ensure' => 'absent' }
},
:gnocchi_api_paste_ini => {
'DEFAULT/foo2' => { 'value' => 'fooValue' },
'DEFAULT/bar2' => { 'value' => 'barValue' },
'DEFAULT/baz2' => { 'ensure' => 'absent' }
}
}
end
@ -23,11 +18,6 @@ describe 'gnocchi::config' do
is_expected.to contain_gnocchi_config('DEFAULT/baz').with_ensure('absent')
end
it 'configures arbitrary gnocchi-api-paste configurations' do
is_expected.to contain_gnocchi_api_paste_ini('DEFAULT/foo2').with_value('fooValue')
is_expected.to contain_gnocchi_api_paste_ini('DEFAULT/bar2').with_value('barValue')
is_expected.to contain_gnocchi_api_paste_ini('DEFAULT/baz2').with_ensure('absent')
end
end
on_supported_os({