1 heat_template_version: 2015-04-30
4 Software Config to drive os-net-config to configure multiple interfaces
5 for the {{ role }} role.
10 description: IP address/subnet on the ctlplane network
14 description: IP address/subnet on the external network
18 description: IP address/subnet on the internal API network
22 description: IP address/subnet on the storage network
26 description: IP address/subnet on the storage mgmt network
30 description: IP address/subnet on the tenant network
32 ManagementIpSubnet: # Only populated when including environments/network-management.yaml
34 description: IP address/subnet on the management network
36 ExternalNetworkVlanID:
38 description: Vlan ID for the external network traffic.
40 InternalApiNetworkVlanID:
42 description: Vlan ID for the internal_api network traffic.
46 description: Vlan ID for the storage network traffic.
48 StorageMgmtNetworkVlanID:
50 description: Vlan ID for the storage mgmt network traffic.
54 description: Vlan ID for the tenant network traffic.
56 ManagementNetworkVlanID:
58 description: Vlan ID for the management network traffic.
60 ExternalInterfaceDefaultRoute:
62 description: default route for the external network
64 ControlPlaneSubnetCidr: # Override this via parameter_defaults
66 description: The subnet CIDR of the control plane network.
68 ControlPlaneDefaultRoute: # Override this via parameter_defaults
69 description: The default route of the control plane network.
71 DnsServers: # Override this via parameter_defaults
73 description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
74 type: comma_delimited_list
75 EC2MetadataIp: # Override this via parameter_defaults
76 description: The IP address of the EC2 metadata server.
81 type: OS::Heat::StructuredConfig
83 group: os-apply-config
88 {%- if not nets['external'][0]['enabled'] or nets['tenant']['nic_mapping'][role]['vlan'] is number or nets['storage']['nic_mapping'][role]['vlan'] is number or nets['api']['nic_mapping'][role]['vlan'] is number or nets['external'][0]['nic_mapping'][role]['vlan'] is number %}
90 name: {get_input: bridge_name}
94 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
95 # force the MAC address of the bridge to this interface
97 {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] is number %}
100 vlan_id: {get_param: ExternalNetworkVlanID}
103 ip_netmask: {get_param: ExternalIpSubnet}
107 next_hop: {get_param: ExternalInterfaceDefaultRoute}
109 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] is number %}
112 vlan_id: {get_param: TenantNetworkVlanID}
115 ip_netmask: {get_param: TenantIpSubnet}
117 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] is number %}
120 vlan_id: {get_param: StorageNetworkVlanID}
123 ip_netmask: {get_param: StorageIpSubnet}
125 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] is number %}
128 vlan_id: {get_param: InternalApiNetworkVlanID}
131 ip_netmask: {get_param: InternalApiIpSubnet}
134 type: {{ nets['admin']['nic_mapping'][role]['phys_type'] }}
135 {%- if nets['admin']['nic_mapping'][role]['phys_type'] == 'linux_bridge' %}
140 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
143 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
147 dns_servers: {get_param: DnsServers}
153 - - {get_param: ControlPlaneIp}
154 - {get_param: ControlPlaneSubnetCidr}
157 ip_netmask: 169.254.169.254/32
158 next_hop: {get_param: EC2MetadataIp}
159 {%- if external_net_af == 6 or role == 'compute' or not nets['external'][0]['enabled'] %}
162 next_hop: {get_param: ControlPlaneDefaultRoute}
165 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] == 'native' %}
166 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
168 type: ovs_user_bridge
169 name: {{ ovs_dpdk_bridge }}
173 ip_netmask: {get_param: TenantIpSubnet}
178 driver: {{ nets['tenant']['nic_mapping'][role]['uio_driver'] }}
182 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
183 # force the MAC address of the bridge to this interface
187 type: {{ nets['tenant']['nic_mapping'][role]['phys_type'] }}
188 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
189 {%- if 'uio-driver' in nets['tenant']['nic_mapping'][role] %}
190 uio_driver: {{ nets['tenant']['nic_mapping'][role]['uio-driver'] }}
192 {%- if 'interface-options' in nets['tenant']['nic_mapping'][role] %}
193 options: '{{ nets['tenant']['nic_mapping'][role]['interface-options'] }}'
198 ip_netmask: {get_param: TenantIpSubnet}
201 {%- if nets['external'][0]['enabled'] and external_net_type != 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
203 type: {{ nets['external'][0]['nic_mapping'][role]['phys_type'] }}
204 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
205 {%- if 'uio-driver' in nets['external'][0]['nic_mapping'][role] %}
206 uio_driver: {{ nets['external'][0]['nic_mapping'][role]['uio-driver'] }}
208 {%- if role == 'controller' %}
209 dns_servers: {get_param: DnsServers}
214 ip_netmask: {get_param: ExternalIpSubnet}
217 {%- if role == 'controller' %}
220 ip_netmask: 0.0.0.0/0
221 next_hop: {get_param: ExternalInterfaceDefaultRoute}
222 {%- elif nets['external'][0]['enabled'] and external_net_type == 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
224 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
225 type: ovs_user_bridge
229 name: {get_input: bridge_name}
234 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
235 # force the MAC address of the bridge to this interface
237 {%- if role == 'controller' %}
238 dns_servers: {get_param: DnsServers}
241 ip_netmask: {get_param: ExternalIpSubnet}
245 ip_netmask: 0.0.0.0/0
246 next_hop: {get_param: ExternalInterfaceDefaultRoute}
249 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] == 'native' %}
252 name: {{ nets['storage']['nic_mapping'][role]['members'][0] }}
256 ip_netmask: {get_param: StorageIpSubnet}
258 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] == 'native' %}
261 name: {{ nets['api']['nic_mapping'][role]['members'][0] }}
265 ip_netmask: {get_param: InternalApiIpSubnet}
270 description: The OsNetConfigImpl resource.
271 value: {get_resource: OsNetConfigImpl}