summaryrefslogtreecommitdiffstats
path: root/network/ports/net_ip_map.yaml
blob: ce58e96f984c5c3266fdab81b060ef48486f9468 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
heat_template_version: pike

parameters:
  ControlPlaneIp:
    default: ''
    type: string
  ControlPlaneSubnetCidr: # Override this via parameter_defaults
    default: '24'
    description: The subnet CIDR of the control plane network.
    type: string
  ExternalIp:
    default: ''
    type: string
  ExternalIpSubnet:
    default: ''
    type: string
    description: IP address/subnet on the external network
  ExternalIpUri:
    default: ''
    type: string
    description: IP address with brackets in case of IPv6
  InternalApiIp:
    default: ''
    type: string
  InternalApiIpSubnet:
    default: ''
    type: string
    description: IP address/subnet on the internal API network
  InternalApiIpUri:
    default: ''
    type: string
    description: IP address with brackets in case of IPv6
  StorageIp:
    default: ''
    type: string
  StorageIpSubnet:
    default: ''
    type: string
    description: IP address/subnet on the storage network
  StorageIpUri:
    default: ''
    type: string
    description: IP address with brackets in case of IPv6
  StorageMgmtIp:
    default: ''
    type: string
  StorageMgmtIpSubnet:
    default: ''
    type: string
    description: IP address/subnet on the storage mgmt network
  StorageMgmtIpUri:
    default: ''
    type: string
    description: IP address with brackets in case of IPv6
  TenantIp:
    default: ''
    type: string
  TenantIpSubnet:
    default: ''
    type: string
    description: IP address/subnet on the tenant network
  TenantIpUri:
    default: ''
    type: string
    description: IP address with brackets in case of IPv6
  ManagementIp:
    default: ''
    type: string
  ManagementIpSubnet:
    default: ''
    type: string
    description: IP address/subnet on the management network
  ManagementIpUri:
    default: ''
    type: string
    description: IP address with brackets in case of IPv6

  InternalApiNetName:
    default: internal_api
    description: The name of the internal API network.
    type: string
  ExternalNetName:
    default: external
    description: The name of the external network.
    type: string
  ManagementNetName:
    default: management
    description: The name of the management network.
    type: string
  StorageNetName:
    default: storage
    description: The name of the storage network.
    type: string
  StorageMgmtNetName:
    default: storage_mgmt
    description: The name of the Storage management network.
    type: string
  TenantNetName:
    default: tenant
    description: The name of the tenant network.
    type: string

resources:

  NetIpMapValue:
    type: OS::Heat::Value
    properties:
      type: json
      value:
        map_replace:
          - ctlplane: {get_param: ControlPlaneIp}
            external: {get_param: ExternalIp}
            internal_api: {get_param: InternalApiIp}
            storage: {get_param: StorageIp}
            storage_mgmt: {get_param: StorageMgmtIp}
            tenant: {get_param: TenantIp}
            management: {get_param: ManagementIp}
            ctlplane_subnet:
              list_join:
                - ''
                - - {get_param: ControlPlaneIp}
                  - '/'
                  - {get_param: ControlPlaneSubnetCidr}
            external_subnet: {get_param: ExternalIpSubnet}
            internal_api_subnet: {get_param: InternalApiIpSubnet}
            storage_subnet: {get_param: StorageIpSubnet}
            storage_mgmt_subnet: {get_param: StorageMgmtIpSubnet}
            tenant_subnet: {get_param: TenantIpSubnet}
            management_subnet: {get_param: ManagementIpSubnet}
            ctlplane_uri: {get_param: ControlPlaneIp}
            external_uri: {get_param: ExternalIpUri}
            internal_api_uri: {get_param: InternalApiIpUri}
            storage_uri: {get_param: StorageIpUri}
            storage_mgmt_uri: {get_param: StorageMgmtIpUri}
            tenant_uri: {get_param: TenantIpUri}
            management_uri: {get_param: ManagementIpUri}
          - keys:
              external: {get_param: ExternalNetName}
              internal_api: {get_param: InternalApiNetName}
              storage: {get_param: StorageNetName}
              storage_mgmt: {get_param: StorageMgmtNetName}
              tenant: {get_param: TenantNetName}
              management: {get_param: ManagementNetName}
              external_subnet:
                str_replace:
                  template: NAME_subnet
                  params:
                    NAME: {get_param: ExternalNetName}
              internal_api_subnet:
                str_replace:
                  template: NAME_subnet
                  params:
                    NAME: {get_param: InternalApiNetName}
              storage_subnet:
                str_replace:
                  template: NAME_subnet
                  params:
                    NAME: {get_param: StorageNetName}
              storage_mgmt_subnet:
                str_replace:
                  template: NAME_subnet
                  params:
                    NAME: {get_param: StorageMgmtNetName}
              tenant_subnet:
                str_replace:
                  template: NAME_subnet
                  params:
                    NAME: {get_param: TenantNetName}
              management_subnet:
                str_replace:
                  template: NAME_subnet
                  params:
                    NAME: {get_param: ManagementNetName}
              external_uri:
                str_replace:
                  template: NAME_uri
                  params:
                    NAME: {get_param: ExternalNetName}
              internal_api_uri:
                str_replace:
                  template: NAME_uri
                  params:
                    NAME: {get_param: InternalApiNetName}
              storage_uri:
                str_replace:
                  template: NAME_uri
                  params:
                    NAME: {get_param: StorageNetName}
              storage_mgmt_uri:
                str_replace:
                  template: NAME_uri
                  params:
                    NAME: {get_param: StorageMgmtNetName}
              tenant_uri:
                str_replace:
                  template: NAME_uri
                  params:
                    NAME: {get_param: TenantNetName}
              management_uri:
                str_replace:
                  template: NAME_uri
                  params:
                    NAME: {get_param: ManagementNetName}

outputs:
  net_ip_map:
    description: >
      A Hash containing a mapping of network names to assigned IPs
      for a specific machine.
    value: {get_attr: [NetIpMapValue, value]}