OVNChassisMacPorts for distributed VLAN
For distributed vlan in ovn we need to add support of creating mac addresses per compute and seting them in external_ids:ovn-chassis-mac-mappings. This change passes the ovn::controller::ovn_bridge_mappings to the role node configuration so that ports for each bridge mapping can be created. The map of physnet/mac_address pairs is placed in the role output, and in RoleGroupVars. Related-Bug: #1881593 Change-Id: If24653b629e39b6dd7ec6d09ae0ef32d7842c48f
This commit is contained in:
parent
2082099332
commit
c90bbe188e
|
@ -753,6 +753,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:
|
||||
|
|
|
@ -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
|
||||
|
@ -582,6 +585,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:
|
||||
|
|
Loading…
Reference in New Issue