NSX|v: Fix port_binding usage

Change-Id: I3b74b373097d0b77375b30fc03b026c31257119c
This commit is contained in:
Adit Sarfaty 2018-07-18 10:00:54 +03:00
parent 2f70225703
commit cc2a0064f3
1 changed files with 2 additions and 7 deletions

View File

@ -158,13 +158,8 @@ class NsxPortBindingMixin(pbin_db.PortBindingMixin):
if port_db.nsx_port_attributes:
port_res[pbin.VNIC_TYPE] = port_db.nsx_port_attributes.vnic_type
# TODO(boden): remove common_utils check when neutron patch lands
# see https://review.openstack.org/#/c/414251
if hasattr(common_utils, 'get_port_binding_by_status_and_host'):
binding = common_utils.get_port_binding_by_status_and_host(
port_db.port_bindings, constants.ACTIVE)
else:
binding = port_db.port_binding
binding = common_utils.get_port_binding_by_status_and_host(
port_db.port_binding, constants.ACTIVE)
if binding:
plugin.extend_port_portbinding(port_res, binding)