Don't curl metadata server in userdata example
[apex-tripleo-heat-templates.git] / network / ports / net_ip_map.yaml
1 heat_template_version: pike
2
3 parameters:
4   ControlPlaneIp:
5     default: ''
6     type: string
7   ControlPlaneSubnetCidr: # Override this via parameter_defaults
8     default: '24'
9     description: The subnet CIDR of the control plane network.
10     type: string
11   ExternalIp:
12     default: ''
13     type: string
14   ExternalIpSubnet:
15     default: ''
16     type: string
17   ExternalIpUri:
18     default: ''
19     type: string
20     description: IP address with brackets in case of IPv6
21   InternalApiIp:
22     default: ''
23     type: string
24   InternalApiIpSubnet:
25     default: ''
26     type: string
27   InternalApiIpUri:
28     default: ''
29     type: string
30     description: IP address with brackets in case of IPv6
31   StorageIp:
32     default: ''
33     type: string
34   StorageIpSubnet:
35     default: ''
36     type: string
37   StorageIpUri:
38     default: ''
39     type: string
40     description: IP address with brackets in case of IPv6
41   StorageMgmtIp:
42     default: ''
43     type: string
44   StorageMgmtIpSubnet:
45     default: ''
46     type: string
47   StorageMgmtIpUri:
48     default: ''
49     type: string
50     description: IP address with brackets in case of IPv6
51   TenantIp:
52     default: ''
53     type: string
54   TenantIpSubnet:
55     default: ''
56     type: string
57   TenantIpUri:
58     default: ''
59     type: string
60     description: IP address with brackets in case of IPv6
61   ManagementIp:
62     default: ''
63     type: string
64   ManagementIpSubnet:
65     default: ''
66     type: string
67     description: IP address/subnet on the management network
68   ManagementIpUri:
69     default: ''
70     type: string
71     description: IP address with brackets in case of IPv6
72
73   InternalApiNetName:
74     default: internal_api
75     description: The name of the internal API network.
76     type: string
77   ExternalNetName:
78     default: external
79     description: The name of the external network.
80     type: string
81   ManagementNetName:
82     default: management
83     description: The name of the management network.
84     type: string
85   StorageNetName:
86     default: storage
87     description: The name of the storage network.
88     type: string
89   StorageMgmtNetName:
90     default: storage_mgmt
91     description: The name of the Storage management network.
92     type: string
93   TenantNetName:
94     default: tenant
95     description: The name of the tenant network.
96     type: string
97
98 resources:
99
100   NetIpMapValue:
101     type: OS::Heat::Value
102     properties:
103       type: json
104       value:
105         map_replace:
106           - ctlplane: {get_param: ControlPlaneIp}
107             external: {get_param: ExternalIp}
108             internal_api: {get_param: InternalApiIp}
109             storage: {get_param: StorageIp}
110             storage_mgmt: {get_param: StorageMgmtIp}
111             tenant: {get_param: TenantIp}
112             management: {get_param: ManagementIp}
113             ctlplane_subnet:
114               list_join:
115                 - ''
116                 - - {get_param: ControlPlaneIp}
117                   - '/'
118                   - {get_param: ControlPlaneSubnetCidr}
119             external_subnet: {get_param: ExternalIpSubnet}
120             internal_api_subnet: {get_param: InternalApiIpSubnet}
121             storage_subnet: {get_param: StorageIpSubnet}
122             storage_mgmt_subnet: {get_param: StorageMgmtIpSubnet}
123             tenant_subnet: {get_param: TenantIpSubnet}
124             management_subnet: {get_param: ManagementIpSubnet}
125             ctlplane_uri: {get_param: ControlPlaneIp}
126             external_uri: {get_param: ExternalIpUri}
127             internal_api_uri: {get_param: InternalApiIpUri}
128             storage_uri: {get_param: StorageIpUri}
129             storage_mgmt_uri: {get_param: StorageMgmtIpUri}
130             tenant_uri: {get_param: TenantIpUri}
131             management_uri: {get_param: ManagementIpUri}
132           - keys:
133               external: {get_param: ExternalNetName}
134               internal_api: {get_param: InternalApiNetName}
135               storage: {get_param: StorageNetName}
136               storage_mgmt: {get_param: StorageMgmtNetName}
137               tenant: {get_param: TenantNetName}
138               management: {get_param: ManagementNetName}
139               external_subnet:
140                 str_replace:
141                   template: NAME_subnet
142                   params:
143                     NAME: {get_param: ExternalNetName}
144               internal_api_subnet:
145                 str_replace:
146                   template: NAME_subnet
147                   params:
148                     NAME: {get_param: InternalApiNetName}
149               storage_subnet:
150                 str_replace:
151                   template: NAME_subnet
152                   params:
153                     NAME: {get_param: StorageNetName}
154               storage_mgmt_subnet:
155                 str_replace:
156                   template: NAME_subnet
157                   params:
158                     NAME: {get_param: StorageMgmtNetName}
159               tenant_subnet:
160                 str_replace:
161                   template: NAME_subnet
162                   params:
163                     NAME: {get_param: TenantNetName}
164               management_subnet:
165                 str_replace:
166                   template: NAME_subnet
167                   params:
168                     NAME: {get_param: ManagementNetName}
169               external_uri:
170                 str_replace:
171                   template: NAME_uri
172                   params:
173                     NAME: {get_param: ExternalNetName}
174               internal_api_uri:
175                 str_replace:
176                   template: NAME_uri
177                   params:
178                     NAME: {get_param: InternalApiNetName}
179               storage_uri:
180                 str_replace:
181                   template: NAME_uri
182                   params:
183                     NAME: {get_param: StorageNetName}
184               storage_mgmt_uri:
185                 str_replace:
186                   template: NAME_uri
187                   params:
188                     NAME: {get_param: StorageMgmtNetName}
189               tenant_uri:
190                 str_replace:
191                   template: NAME_uri
192                   params:
193                     NAME: {get_param: TenantNetName}
194               management_uri:
195                 str_replace:
196                   template: NAME_uri
197                   params:
198                     NAME: {get_param: ManagementNetName}
199
200 outputs:
201   net_ip_map:
202     description: >
203       A Hash containing a mapping of network names to assigned IPs
204       for a specific machine.
205     value: {get_attr: [NetIpMapValue, value]}