Fix is_port_bound function in l3_dvr_db module

This function was added recently by [1] but during
cherry-picking it from Rocky I made mistake in "if"
condition which was different in Queens than in newer
versions.
This patch fixes this mistake.
It is needed only for Queens release.

[1] https://review.opendev.org/#/c/717321/

Change-Id: Iad5212edb659db0d31569c980ba8e7106637f65b
This commit is contained in:
Slawek Kaplonski 2020-04-23 11:11:04 +02:00
parent a96f950e4b
commit 92ee8e9f76
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ l3_dvr_db.register_db_l3_dvr_opts()
# TODO(slaweq): this should be moved to neutron_lib.plugins.utils module
def is_port_bound(port):
if port.port_binding:
if not port.port_binding:
LOG.warning("Binding for port %s was not found.", port)
return False
return port.port_binding[portbindings_extended.VIF_TYPE] not in [