Composable Mistral services
[apex-tripleo-heat-templates.git] / network / service_net_map.j2.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   Mapping of service_name_network -> network name
5
6 parameters:
7   ServiceNetMap:
8     description: Mapping of service_name -> network name. Typically set
9                  via parameter_defaults in the resource registry.  This
10                  mapping overrides those in ServiceNetMapDefaults.
11                  Note that the key in this map must match the service_name
12                  in the service template, e.g if the service_name is heat_api
13                  the key must be either heat_api_network, or optionally
14                  HeatApiNetwork (which will be internally converted to
15                  transform captalization to underscores).
16     default: {}
17     type: json
18
19   # Note that the key in this map must match the service_name
20   # see the description above about conversion from CamelCase to
21   # snake_case - the names must still match when converted
22   ServiceNetMapDefaults:
23     default:
24       ApacheNetwork: internal_api
25       NeutronTenantNetwork: tenant
26       CeilometerApiNetwork: internal_api
27       AodhApiNetwork: internal_api
28       GnocchiApiNetwork: internal_api
29       MongodbNetwork: internal_api
30       CinderApiNetwork: internal_api
31       CinderIscsiNetwork: storage
32       GlanceApiNetwork: storage
33       GlanceRegistryNetwork: internal_api
34       IronicApiNetwork: ctlplane
35       IronicNetwork: ctlplane
36       KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints
37       KeystonePublicApiNetwork: internal_api
38       ManilaApiNetwork: internal_api
39       NeutronApiNetwork: internal_api
40       HeatApiNetwork: internal_api
41       HeatApiCfnNetwork: internal_api
42       HeatApiCloudwatchNetwork: internal_api
43       NovaApiNetwork: internal_api
44       NovaMetadataNetwork: internal_api
45       NovaVncProxyNetwork: internal_api
46       SwiftStorageNetwork: storage_mgmt
47       SwiftProxyNetwork: storage
48       SaharaApiNetwork: internal_api
49       HorizonNetwork: internal_api
50       MemcachedNetwork: internal_api
51       RabbitmqNetwork: internal_api
52       RedisNetwork: internal_api
53       MysqlNetwork: internal_api
54       CephClusterNetwork: storage_mgmt
55       CephMonNetwork: storage
56       CephRgwNetwork: storage
57       PublicNetwork: external
58       OpendaylightApiNetwork: internal_api
59       MistralApiNetwork: internal_api
60       # We special-case the default ResolveNetwork for the CephStorage role
61       # for backwards compatibility, all other roles default to internal_api
62       CephStorageHostnameResolveNetwork: storage
63 {% for role in roles if role.name != 'CephStorage' %}
64       {{role.name}}HostnameResolveNetwork: internal_api
65 {% endfor %}
66     description: Mapping of service_name -> network name. Typically set
67                  via parameter_defaults in the resource registry.
68     type: json
69
70   # We define mappings to work around names that break when doing the
71   # CamelCase to snake_case conversion to align with service_names
72   ServiceNetMapDeprecatedMapping:
73     default:
74       MongoDbNetwork: MongodbNetwork
75       RabbitMqNetwork: RabbitmqNetwork
76       CephPublicNetwork: CephMonNetwork
77       SwiftMgmtNetwork: SwiftStorageNetwork
78     description: Mapping older deprecated service names, intended for
79                  internal use only, this will be removed in future.
80     type: json
81
82 parameter_groups:
83 - label: deprecated
84   description: Do not use deprecated params, they will be removed.
85   parameters:
86   - ServiceNetMapDeprecatedMapping
87
88 outputs:
89   service_net_map:
90     value:
91       map_merge:
92         - {get_param: ServiceNetMapDefaults}
93         - map_replace:
94            - {get_param: ServiceNetMap}
95            - keys: {get_param: ServiceNetMapDeprecatedMapping}
96
97   service_net_map_lower:
98     value:
99       # This does a conversion from CamelCase to snake_case,
100       # e.g HeatApiNetwork becomes heat_api_network so it
101       # matches the service names.
102       yaql:
103         expression: dict($.data.map.items().select([ regex(`([a-z0-9])([A-Z])`).replace($[0], '\\1_\\2').toLower(), $[1]]))
104         data:
105           map:
106             map_merge:
107               - {get_param: ServiceNetMapDefaults}
108               - map_replace:
109                  - {get_param: ServiceNetMap}
110                  - keys: {get_param: ServiceNetMapDeprecatedMapping}