Comment 2 for bug 1946239

Revision history for this message
Rabi Mishra (rabi) wrote :

Network names are always fixed. Not sure what's the issue you've.

If you've network data as below

...

- name: InternalApi
  vip: true
  name_lower: internal_api_cloud_0
  service_net_map_replace: internal_api
  subnets:
    internal_api_cloud_0_subnet:
      ip_subnet: '172.16.13.0/24'
      allocation_pools: [{'start': '172.16.13.4', 'end': '172.16.13.250'}]
      vlan: 13

...

Then

  {%- if 'InternalApi' in role.networks %}
    {{role.name}}HostnameResolveNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
    {{role.name}}MetricsQdrNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
  {%- else %}
    {{role.name}}HostnameResolveNetwork: ctlplane
    {{role.name}}MetricsQdrNetwork: ctlplane
  {%- endif %}

would return

{{role.name}}HostnameResolveNetwork: internal_api_cloud_0
{{role.name}}MetricsQdrNetwork: internal_api_cloud_0