Don't assume every role has default_route_networks
This broken after new jinja release. Closes-Bug: #1928145 Change-Id: I9cbdcf289bae96f8ea7867e1cec365a9a07019ca
This commit is contained in:
parent
2732d826c8
commit
4af0c6ccac
@ -979,7 +979,7 @@ resources:
|
|||||||
{{network.name_lower}}_host_routes:
|
{{network.name_lower}}_host_routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, host_routes]}
|
- {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, host_routes]}
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if role.default_route_networks is defined and network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, gateway_ip]}
|
next_hop: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, gateway_ip]}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
@ -1019,7 +1019,7 @@ resources:
|
|||||||
service_metadata_settings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
|
service_metadata_settings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
|
||||||
tripleo_network_config_template: {get_param: {{role.name}}NetworkConfigTemplate}
|
tripleo_network_config_template: {get_param: {{role.name}}NetworkConfigTemplate}
|
||||||
tripleo_network_config_with_ansible: {get_param: NetworkConfigWithAnsible}
|
tripleo_network_config_with_ansible: {get_param: NetworkConfigWithAnsible}
|
||||||
default_route_networks: {{role.default_route_networks}}
|
default_route_networks: {{role.default_route_networks|default(['ControlPlane'])}}
|
||||||
networks_skip_config: {{ role.networks_skip_config|default([]) }}
|
networks_skip_config: {{ role.networks_skip_config|default([]) }}
|
||||||
role_tags: {{role.tags}}
|
role_tags: {{role.tags}}
|
||||||
|
|
||||||
@ -1052,7 +1052,7 @@ resources:
|
|||||||
{{network.name}}InterfaceRoutes:
|
{{network.name}}InterfaceRoutes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, host_routes]}
|
- {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, host_routes]}
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if role.default_route_networks is defined and network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, gateway_ip]}
|
next_hop: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, gateway_ip]}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
@ -1064,7 +1064,7 @@ resources:
|
|||||||
not $.data.where($.startsWith('tripleo_vlan_id')).len() => 1,
|
not $.data.where($.startsWith('tripleo_vlan_id')).len() => 1,
|
||||||
true => int($.data.where($.startsWith('tripleo_vlan_id')).first().split('=').last()))
|
true => int($.data.where($.startsWith('tripleo_vlan_id')).first().split('=').last()))
|
||||||
data: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, tags]}
|
data: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, tags]}
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if role.default_route_networks is defined and network.name in role.default_route_networks %}
|
||||||
{{network.name}}InterfaceDefaultRoute: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, gateway_ip]}
|
{{network.name}}InterfaceDefaultRoute: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, gateway_ip]}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user