From 5c5b08b46e56de7fa2641aad84f17fd23b094adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Tue, 11 May 2021 00:18:39 +0200 Subject: [PATCH] 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 (cherry picked from commit 8877d0f80572431fbb636f47ea87b38fbd6f64f4) --- tripleo_common/constants.py | 4 ++++ tripleo_common/inventory.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tripleo_common/constants.py b/tripleo_common/constants.py index 1d4f332b6..89e4a9d0d 100644 --- a/tripleo_common/constants.py +++ b/tripleo_common/constants.py @@ -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' diff --git a/tripleo_common/inventory.py b/tripleo_common/inventory.py index 104961467..8dd3773e8 100644 --- a/tripleo_common/inventory.py +++ b/tripleo_common/inventory.py @@ -196,6 +196,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.