Browse Source

Merge "Allow overriding InterfaceDefaultRoute with ips_from_pool template" into stable/ussuri

tags/12.4.0
Zuul 3 weeks ago
committed by Gerrit Code Review
parent
commit
2dddaace5c
1 changed files with 23 additions and 4 deletions
  1. +23
    -4
      network/ports/port_from_pool.j2

+ 23
- 4
network/ports/port_from_pool.j2 View File

@@ -53,9 +53,24 @@ parameters:
default: 0
type: number
{{network.name}}NetCidr:
default: {{network.ip_subnet}}
{%- if network.ipv6 or ipv6_override %}
default: "{{network.ipv6_subnet|default(network.ip_subnet|default(""))}}"
{%- else %}
default: "{{network.ip_subnet|default("")}}"
{%- endif %}
description: Cidr for the {{network.name_lower}} network.
type: string
{{network.name}}InterfaceDefaultRoute:
default: ''
description: default route for the {{network.name_lower}} network
type: string

conditions:
{{network.name_lower}}_interface_default_route_set:
not:
equals:
- {get_param: {{network.name}}InterfaceDefaultRoute}
- ''

outputs:
ip_address:
@@ -86,9 +101,13 @@ outputs:
value: {{network.mtu|default('1500')}}
gateway_ip:
description: Gateway IP of the ports subnet
value:
if:
- {{network.name_lower}}_interface_default_route_set
- {get_param: {{network.name}}InterfaceDefaultRoute}
-
{%- if network.ipv6|default(false) and network.gateway_ipv6|default(false) %}
value: {{network.gateway_ipv6|default('')}}
{{network.gateway_ipv6|default('')}}
{%- else %}
value: {{network.gateway_ip|default('')}}
{{network.gateway_ip|default('')}}
{%- endif %}


Loading…
Cancel
Save