Browse Source

Merge "Allow list values for enabled_extensions_admin/v2"

changes/72/802272/1 19.1.0
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
f11b16f35a
  1. 4
      manifests/api.pp
  2. 18
      spec/classes/designate_api_spec.rb

4
manifests/api.pp

@ -146,8 +146,8 @@ class designate::api (
'service:api/default_limit_v2' : value => $default_limit_v2;
'service:api/max_limit_v2' : value => $max_limit_v2;
'service:api/pecan_debug' : value => $pecan_debug;
'service:api/enabled_extensions_v2' : value => $enabled_extensions_v2;
'service:api/enabled_extensions_admin' : value => $enabled_extensions_admin;
'service:api/enabled_extensions_v2' : value => join(any2array($enabled_extensions_v2), ',');
'service:api/enabled_extensions_admin' : value => join(any2array($enabled_extensions_admin), ',');
}
if $auth_strategy == 'keystone' {

18
spec/classes/designate_api_spec.rb

@ -72,8 +72,8 @@ describe 'designate::api' do
:default_limit_v2 => '25',
:max_limit_v2 => '1500',
:pecan_debug => true,
:enabled_extensions_v2 => 'experimental',
:enabled_extensions_admin => 'reports,quotas,counts,tenants,target_sync',
:enabled_extensions_v2 => 'ext1,ext2',
:enabled_extensions_admin => 'reports,quotas,zones',
:enable_proxy_headers_parsing => true,
})
end
@ -101,6 +101,20 @@ describe 'designate::api' do
end
end
context 'with enabled_extentions in list' do
before do
params.merge!({
:enabled_extensions_v2 => ['ext1', 'ext2'],
:enabled_extensions_admin => ['reports', 'quotas', 'zones']
})
end
it 'configure service_api' do
is_expected.to contain_designate_config('service:api/enabled_extensions_v2').with_value('ext1,ext2')
is_expected.to contain_designate_config('service:api/enabled_extensions_admin').with_value('reports,quotas,zones')
end
end
context 'with custom package name' do
before do
params.merge!({ :api_package_name => 'designate-api-custom-name' })

Loading…
Cancel
Save