From: Alexandru Avadanii Date: Fri, 2 Mar 2018 19:11:47 +0000 (+0100) Subject: config/installers: Adopt j2 'do' extension X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F15%2F53015%2F2;p=pharos.git config/installers: Adopt j2 'do' extension Change-Id: Iffc473a4c90ff4ee8cfbcc304a3462559199fbe0 Signed-off-by: Alexandru Avadanii --- diff --git a/config/installers/daisy/network.yaml.j2 b/config/installers/daisy/network.yaml.j2 index f976ab73..b9f586dc 100644 --- a/config/installers/daisy/network.yaml.j2 +++ b/config/installers/daisy/network.yaml.j2 @@ -72,18 +72,17 @@ networks: {%- set gateway = ".".join([ips[0], ips[1], ips[2], "1"]) -%} {%- endif -%} - {#- set v=v.update(...) is unpredictable and breaks in older j2 -#} - {%- set _ = networks.update({key: {'interface_name': interface_name, - 'bus_addr': bus_addr, - 'vlan': vlan, - 'network': network, - 'mask': mask, - 'start': start, - 'end': end, - 'vip': vip, - 'gateway': gateway - } - }) %} + {%- do networks.update({key: {'interface_name': interface_name, + 'bus_addr': bus_addr, + 'vlan': vlan, + 'network': network, + 'mask': mask, + 'start': start, + 'end': end, + 'vip': vip, + 'gateway': gateway + } + }) %} - cidr: '{{ network }}/{{ mask }}' gateway: '{{ gateway }}' diff --git a/config/installers/fuel/net_map.j2 b/config/installers/fuel/net_map.j2 index c3ff6cb7..880df20f 100644 --- a/config/installers/fuel/net_map.j2 +++ b/config/installers/fuel/net_map.j2 @@ -36,7 +36,7 @@ {#- Physical interface OS name for each network (e.g. em1, enp1s0f1) #} {%- for role in [ctl01, cmp001] %} {%- set node = conf.idf.fuel.network.node[role.idx] %} - {%- set _ = role.update({ + {%- do role.update({ 'nic_mcp': node.interfaces[idx_mcp], 'nic_admin': node.interfaces[idx_admin], 'nic_mgmt': node.interfaces[idx_mgmt],