Ignore OVN Bridge MAC net for inventory generation

The OVN Bridge MAC network causes the inventory generation
to be skipped due to MissingMandatoryNeutronResourceTag.
This nework should be ignored here.

Related: blueprint network-data-v2-ports
Partial-Bug: #1928469
Change-Id: Idb557d0c6c4356385cb05b2041b0bdaa5485367a
This commit is contained in:
Harald Jensås 2021-05-11 00:18:39 +02:00
parent f7cfed9e5c
commit 8877d0f805
2 changed files with 8 additions and 0 deletions

View File

@ -229,3 +229,7 @@ PER_STEP_TASKS = {
}
INVENTORY_NETWORK_CONFIG_FILE = 'inventory-network-config.yaml'
# Hard coded name in:
# tripleo_ansible/ansible_plugins/modules/tripleo_ovn_mac_addresses.py
OVN_MAC_ADDR_NET_NAME = 'ovn_mac_addr_net'

View File

@ -192,6 +192,10 @@ class NeutronData(object):
mandatory_tags = {'tripleo_network_name'}
networks_by_id = {}
for net in self.networks:
# Don't include the OVN Bridge MAC address net
if net.name == constants.OVN_MAC_ADDR_NET_NAME:
continue
tags = self._tags_to_dict(net.tags)
# In case of missing required tags, raise an error.
# neutron is useless as a inventory source in this case.