Deployed networks template

Add a template for deployed networks, pre-deployed
network info in DeployedNetworkEnvironment parameter.
Use templates for 'OS::TripleO::Network' in resource
registry.

Depends-On: https://review.opendev.org/753195
Depends-On: https://review.opendev.org/751875
Change-Id: Id42486b513bef74525c1aa7204de979704e06ace
This commit is contained in:
Harald Jensås 2020-09-14 16:59:09 +02:00
parent cba7e4ecd0
commit caa9d7de03

View File

@ -0,0 +1,59 @@
heat_template_version: rocky
description: Create networks to split out Overcloud traffic
parameters:
DeployedNetworkEnvironment:
type: json
description: Deployed network environment
CtlplaneNetworkCidrs:
type: json
description: Cidrs for the ctlplane network.
CtlplaneNetworkAttributes:
type: json
default: {}
description: >
A map containing attributes of the undercloud ctlplane network and
subnets. NOTE: The value for this parameter is automatically populated in
the plan environment by tripleoclient.
resources:
NetworkExtraConfig:
type: OS::TripleO::Network::ExtraConfig
NetworkAttributesMap:
type: OS::Heat::Value
properties:
value:
map_merge:
- ctlplane: {get_param: CtlplaneNetworkAttributes}
- {get_param: [DeployedNetworkEnvironment, net_attributes_map]}
NetworkCidrMap:
type: OS::Heat::Value
properties:
value:
map_merge:
- ctlplane: {get_param: CtlplaneNetworkCidrs}
- {get_param: [DeployedNetworkEnvironment, net_cidr_map]}
NetworkIpVersionMap:
type: OS::Heat::Value
properties:
value:
map_merge:
- ctlplane:
yaql:
expression: $.data.items().first().last().ip_version
data: {get_param: [CtlplaneNetworkAttributes, subnets]}
- {get_param: [DeployedNetworkEnvironment, net_ip_version_map]}
outputs:
net_cidr_map:
value: {get_attr: [NetworkCidrMap, value]}
net_ip_version_map:
value: {get_attr: [NetworkIpVersionMap, value]}
net_attributes_map:
value: {get_attr: [NetworkAttributesMap, value]}