Merge "Upgrade ceph-osd"
[apex-tripleo-heat-templates.git] / network / ports / net_ip_list_map.yaml
1 heat_template_version: 2016-10-14
2
3 parameters:
4   ControlPlaneIpList:
5     default: []
6     type: comma_delimited_list
7   ExternalIpList:
8     default: []
9     type: comma_delimited_list
10   InternalApiIpList:
11     default: []
12     type: comma_delimited_list
13   StorageIpList:
14     default: []
15     type: comma_delimited_list
16   StorageMgmtIpList:
17     default: []
18     type: comma_delimited_list
19   TenantIpList:
20     default: []
21     type: comma_delimited_list
22   ManagementIpList:
23     default: []
24     type: comma_delimited_list
25   EnabledServices:
26     default: []
27     type: comma_delimited_list
28   ServiceNetMap:
29     default: {}
30     type: json
31
32 outputs:
33   net_ip_map:
34     description: >
35       A Hash containing a mapping of network names to assigned lists
36       of IP addresses.
37     value:
38       ctlplane: {get_param: ControlPlaneIpList}
39       external: {get_param: ExternalIpList}
40       internal_api: {get_param: InternalApiIpList}
41       storage: {get_param: StorageIpList}
42       storage_mgmt: {get_param: StorageMgmtIpList}
43       tenant: {get_param: TenantIpList}
44       management: {get_param: ManagementIpList}
45   service_ips:
46     description: >
47       Map of enabled services to a list of their IP addresses
48     value:
49       yaql:
50         # This filters any entries where the value hasn't been substituted for
51         # a list, e.g it's still $service_network.  This happens when there is
52         # no network defined for the service in the ServiceNetMap, which is OK
53         # as not all services have to be bound to a network, so we filter them
54         expression: dict($.data.map.items().where(not isString($[1])))
55         data:
56           map:
57             map_replace:
58               - map_replace:
59                   - map_merge:
60                       repeat:
61                         template:
62                           SERVICE_node_ips: SERVICE_network
63                         for_each:
64                           SERVICE: {get_param: EnabledServices}
65                   - values: {get_param: ServiceNetMap}
66               - values:
67                   ctlplane: {get_param: ControlPlaneIpList}
68                   external: {get_param: ExternalIpList}
69                   internal_api: {get_param: InternalApiIpList}
70                   storage: {get_param: StorageIpList}
71                   storage_mgmt: {get_param: StorageMgmtIpList}
72                   tenant: {get_param: TenantIpList}
73                   management: {get_param: ManagementIpList}