diff options
author | Steven Hardy <shardy@redhat.com> | 2017-06-01 11:25:06 +0100 |
---|---|---|
committer | Steven Hardy <shardy@redhat.com> | 2017-07-05 17:30:17 +0100 |
commit | 566a40b148bbbb9bd9310b41a776deb39ab5e48a (patch) | |
tree | b63db196540ab7fe2589a62abe7fcbb9e1e070e9 /tools | |
parent | d61d11daba1c4d0189e225e227e94f0136dd7ec1 (diff) |
Modify generic role template to support custom networks
Render all per-network resources and interfaces via j2 to enable
future support for custom networks via network_data.yaml
Note this doesn't enable custom networks for the built-in roles
as we skip j2 rendering for them, this will be resolved by converting
them to use the generic role template instead of the hard-coded
ones listed in the j2_excludes.yaml.
Depends-On: I18fa3829ff38ac200550d8e36bbe334c0005da22
Change-Id: I49565f9389f3ec9aef4861e23a3bed64a85501e6
Partially-Implements: blueprint composable-networks
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/process-templates.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/process-templates.py b/tools/process-templates.py index c7d5ed9e..badc1426 100755 --- a/tools/process-templates.py +++ b/tools/process-templates.py @@ -146,13 +146,15 @@ def process_templates(template_path, role_data_path, output_dir, out_f_path = os.path.join(out_dir, out_f) if not (out_f_path in excl_templates): if '{{role.name}}' in template_data: - j2_data = {'role': r_map[role]} + j2_data = {'role': r_map[role], + 'networks': network_data} _j2_render_to_file(template_data, j2_data, out_f_path, overwrite) else: # Backwards compatibility with templates # that specify {{role}} vs {{role.name}} - j2_data = {'role': role} + j2_data = {'role': role, + 'networks': network_data} # (dprince) For the undercloud installer we # don'twant to have heat check nova/glance # API's |