Merge "Increase documentation about parameters"
[apex-tripleo-heat-templates.git] / network / service_net_map.j2.yaml
1 heat_template_version: ocata
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       # Note the values in this map are replaced by *NetName
25       # to allow for sane defaults when the network names are
26       # overridden.
27       ApacheNetwork: internal_api
28       NeutronTenantNetwork: tenant
29       CeilometerApiNetwork: internal_api
30       ContrailAnalyticsNetwork: internal_api
31       ContrailAnalyticsDatabaseNetwork: internal_api
32       ContrailConfigNetwork: internal_api
33       ContrailControlNetwork: internal_api
34       ContrailDatabaseNetwork: internal_api
35       ContrailWebuiNetwork: internal_api
36       ContrailTsnNetwork: internal_api
37       AodhApiNetwork: internal_api
38       PankoApiNetwork: internal_api
39       BarbicanApiNetwork: internal_api
40       GnocchiApiNetwork: internal_api
41       MongodbNetwork: internal_api
42       CinderApiNetwork: internal_api
43       CinderIscsiNetwork: storage
44       CongressApiNetwork: internal_api
45       GlanceApiNetwork: storage
46       IronicApiNetwork: ctlplane
47       IronicNetwork: ctlplane
48       KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints
49       KeystonePublicApiNetwork: internal_api
50       ManilaApiNetwork: internal_api
51       NeutronApiNetwork: internal_api
52       OctaviaApiNetwork: internal_api
53       HeatApiNetwork: internal_api
54       HeatApiCfnNetwork: internal_api
55       HeatApiCloudwatchNetwork: internal_api
56       NovaApiNetwork: internal_api
57       NovaPlacementNetwork: internal_api
58       NovaMetadataNetwork: internal_api
59       NovaVncProxyNetwork: internal_api
60       NovaLibvirtNetwork: internal_api
61       Ec2ApiNetwork: internal_api
62       Ec2ApiMetadataNetwork: internal_api
63       TackerApiNetwork: internal_api
64       SwiftStorageNetwork: storage_mgmt
65       SwiftProxyNetwork: storage
66       SaharaApiNetwork: internal_api
67       HorizonNetwork: internal_api
68       MemcachedNetwork: internal_api
69       RabbitmqNetwork: internal_api
70       QdrNetwork: internal_api
71       RedisNetwork: internal_api
72       MysqlNetwork: internal_api
73       CephClusterNetwork: storage_mgmt
74       CephMonNetwork: storage
75       CephRgwNetwork: storage
76       PublicNetwork: external
77       OpendaylightApiNetwork: internal_api
78       OvnDbsNetwork: internal_api
79       MistralApiNetwork: internal_api
80       ZaqarApiNetwork: internal_api
81       PacemakerRemoteNetwork: internal_api
82       # We special-case the default ResolveNetwork for the CephStorage role
83       # for backwards compatibility, all other roles default to internal_api
84       CephStorageHostnameResolveNetwork: storage
85       EtcdNetwork: internal_api
86 {% for role in roles if role.name != 'CephStorage' %}
87       {{role.name}}HostnameResolveNetwork: internal_api
88 {% endfor %}
89     description: Mapping of service_name -> network name. Typically set
90                  via parameter_defaults in the resource registry.
91     type: json
92
93   # We define mappings to work around names that break when doing the
94   # CamelCase to snake_case conversion to align with service_names
95   ServiceNetMapDeprecatedMapping:
96     default:
97       MongoDbNetwork: MongodbNetwork
98       RabbitMqNetwork: RabbitmqNetwork
99       CephPublicNetwork: CephMonNetwork
100       SwiftMgmtNetwork: SwiftStorageNetwork
101     description: Mapping older deprecated service names, intended for
102                  internal use only, this will be removed in future.
103     type: json
104
105   InternalApiNetName:
106     default: internal_api
107     description: The name of the internal API network.
108     type: string
109   ExternalNetName:
110     default: external
111     description: The name of the external network.
112     type: string
113   ManagementNetName:
114     default: management
115     description: The name of the management network.
116     type: string
117   StorageNetName:
118     default: storage
119     description: The name of the storage network.
120     type: string
121   StorageMgmtNetName:
122     default: storage_mgmt
123     description: The name of the Storage management network.
124     type: string
125   TenantNetName:
126     default: tenant
127     description: The name of the tenant network.
128     type: string
129
130
131 parameter_groups:
132 - label: deprecated
133   description: Do not use deprecated params, they will be removed.
134   parameters:
135   - ServiceNetMapDeprecatedMapping
136
137 resources:
138   ServiceNetMapValue:
139     type: OS::Heat::Value
140     properties:
141       type: json
142       value:
143         map_merge:
144           - map_replace:
145              - {get_param: ServiceNetMapDefaults}
146              - values:
147                  external: {get_param: ExternalNetName}
148                  internal_api: {get_param: InternalApiNetName}
149                  storage: {get_param: StorageNetName}
150                  storage_mgmt: {get_param: StorageMgmtNetName}
151                  tenant: {get_param: TenantNetName}
152                  management: {get_param: ManagementNetName}
153           - map_replace:
154              - {get_param: ServiceNetMap}
155              - keys: {get_param: ServiceNetMapDeprecatedMapping}
156
157
158 outputs:
159   service_net_map:
160     value: {get_attr: [ServiceNetMapValue, value]}
161
162   service_net_map_lower:
163     value:
164       # This does a conversion from CamelCase to snake_case,
165       # e.g HeatApiNetwork becomes heat_api_network so it
166       # matches the service names.
167       yaql:
168         expression: dict($.data.map.items().select([ regex(`([a-z0-9])([A-Z])`).replace($[0], '\\1_\\2').toLower(), $[1]]))
169         data:
170           map: {get_attr: [ServiceNetMapValue, value]}