Allow customizing separator for api-paste.ini

The api-paste.ini accepts not only "=" but also ":" and some services
like Barbican have been using ":" for their default api-paste.ini
files.

[composite:main]
use = egg:Paste#urlmap
/: barbican_version
/v1: barbican-api-keystone

This change allows users to use ":" so that they can update the ini
files with keeping it consistent with the default fules

Depends-on: https://review.opendev.org/813614
Change-Id: I6d516813cc6aac6012bd598bab73672d7a62c41d
This commit is contained in:
Takashi Kajinami 2021-10-11 08:32:30 +09:00
parent e983630199
commit c94b67a6d1
3 changed files with 16 additions and 8 deletions

View File

@ -62,6 +62,11 @@ Puppet::Type.newtype(:barbican_api_paste_ini) do
defaultto('<SERVICE DEFAULT>')
end
newparam(:key_val_separator) do
desc 'The separator string to use between each setting name and value.'
defaultto('=')
end
autorequire(:anchor) do
['barbican::install::end']
end

View File

@ -417,15 +417,13 @@ class barbican::api (
# keystone config
if $auth_strategy == 'keystone' {
include barbican::keystone::authtoken
barbican_api_paste_ini {
'composite:main//v1': value => 'barbican-api-keystone', key_val_separator => ':';
}
} else {
# TODO(tkajinam): We need to fix the barbican_api_paste_ini provider to
# support the following configuration.
#
# [composite:main]
# ...
# /v1: barbican_api
#
warning('The pipeline definiton should be updated manually when keystone is not used')
barbican_api_paste_ini {
'composite:main//v1': value => 'barbican_api', key_val_separator => ':';
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``key_val_separator`` attribute has been added to
the ``barbican_api_paste_ini`` resource type.