Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Fix network_cidrs when ManageNetworks: false" into stable/vict…
Browse files Browse the repository at this point in the history
…oria
  • Loading branch information
Zuul authored and openstack-gerrit committed Jun 1, 2021
2 parents e4845c3 + 4890946 commit c8c5fc1
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions network/network.j2
Original file line number Diff line number Diff line change
Expand Up @@ -277,27 +277,15 @@ outputs:
network_cidrs:
description: List of {{network.name}} network's subnets in CIDR notation.
value:
list_concat:
if:
- manage_networks
- - - {get_attr: [{{network.name}}Subnet, cidr]}
-
if:
- manage_networks
- - {get_attr: [{{network.name}}Subnet, cidr]}
{%- for subnet in network.subnets|default({}) if network.subnets[subnet].enabled|default(true) %}
- {get_attr: [{{network.name}}Subnet_{{subnet}}, cidr]}
- {get_attr: [{{network.name}}Subnet_{{subnet}}, cidr]}
{%- endfor %}
- -
{%- if network.ipv6 or ipv6_override %}
- {{network.ipv6_subnet|default(network.ip_subnet|default(""))}}
{%- else %}
- "{{network.ip_subnet|default("")}}"
{%- endif %}
-
- - {get_param: {{network.name}}NetCidr}
{%- for subnet in network.subnets|default({}) if network.subnets[subnet].enabled|default(true) %}
{%- if network.ipv6 or ipv6_override %}
- "{{network.subnets[subnet]['ipv6_subnet']|default(network.subnets[subnet]['ip_subnet']|default(""))}}"
{%- else %}
- "{{network.subnets[subnet]['ip_subnet']|default("")}}"
{%- endif %}
- {get_param: {{network.name}}SubnetCidr_{{subnet}}}
{%- endfor %}

network_attrs:
Expand Down

0 comments on commit c8c5fc1

Please sign in to comment.