diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-01-24 22:47:52 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-01-28 18:59:18 +0100 |
commit | 9cd019d3af46e492b374534d2b5b9bfd6528688e (patch) | |
tree | 9e4ac9f5759758afa5069f38ff52973b2db1ec1f /config/installers | |
parent | f666a4aaaefb41c93c2ccc36987b3f2dabb0e7d2 (diff) |
[daisy] network template: Fix set inside loop
Previous implementation fails in older versions of py-jinja2.
See related bug reports [1, 2].
Since `networks.update` on its own is enough, stop assigning its
result back to 'networks'.
[1] https://github.com/pallets/jinja/issues/641
[2] https://github.com/pallets/jinja/issues/164
Change-Id: I303388223bdec9ae43e49d988aee41b5b47c1562
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'config/installers')
-rw-r--r-- | config/installers/daisy/network.yaml.j2 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/installers/daisy/network.yaml.j2 b/config/installers/daisy/network.yaml.j2 index 1fad1ac8..f976ab73 100644 --- a/config/installers/daisy/network.yaml.j2 +++ b/config/installers/daisy/network.yaml.j2 @@ -72,7 +72,8 @@ networks: {%- set gateway = ".".join([ips[0], ips[1], ips[2], "1"]) -%} {%- endif -%} - {%- set networks = networks.update({key: {'interface_name': interface_name, + {#- 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, |