Fix confusing logs on tenant network configuration

port like obj can be passed to smartnic checker while it's not aware
of portgroups, giving a confusing log of unknown port data.

Change-Id: Ia9d1ef48ebcf0cc1f1a987fd02f2dd7e74b96271
This commit is contained in:
Kaifeng Wang 2025-03-25 22:14:46 +08:00
parent 5f911ad688
commit 95b9994134

View File

@ -823,6 +823,9 @@ def is_smartnic_port(port_data):
if isinstance(port_data, dict):
return port_data.get('is_smartnic', False)
if isinstance(port_data, objects.Portgroup):
return False
LOG.warning('Unknown port data type: %(type)s', {'type': type(port_data)})
return False