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 commitd29611f08a
) (cherry picked from commitdb15124518
) (cherry picked from commit9029fe04cc
) (cherry picked from commit82324318ca
)
This commit is contained in:
parent
c774dcb85e
commit
367ba177f6
|
@ -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*]
|
||||
|
@ -144,7 +144,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 {
|
||||
|
|
|
@ -109,6 +109,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…
Reference in New Issue