diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-03-02 20:11:47 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-03-03 18:42:14 +0100 |
commit | 069a9cf4e79b1376ada39764f310dbb37c01d7e7 (patch) | |
tree | 52b895768f9b9de78f1678d985a136b92d6b64fe /config | |
parent | 31435de5085f1a5bb9cf965cdbce005fc04781d1 (diff) |
config/installers: Adopt j2 'do' extension
Change-Id: Iffc473a4c90ff4ee8cfbcc304a3462559199fbe0
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'config')
-rw-r--r-- | config/installers/daisy/network.yaml.j2 | 23 | ||||
-rw-r--r-- | config/installers/fuel/net_map.j2 | 2 |
2 files changed, 12 insertions, 13 deletions
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], |