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
1 changed files with 34 additions and 21 deletions

View File

@ -31,6 +31,16 @@ parameters:
type: number
constraints:
- 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:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
@ -45,27 +55,30 @@ resources:
get_file: network/scripts/run-os-net-config.sh
params:
$network_config:
network_config:
- type: ovs_bridge
name: br-ctlplane
use_dhcp: false
dns_servers:
get_param: DnsServers
ovs_extra:
- "br-set-external-id br-ctlplane bridge-id br-ctlplane"
addresses:
- ip_netmask:
list_join:
- /
- - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr
routes: {get_param: ControlPlaneStaticRoutes}
members:
- type: interface
name: interface_name
# force the MAC address of the bridge to this interface
primary: true
mtu: {get_param: UndercloudLocalMtu}
if:
- undercloud_net_config_override
- {get_param: UndercloudNetConfigOverride}
- network_config:
- type: ovs_bridge
name: br-ctlplane
use_dhcp: false
dns_servers:
get_param: DnsServers
ovs_extra:
- "br-set-external-id br-ctlplane bridge-id br-ctlplane"
addresses:
- ip_netmask:
list_join:
- /
- - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr
routes: {get_param: ControlPlaneStaticRoutes}
members:
- type: interface
name: interface_name
# force the MAC address of the bridge to this interface
primary: true
mtu: {get_param: UndercloudLocalMtu}
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.