Neutron L3 service cleanups for hiera json hook

This patch resolves a few issues I noticed when porting our
Neutron L3 service to support the new heat hiera agent hook (which
uses Json instead of Yaml).

 - If NeutronExternalNetworkBridge is an emptry string '' Json was
   dropping the single quotes thus causing the bridge to get set
   incorrectly in the config file. To correct this we use a heat
   conditional to avoid setting the external bridge (the '' default
   is what we want in this case) if the bridge is an empty string.

Change-Id: I5037cbde6b76a37a4c22c4616278420e9d759109
Partial-bug: #1596373
This commit is contained in:
Dan Prince 2016-11-03 07:53:46 -04:00
parent 2ad72b7e96
commit 36aa652247
1 changed files with 15 additions and 7 deletions

View File

@ -1,4 +1,4 @@
heat_template_version: 2016-04-08
heat_template_version: 2016-10-14
description: >
OpenStack Neutron L3 agent configured with Puppet
@ -43,6 +43,10 @@ parameters:
tag: openstack.neutron.agent.l3
path: /var/log/neutron/l3-agent.log
conditions:
external_network_bridge_empty: {equals : [{get_param: NeutronExternalNetworkBridge}, "''"]}
resources:
NeutronBase:
@ -63,12 +67,16 @@ outputs:
- neutron
config_settings:
map_merge:
- get_attr: [NeutronBase, role_data, config_settings]
- get_attr: [NeutronBase, role_data, config_settings]
- neutron::agents::l3::router_delete_namespaces: True
neutron::agents::l3::agent_mode: {get_param: NeutronL3AgentMode}
tripleo.neutron_l3.firewall_rules:
'106 neutron_l3 vrrp':
proto: vrrp
-
if:
- external_network_bridge_empty
- {}
- neutron::agents::l3::external_network_bridge: {get_param: NeutronExternalNetworkBridge}
neutron::agents::l3::router_delete_namespaces: True
neutron::agents::l3::agent_mode : {get_param: NeutronL3AgentMode}
tripleo.neutron_l3.firewall_rules:
'106 neutron_l3 vrrp':
proto: vrrp
step_config: |
include tripleo::profile::base::neutron::l3