From 2b2fcaa21636b413fe7250d802be14bfd5ffd8c0 Mon Sep 17 00:00:00 2001 From: Boden R Date: Tue, 24 Jul 2018 15:54:23 -0600 Subject: [PATCH] use get_port_binding_by_status_and_host from lib The get_port_binding_by_status_and_host function was rehomed into neutron-lib with https://review.openstack.org/#/c/580786/ and released in neutron-lib 1.18.0. This patch consumes the function by replacing all uses with lib's version for https://review.openstack.org/#/c/585559 Change-Id: I318d7e7756796a975b573ba87825906e1ff92249 --- vmware_nsx/db/nsx_portbindings_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vmware_nsx/db/nsx_portbindings_db.py b/vmware_nsx/db/nsx_portbindings_db.py index 4edc7c0b2c..38c9b9253d 100644 --- a/vmware_nsx/db/nsx_portbindings_db.py +++ b/vmware_nsx/db/nsx_portbindings_db.py @@ -23,8 +23,8 @@ from neutron_lib.api import validators from neutron_lib import constants from neutron_lib import exceptions from neutron_lib.plugins import directory +from neutron_lib.plugins import utils as p_utils -from neutron.common import utils as common_utils from neutron.db import _resource_extend as resource_extend from neutron.db import api as db_api from neutron.db import portbindings_db as pbin_db @@ -159,7 +159,7 @@ class NsxPortBindingMixin(pbin_db.PortBindingMixin): port_res[pbin.VNIC_TYPE] = port_db.nsx_port_attributes.vnic_type if hasattr(port_db, 'port_bindings'): - binding = common_utils.get_port_binding_by_status_and_host( + binding = p_utils.get_port_binding_by_status_and_host( port_db.port_bindings, constants.ACTIVE) if binding: