Merge "OVNChassisMacPorts for distributed VLAN" into stable/train

This commit is contained in:
Zuul 2021-04-13 14:14:20 +00:00 committed by Gerrit Code Review
commit b6dbd9250e
2 changed files with 35 additions and 0 deletions

View File

@ -757,6 +757,7 @@ resources:
- {get_param: {{role.name}}SchedulerHints}
ServiceNames: {get_attr: [{{role.name}}ServiceNames, value]}
ServiceMetadataSettings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
OVNBridgeMappings: {get_attr: [{{role.name}}ServiceChainRoleData, value, config_settings, 'ovn::controller::ovn_bridge_mappings']}
DeploymentServerBlacklistDict: {get_attr: [DeploymentServerBlacklistDict, value]}
RoleParameters:
map_merge:

View File

@ -117,6 +117,9 @@ parameters:
ServiceMetadataSettings:
type: json
default: {}
OVNBridgeMappings:
type: comma_delimited_list
default: []
ConfigCommand:
type: string
description: Command which will be run whenever configuration data changes
@ -604,6 +607,37 @@ resources:
fqdn_ctlplane: {get_attr: [NetHostMap, value, ctlplane, fqdn]}
fqdn_canonical: {get_attr: [NetHostMap, value, canonical, fqdn]}
hostname_resolve_network: {get_param: [ServiceNetMap, {{role.name}}HostnameResolveNetwork]}
ovn_chassis_mac_map: {get_attr: [{{server_resource_name}}OVNChassisMacMap, value]}
{{server_resource_name}}OVNChassisMacPorts:
type: OS::Heat::ResourceGroup
properties:
count:
yaql:
expression: $.data.len()
data: {get_param: OVNBridgeMappings}
resource_def:
type: OS::TripleO::OVNMacAddressPort
properties:
PortName: {{server_resource_name}}-ovn-mac-%index%
{{server_resource_name}}OVNChassisMacMap:
type: OS::Heat::Value
properties:
type: json
value:
yaql:
expression: let(physnets => switch(isList($.data.physnets) => $.data.physnets, true => [])) ->
$physnets.zip($.data.macs).toDict($.first(), $.last())
data:
physnets:
yaql:
expression: $.data.select($.split(':').first())
data: {get_param: OVNBridgeMappings}
macs:
yaql:
expression: switch(isDict($.data) => $.data.values(), true => [])
data: {get_attr: [{{server_resource_name}}OVNChassisMacPorts, attributes, mac_address]}
outputs:
ansible_host_vars_map: