Browse Source

Fix L3 agent's extensions list

L3 agent's extensions list should be passed as an array
to the neutron::agents::l3 class and then it should be converted
to the comma separated string in the L3 agent's config.
This patch changes expected type of the variable and
adds that such conversion from an array to string.

Conflicts:
	manifests/agents/l3.pp

Change-Id: I0650085d2aa2c3492b175c565976705c977fd806
(cherry picked from commit d29611f08a)
(cherry picked from commit db15124518)
(cherry picked from commit 9029fe04cc)
changes/93/786993/2
Slawek Kaplonski 3 months ago
committed by Takashi Kajinami
parent
commit
82324318ca
  1. 4
      manifests/agents/l3.pp
  2. 20
      spec/classes/neutron_agents_l3_spec.rb

4
manifests/agents/l3.pp

@ -84,7 +84,7 @@
# Defaults to $::os_service_default
#
# [*extensions*]
# (optional) L3 agent extensions to enable.
# (optional) List of the L3 agent extensions to enable.
# Defaults to $::os_service_default
#
# [*radvd_user*]
@ -145,7 +145,7 @@ class neutron::agents::l3 (
'DEFAULT/agent_mode': value => $agent_mode;
'DEFAULT/radvd_user': value => $radvd_user;
'agent/availability_zone': value => $availability_zone;
'agent/extensions': value => $extensions;
'agent/extensions': value => join(any2array($extensions), ',');
}
if $::neutron::params::l3_agent_package {

20
spec/classes/neutron_agents_l3_spec.rb

@ -120,6 +120,26 @@ describe 'neutron::agents::l3' do
should contain_neutron_l3_agent_config('agent/availability_zone').with_value(p[:availability_zone])
end
end
context 'with extensions in string' do
before :each do
params.merge!(:extensions => 'fip_qos,gateway_ip_qos,port_forwarding')
end
it 'configures extentions' do
should contain_neutron_l3_agent_config('agent/extensions').with_value('fip_qos,gateway_ip_qos,port_forwarding')
end
end
context 'with extensions in array' do
before :each do
params.merge!(:extensions => ['fip_qos', 'gateway_ip_qos', 'port_forwarding'])
end
it 'configures extentions' do
should contain_neutron_l3_agent_config('agent/extensions').with_value('fip_qos,gateway_ip_qos,port_forwarding')
end
end
end
shared_examples 'neutron::agents::l3 on Debian' do

Loading…
Cancel
Save