<commit_before>{% set _service_nets = {} %}
{% for network in networks if network.enabled|default(true) %}
{%   if network.service_net_map_replace is defined %}
{%     set _ = _service_nets.update({network.service_net_map_replace:network.name_lower}) %}
{%   else %}
{%     set _ = _service_nets.update({network.name_lower:network.name_lower}) %}
{%   endif %}
{% endfor %}
heat_template_version: rocky

description: >
  Mapping of service_name_network -> network name

parameters:
  ServiceNetMap:
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
                 Note that the key in this map must match the service_name
                 in the service template, e.g if the service_name is heat_api
                 the key must be either heat_api_network, or optionally
                 HeatApiNetwork (which will be internally converted to
                 transform captalization to underscores).
    default: {}
    type: json

  # Note that the key in this map must match the service_name
  # see the description above about conversion from CamelCase to
  # snake_case - the names must still match when converted
  ServiceNetMapDefaults:
    default:
      # Note the values in this map are replaced by *NetName
      # to allow for sane defaults when the network names are
      # overridden.
      ApacheNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NeutronTenantNetwork: {{ _service_nets.get('tenant', 'ctlplane') }}
      AodhApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      BarbicanApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      GnocchiApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      MongodbNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      CinderApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      CinderIscsiNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
      GlanceApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      GlanceApiEdgeNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      IronicApiNetwork: ctlplane
      IronicNetwork: ctlplane
      IronicInspectorNetwork: ctlplane
      KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints
      KeystonePublicApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      ManilaApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NeutronApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      OctaviaApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      HeatApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      HeatApiCfnNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      HeatApiCloudwatchNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovaApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      PlacementNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovaMetadataNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovaVncProxyNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovaLibvirtNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovajoinNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      SwiftStorageNetwork: {{ _service_nets.get('storage_mgmt', 'ctlplane') }}
      SwiftProxyNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
      SaharaApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      HorizonNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      MemcachedNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      OsloMessagingRpcNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      OsloMessagingNotifyNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      RabbitmqNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      QdrNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      RedisNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      GaneshaNetwork: {{ _service_nets.get('storage_nfs', 'ctlplane') }}
      MysqlNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      SnmpdNetwork: ctlplane
      CephClusterNetwork: {{ _service_nets.get('storage_mgmt', 'ctlplane') }}
      CephDashboardNetwork: ctlplane
      CephGrafanaNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
      CephMonNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
      CephRgwNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
      PublicNetwork: {{ _service_nets.get('external', 'ctlplane') }}
      OpendaylightApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      OvnDbsNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      MistralApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      ZaqarApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      DockerRegistryNetwork: ctlplane
      PacemakerNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      PacemakerRemoteNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      DesignateApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      BINDNetwork: {{ _service_nets.get('external', 'ctlplane') }}
      EtcdNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      # HaproxyNetwork currently only controls the haproxy.stats network binding
      HaproxyNetwork: ctlplane
      # We special-case the default ResolveNetwork for the Ceph roles
      # for backwards compatibility, all other roles default to internal_api
{%- for role in roles if role.name.startswith('Ceph') %}
      {{role.name}}HostnameResolveNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
{%- endfor %}
{%- for role in roles if not role.name.startswith('Ceph') %}<commit_msg>Default to storage_dashboard, when set, for the CephDashboard service<commit_after>{% set _service_nets = {} %}
{% for network in networks if network.enabled|default(true) %}
{%   if network.service_net_map_replace is defined %}
{%     set _ = _service_nets.update({network.service_net_map_replace:network.name_lower}) %}
{%   else %}
{%     set _ = _service_nets.update({network.name_lower:network.name_lower}) %}
{%   endif %}
{% endfor %}
heat_template_version: rocky

description: >
  Mapping of service_name_network -> network name

parameters:
  ServiceNetMap:
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
                 Note that the key in this map must match the service_name
                 in the service template, e.g if the service_name is heat_api
                 the key must be either heat_api_network, or optionally
                 HeatApiNetwork (which will be internally converted to
                 transform captalization to underscores).
    default: {}
    type: json

  # Note that the key in this map must match the service_name
  # see the description above about conversion from CamelCase to
  # snake_case - the names must still match when converted
  ServiceNetMapDefaults:
    default:
      # Note the values in this map are replaced by *NetName
      # to allow for sane defaults when the network names are
      # overridden.
      ApacheNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NeutronTenantNetwork: {{ _service_nets.get('tenant', 'ctlplane') }}
      AodhApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      BarbicanApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      GnocchiApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      MongodbNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      CinderApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      CinderIscsiNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
      GlanceApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      GlanceApiEdgeNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      IronicApiNetwork: ctlplane
      IronicNetwork: ctlplane
      IronicInspectorNetwork: ctlplane
      KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints
      KeystonePublicApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      ManilaApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NeutronApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      OctaviaApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      HeatApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      HeatApiCfnNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      HeatApiCloudwatchNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovaApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      PlacementNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovaMetadataNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovaVncProxyNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovaLibvirtNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      NovajoinNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      SwiftStorageNetwork: {{ _service_nets.get('storage_mgmt', 'ctlplane') }}
      SwiftProxyNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
      SaharaApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      HorizonNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      MemcachedNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      OsloMessagingRpcNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      OsloMessagingNotifyNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      RabbitmqNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      QdrNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      RedisNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      GaneshaNetwork: {{ _service_nets.get('storage_nfs', 'ctlplane') }}
      MysqlNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      SnmpdNetwork: ctlplane
      CephClusterNetwork: {{ _service_nets.get('storage_mgmt', 'ctlplane') }}
      CephDashboardNetwork: {{ _service_nets.get('storage_dashboard', 'ctlplane') }}
      CephGrafanaNetwork: {{ _service_nets.get('storage_dashboard', 'ctlplane') }}
      CephMonNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
      CephRgwNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
      PublicNetwork: {{ _service_nets.get('external', 'ctlplane') }}
      OpendaylightApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      OvnDbsNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      MistralApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      ZaqarApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      DockerRegistryNetwork: ctlplane
      PacemakerNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      PacemakerRemoteNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      DesignateApiNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      BINDNetwork: {{ _service_nets.get('external', 'ctlplane') }}
      EtcdNetwork: {{ _service_nets.get('internal_api', 'ctlplane') }}
      # HaproxyNetwork currently only controls the haproxy.stats network binding
      HaproxyNetwork: ctlplane
      # We special-case the default ResolveNetwork for the Ceph roles
      # for backwards compatibility, all other roles default to internal_api
{%- for role in roles if role.name.startswith('Ceph') %}
      {{role.name}}HostnameResolveNetwork: {{ _service_nets.get('storage', 'ctlplane') }}
{%- endfor %}
{%- for role in roles if not role.name.startswith('Ceph') %}
{'fraction_non_alphanumeric': 0.13292297454666444, 'fraction_numerical': 0.0, 'mean_word_length': 4.3269827204253435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4099302', 'n_tokens_mistral': 3735, 'n_tokens_neox': 3559, 'n_words': 719}