Comment 3 for bug 1943639

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/809230
Committed: https://opendev.org/openstack/horizon/commit/9f5d659d160d24d359992dda22fecb0db6b6f805
Submitter: "Zuul (22348)"
Branch: master

commit 9f5d659d160d24d359992dda22fecb0db6b6f805
Author: Nicolas Bock <email address hidden>
Date: Wed Sep 15 09:39:31 2021 -0600

    Get ports directly instead of via loop

    In order to get a list of available ports, the current implementation
    of the form code in `project/instances/attach_interface` loops through
    the available networks in the project and requests a list of ports for
    each via the Neutron API. This implementation is O(N) in time with a
    large prefactor (the time for a Neutron API call) where N is the
    number of networks.

    Instead of calling the Neutron API for each network this change uses
    one call to the Neutron API to get the list of ports on all networks
    and filters this list via a list comprehension. While this
    implementation is still O(N) the prefactor is significantly smaller.

    Closes-Bug: #1943639
    Change-Id: I8fd32c3aad22d8ef7f57201f5144f6b2e357ef10
    Signed-off-by: Nicolas Bock <email address hidden>