summaryrefslogtreecommitdiffstats
path: root/network/networks.j2.yaml
blob: 5aec597a8f4f2a3f37c8ed8091244ea476866092 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
heat_template_version: pike

description: Create networks to split out Overcloud traffic

resources:

  {%- for network in networks %}
    {%- if network.name != 'InternalApi' %}
  {{network.name}}Network:
    {%- else  %}
  InternalNetwork:
    {%- endif %}
    type: OS::TripleO::Network::{{network.name}}
  {%- endfor %}

  NetworkExtraConfig:
    type: OS::TripleO::Network::ExtraConfig


outputs:
  net_cidr_map:
    value:
      # NOTE(gfidente): we need to replace the null value with a
      # string to work around https://bugs.launchpad.net/heat/+bug/1700025
      {%- for network in networks %}
        {%- if network.name != 'InternalApi' %}
      {{network.name_lower}}:
        yaql:
          data: {get_attr: [{{network.name}}Network, subnet_cidr]}
          expression: str($.data).replace('null', 'disabled')
        {%- else  %}
      {{network.name_lower}}:
        yaql:
          data: {get_attr: [InternalNetwork, subnet_cidr]}
          expression: str($.data).replace('null', 'disabled')
        {%- endif %}
      {%- endfor %}