Add parameter for UndercloudNetConfigOverride

This can be used to inject a custom Json blob containing
os-net-config template data for the Undercloud installation.
The intent is to be able to use this alongside of the
net_config_override setting in tripleoclient when installing
the undercloud.

Change-Id: I322570ae958f8e483b8b2a0ad40d1ee83d084372
This commit is contained in:
Dan Prince
2018-04-25 10:03:54 -04:00
committed by Bogdan Dobrelya
parent e24316c4ec
commit 3267386674

View File

@@ -31,6 +31,16 @@ parameters:
type: number type: number
constraints: constraints:
- range: { min: 1000, max: 65536 } - range: { min: 1000, max: 65536 }
UndercloudNetConfigOverride:
default: {}
description: Custom JSON data to be used to override the os-net-config data in this template. This is meant to be used by net_config_override parameter in tripleoclient to provide an easy means to pass in custom net configs for the Undercloud.
type: json
conditions:
undercloud_net_config_override:
not:
equals: [{get_param: UndercloudNetConfigOverride}, {}]
resources: resources:
OsNetConfigImpl: OsNetConfigImpl:
type: OS::Heat::SoftwareConfig type: OS::Heat::SoftwareConfig
@@ -45,27 +55,30 @@ resources:
get_file: network/scripts/run-os-net-config.sh get_file: network/scripts/run-os-net-config.sh
params: params:
$network_config: $network_config:
network_config: if:
- type: ovs_bridge - undercloud_net_config_override
name: br-ctlplane - {get_param: UndercloudNetConfigOverride}
use_dhcp: false - network_config:
dns_servers: - type: ovs_bridge
get_param: DnsServers name: br-ctlplane
ovs_extra: use_dhcp: false
- "br-set-external-id br-ctlplane bridge-id br-ctlplane" dns_servers:
addresses: get_param: DnsServers
- ip_netmask: ovs_extra:
list_join: - "br-set-external-id br-ctlplane bridge-id br-ctlplane"
- / addresses:
- - get_param: ControlPlaneIp - ip_netmask:
- get_param: ControlPlaneSubnetCidr list_join:
routes: {get_param: ControlPlaneStaticRoutes} - /
members: - - get_param: ControlPlaneIp
- type: interface - get_param: ControlPlaneSubnetCidr
name: interface_name routes: {get_param: ControlPlaneStaticRoutes}
# force the MAC address of the bridge to this interface members:
primary: true - type: interface
mtu: {get_param: UndercloudLocalMtu} name: interface_name
# force the MAC address of the bridge to this interface
primary: true
mtu: {get_param: UndercloudLocalMtu}
outputs: outputs:
OS::stack_id: OS::stack_id:
description: The OsNetConfigImpl resource. description: The OsNetConfigImpl resource.