Update FWaaS configuration for Ocata

These changes are required to configure neutron fwaas in Ocata:

- Allow to configure extensions in neutron l3 agent.
- Allow to configure agent_version in fwaas sections.
- Configure fwaas section in neutron.conf too.

Depends-On: I3f23ac667aee8a4603e866febbfddca2eb299e9b
Change-Id: I780277b7bbf9e14099d0d574c63e31c97a6aa38d
This commit is contained in:
Emilien Macchi 2016-11-22 14:15:30 -05:00
parent eaf639fbc9
commit 67338fe849
4 changed files with 28 additions and 2 deletions

View File

@ -88,6 +88,10 @@
# Neutron will only schedule routers on the agent based on availability zone
# Defaults to $::os_service_default
#
# [*extensions*]
# (optional) L3 agent extensions to enable.
# Defaults to $::os_service_default
#
# === Deprecated Parameters
#
# [*external_network_bridge*]
@ -114,6 +118,7 @@ class neutron::agents::l3 (
$agent_mode = 'legacy',
$purge_config = false,
$availability_zone = $::os_service_default,
$extensions = $::os_service_default,
# DEPRECATED PARAMETERS
$external_network_bridge = $::os_service_default,
) {
@ -150,6 +155,7 @@ class neutron::agents::l3 (
'DEFAULT/enable_metadata_proxy': value => $enable_metadata_proxy;
'DEFAULT/agent_mode': value => $agent_mode;
'AGENT/availability_zone': value => $availability_zone;
'AGENT/extensions': value => $extensions;
}
if $::neutron::params::l3_agent_package {

View File

@ -30,6 +30,10 @@
# (optional) FWaaS Driver to use
# Defaults to $::os_service_default
#
# [*agent_version*]
# (optional) Version of FWaaS API.
# Defaults to $::os_service_default
#
# [*vpnaas_agent_package*]
# (optional) Use VPNaaS agent package instead of L3 agent package on debian platforms
# RedHat platforms won't take care of this parameter
@ -45,6 +49,7 @@
class neutron::services::fwaas (
$enabled = $::os_service_default,
$driver = $::os_service_default,
$agent_version = $::os_service_default,
$vpnaas_agent_package = false,
$purge_config = false,
) {
@ -80,8 +85,15 @@ class neutron::services::fwaas (
purge => $purge_config,
}
neutron_config {
'fwaas/enabled': value => $enabled;
'fwaas/driver': value => $driver;
'fwaas/agent_version': value => $agent_version;
}
neutron_fwaas_service_config {
'fwaas/enabled': value => $enabled;
'fwaas/driver': value => $driver;
'fwaas/enabled': value => $enabled;
'fwaas/driver': value => $driver;
'fwaas/agent_version': value => $agent_version;
}
}

View File

@ -47,6 +47,7 @@ describe 'neutron::agents::l3' do
is_expected.to contain_neutron_l3_agent_config('DEFAULT/periodic_fuzzy_delay').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('DEFAULT/enable_metadata_proxy').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('AGENT/availability_zone').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_l3_agent_config('AGENT/extensions').with_value('<SERVICE DEFAULT>')
end
it 'passes purge to resource' do

View File

@ -55,6 +55,13 @@ describe 'neutron::services::fwaas' do
it 'configures driver in fwaas_driver.ini' do
is_expected.to contain_neutron_fwaas_service_config('fwaas/driver').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_fwaas_service_config('fwaas/enabled').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_fwaas_service_config('fwaas/agent_version').with_value('<SERVICE DEFAULT>')
end
it 'configures driver in neutron.conf' do
is_expected.to contain_neutron_config('fwaas/driver').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('fwaas/enabled').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('fwaas/agent_version').with_value('<SERVICE DEFAULT>')
end
end