Get rid of deprecated is_array method
... and update the logic to handle neutron::service_plugins to follow existing implementations to handle ListOpt. The updated logic allows using a flat string which is useful when only one item is used. Also, it is enforced the actual parameter is removed from conf file when the puppet parameter is set to $::os_service_default. Closes-Bug: #1939088 Change-Id: I0921a1d7012a76b9e6523715ea569f2476426d6a
This commit is contained in:
parent
07e1fc93ad
commit
a60669b6e4
@ -478,12 +478,8 @@ will be removed in a future release.')
|
||||
transport_url => $notification_transport_url,
|
||||
}
|
||||
|
||||
if ! is_service_default ($service_plugins) and ($service_plugins) {
|
||||
if is_array($service_plugins) {
|
||||
neutron_config { 'DEFAULT/service_plugins': value => join($service_plugins, ',') }
|
||||
} else {
|
||||
fail('service_plugins should be an array.')
|
||||
}
|
||||
neutron_config {
|
||||
'DEFAULT/service_plugins': value => join(any2array($service_plugins), ',')
|
||||
}
|
||||
|
||||
oslo::messaging::rabbit {'neutron_config':
|
||||
|
@ -321,7 +321,9 @@ describe 'neutron' do
|
||||
end
|
||||
|
||||
shared_examples 'without service_plugins' do
|
||||
it { should_not contain_neutron_config('DEFAULT/service_plugins') }
|
||||
it do
|
||||
should contain_neutron_config('DEFAULT/service_plugins').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples 'with service_plugins' do
|
||||
@ -334,7 +336,6 @@ describe 'neutron' do
|
||||
it do
|
||||
should contain_neutron_config('DEFAULT/service_plugins').with_value('router,firewall,vpnaas,metering,qos')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
shared_examples 'with global_physnet_mtu defined' do
|
||||
|
Loading…
Reference in New Issue
Block a user