Browse Source

Auto OVN bridge mac mappings for standalone

Set OVNStaticBridgeMacMappings for standalone deployments
automatically unless the user provided an override.

This replaces the implementation in quickstart-extras:
https://review.opendev.org/783137

Change-Id: I79d141358ead2a2c90fdb728e17926d96d498a28
Closes-Bug: #1927556
(cherry picked from commit 2f5ad5947b)
changes/24/792524/1
Harald Jensås 1 month ago
parent
commit
2006c0ff35
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      tripleoclient/v1/tripleo_deploy.py

+ 15
- 0
tripleoclient/v1/tripleo_deploy.py View File

@ -670,10 +670,25 @@ class Deploy(command.Command):
ovn_dbs_vip = user_params.get(
'OVNDBsVirtualFixedIPs',
[{'ip_address': c_ip, 'use_neutron': False}])
ovn_static_bridge_mac_map = user_params.get(
'OVNStaticBridgeMacMappings', {})
if not ovn_static_bridge_mac_map:
ovn_bridge_macs = ovn_static_bridge_mac_map.setdefault(
utils.get_short_hostname(), {})
# NOTE: Hard coding the THT default for NeutronBridgeMappings
# unless user provided an override.
bridge_mappings = user_params.get('NeutronBridgeMappings',
['datacentre:br-ex'])
physnets = [bridge.split(':')[0] for bridge in bridge_mappings]
for idx, physnet in enumerate(physnets):
ovn_bridge_macs[physnet] = 'fa:16:3a:00:53:{:02X}'.format(idx)
tmp_env.update(
{
'RedisVirtualFixedIPs': redis_vip,
'OVNDBsVirtualFixedIPs': ovn_dbs_vip,
'OVNStaticBridgeMacMappings': ovn_static_bridge_mac_map,
'CtlplaneNetworkAttributes': {
'network': {
'mtu': mtu,


Loading…
Cancel
Save