Add an index tag on neutron network resources
When using the multiple nic-config templates in THT and in tripleo-ansible the ordering of networks in the network_data file matters. Add a a tag 'tripleo_net_idx' to neutron resources to keep track of the ordering. Depends-On: https://review.opendev.org/772795 Partial-Implements: blueprint network-data-v2-ports Change-Id: I0d39ea713ce1201b60f3def69f453792e402eb33
This commit is contained in:
parent
c488d97b55
commit
2d0125ed40
@ -178,6 +178,7 @@ resources:
|
|||||||
- {get_param: {{network.name}}NetValueSpecs}
|
- {get_param: {{network.name}}NetValueSpecs}
|
||||||
- {'mtu': {get_param: {{network.name}}Mtu}}
|
- {'mtu': {get_param: {{network.name}}Mtu}}
|
||||||
tags:
|
tags:
|
||||||
|
- tripleo_net_idx={{network.idx}}
|
||||||
- tripleo_vip={{network.vip|default(false)}}
|
- tripleo_vip={{network.vip|default(false)}}
|
||||||
{%- if network.service_net_map_replace|default('') %}
|
{%- if network.service_net_map_replace|default('') %}
|
||||||
- tripleo_service_net_map_replace={{network.service_net_map_replace}}
|
- tripleo_service_net_map_replace={{network.service_net_map_replace}}
|
||||||
|
@ -158,6 +158,11 @@ def process_templates(template_path, role_data_path, output_dir,
|
|||||||
if network_data is None:
|
if network_data is None:
|
||||||
network_data = []
|
network_data = []
|
||||||
|
|
||||||
|
# Set internal network index key for each network, network resources
|
||||||
|
# are created with a tag tripleo_net_idx
|
||||||
|
for idx, net in enumerate(network_data):
|
||||||
|
network_data[idx].update({'idx': idx})
|
||||||
|
|
||||||
j2_excludes = {}
|
j2_excludes = {}
|
||||||
j2_excludes_path = os.path.join(template_path, 'j2_excludes.yaml')
|
j2_excludes_path = os.path.join(template_path, 'j2_excludes.yaml')
|
||||||
if os.path.exists(j2_excludes_path):
|
if os.path.exists(j2_excludes_path):
|
||||||
|
Loading…
Reference in New Issue
Block a user