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.
Change-Id: I0650085d2aa2c3492b175c565976705c977fd806
(cherry picked from commit d29611f08a
)
This commit is contained in:
parent
c270b94996
commit
db15124518
|
@ -80,7 +80,7 @@
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*extensions*]
|
# [*extensions*]
|
||||||
# (optional) L3 agent extensions to enable.
|
# (optional) List of the L3 agent extensions to enable.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*radvd_user*]
|
# [*radvd_user*]
|
||||||
|
@ -161,7 +161,7 @@ class neutron::agents::l3 (
|
||||||
'DEFAULT/radvd_user': value => $radvd_user;
|
'DEFAULT/radvd_user': value => $radvd_user;
|
||||||
'ovs/integration_bridge': value => $ovs_integration_bridge;
|
'ovs/integration_bridge': value => $ovs_integration_bridge;
|
||||||
'agent/availability_zone': value => $availability_zone;
|
'agent/availability_zone': value => $availability_zone;
|
||||||
'agent/extensions': value => $extensions;
|
'agent/extensions': value => join(any2array($extensions), ',');
|
||||||
}
|
}
|
||||||
|
|
||||||
if $::neutron::params::l3_agent_package {
|
if $::neutron::params::l3_agent_package {
|
||||||
|
|
|
@ -129,6 +129,26 @@ describe 'neutron::agents::l3' do
|
||||||
should contain_neutron_l3_agent_config('agent/availability_zone').with_value(p[:availability_zone])
|
should contain_neutron_l3_agent_config('agent/availability_zone').with_value(p[:availability_zone])
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
shared_examples 'neutron::agents::l3 on Debian' do
|
shared_examples 'neutron::agents::l3 on Debian' do
|
||||||
|
|
Loading…
Reference in New Issue