← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1979643] Re: ``get_ports`` query done in ``check_baremetal_ports_dhcp_options`` cannot filter by VNIC type

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/847346
Committed: https://opendev.org/openstack/neutron/commit/b497ad1665680cfff5173fbf08b06919e34c6776
Submitter: "Zuul (22348)"
Branch:    master

commit b497ad1665680cfff5173fbf08b06919e34c6776
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date:   Sat Jun 18 16:06:05 2022 +0000

    Filter the ports by VNIC type
    
    In ``check_baremetal_ports_dhcp_options``, the ports need to be
    retrieved based on the VNIC type. The VNIC type is stored in
    "ml2_port_bindings" table, not "ports" table.  Because the ML2Plugin
    ``get_ports`` method can filter only by "ports" database register
    fields, it is needed to retrieve those ports using a custom database
    query and then use the plugin method to retrieve the ports, converted
    to dictionaries and the extensions processed.
    
    Closes-Bug: #1979643
    Change-Id: Iab227d9de75e4b1b927043ce27bdc346066478e8


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1979643

Title:
  ``get_ports`` query done in ``check_baremetal_ports_dhcp_options``
  cannot filter by VNIC type

Status in neutron:
  Fix Released

Bug description:
  ``get_ports`` method calls
  ``neutron_lib.db.model_query.get_collection_query``. The "filters"
  parameter passed on this call can only apply to the DB model required,
  in this case "ports". The VNIC type field is not in "port" but in
  "ml2_port_bindings", that is a child model of "ports".

  In other to execute this query, a custom made query could be required.

  This is related to patch
  https://review.opendev.org/c/openstack/neutron/+/840316.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1979643/+subscriptions



References