Merge "Add parameter for UndercloudNetConfigOverride"

This commit is contained in:
Zuul 2018-05-02 16:21:59 +00:00 committed by Gerrit Code Review
commit 415e1a51fd
1 changed files with 34 additions and 21 deletions

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.