Browse Source

Merge "Handle any network name in ServiceNetMap" into stable/queens

changes/00/697600/1
Zuul Gerrit Code Review 2 months ago
parent
commit
57b3fac534
2 changed files with 9 additions and 22 deletions
  1. +5
    -22
      network/service_net_map.j2.yaml
  2. +4
    -0
      releasenotes/notes/handle-any-network-name-in-ServiceNetMap-efffd0583bab827f.yaml

+ 5
- 22
network/service_net_map.j2.yaml View File

@@ -1,22 +1,9 @@
{%- set _service_nets = {} -%}
{%- for network in networks if network.enabled|default(true) -%}
{%- if network.name == 'InternalApi' -%}
{%- set _service_nets = _service_nets.update({'internal_api': 'internal_api'}) -%}
{%- endif -%}
{%- if network.name == 'External' -%}
{%- set _service_nets = _service_nets.update({'external': 'external'}) -%}
{%- endif -%}
{%- if network.name == 'Tenant' -%}
{%- set _service_nets = _service_nets.update({'tenant': 'tenant'}) -%}
{%- endif -%}
{%- if network.name == 'Storage' -%}
{%- set _service_nets = _service_nets.update({'storage': 'storage'}) -%}
{%- endif -%}
{%- if network.name == 'StorageMgmt' -%}
{%- set _service_nets = _service_nets.update({'storage_mgmt': 'storage_mgmt'}) -%}
{%- endif -%}
{%- if network.name == 'StorageNFS' -%}
{%- set _service_nets = _service_nets.update({'storage_nfs': 'storage_nfs'}) -%}
{%- if network.service_net_map_replace is defined -%}
{%- set _service_nets = _service_nets.update({network.service_net_map_replace:network.name_lower}) -%}
{%- else -%}
{%- set _service_nets = _service_nets.update({network.name_lower:network.name_lower}) -%}
{%- endif -%}
{%- endfor -%}
heat_template_version: queens
@@ -148,12 +135,8 @@ resources:
- map_replace:
- {get_param: ServiceNetMapDefaults}
- values:
{%- for network in networks %}
{%- if network.service_net_map_replace is defined %}
{{network.service_net_map_replace}}: {{network.name_lower}}
{%- else %}
{%- for network in networks if network.enabled|default(true) %}
{{network.name_lower}}: {get_param: {{network.name}}NetName}
{%- endif %}
{%- endfor %}
- map_replace:
- {get_param: ServiceNetMap}


+ 4
- 0
releasenotes/notes/handle-any-network-name-in-ServiceNetMap-efffd0583bab827f.yaml View File

@@ -0,0 +1,4 @@
---
fixes:
- ServiceNetMap now handles any network name when computing the default
network for each service in ServiceNetMapDefaults.

Loading…
Cancel
Save