NSX|v: Fix port_binding usage
Change-Id: I3b74b373097d0b77375b30fc03b026c31257119c
This commit is contained in:
parent
2f70225703
commit
cc2a0064f3
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue