Browse Source

Merge "OVNChassisMacPorts for distributed VLAN" into stable/ussuri

changes/30/785130/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
db82e6ef64
2 changed files with 35 additions and 0 deletions
  1. +1
    -0
      overcloud.j2.yaml
  2. +34
    -0
      puppet/role.role.j2.yaml

+ 1
- 0
overcloud.j2.yaml View File

@ -770,6 +770,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:


+ 34
- 0
puppet/role.role.j2.yaml 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
@ -596,6 +599,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…
Cancel
Save