From d088cf66be456ce3e0b58c6b866f387f2ac4cc78 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 18 Dec 2019 20:34:19 -0600 Subject: [PATCH] Correct invalid jinja set This change corrects an issue with the jinja expression at the top of the file which is resulting in a stacktrace when the set attempts to update an object of the same name, which results in a none type. This change also updates the jinja expression at the top of the file making it more legible. Change-Id: Ia3334c5d8a20bb3c0bc721a266a09b6c01fe7c4d Closes-Bug: #1856918 Signed-off-by: Kevin Carter --- network/service_net_map.j2.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/network/service_net_map.j2.yaml b/network/service_net_map.j2.yaml index fdbe37b24f..af1ee70eac 100644 --- a/network/service_net_map.j2.yaml +++ b/network/service_net_map.j2.yaml @@ -1,12 +1,11 @@ -{%- set _service_nets = {} -%} -{%- for network in networks if network.enabled|default(true) -%} - {%- if network.service_net_map_replace is defined -%} - {%- set _service_nets = _service_nets.update({network.service_net_map_replace:network.name_lower}) -%} - {%- else -%} - {%- set _service_nets = _service_nets.update({network.name_lower:network.name_lower}) -%} - {%- endif -%} -{%- endfor -%} - +{% set _service_nets = {} %} +{% for network in networks if network.enabled|default(true) %} +{% if network.service_net_map_replace is defined %} +{% set _ = _service_nets.update({network.service_net_map_replace:network.name_lower}) %} +{% else %} +{% set _ = _service_nets.update({network.name_lower:network.name_lower}) %} +{% endif %} +{% endfor %} heat_template_version: rocky description: >