Comment 4 for bug 1888490

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

Reviewed: https://review.opendev.org/754658
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6b79cdcc1b92a968c967286cc267bac39803c85e
Submitter: Zuul
Branch: master

commit 6b79cdcc1b92a968c967286cc267bac39803c85e
Author: vinay_m <email address hidden>
Date: Mon Sep 28 14:22:18 2020 +0530

    Non-api filters not working with admin instance tab

    The issue was that the filtering opts like project_name, image_name,
    flavor_name that are not supported by nova API (non-api filters) do
    not work expectedly. These filters are mapped to their IDs [1], but
    an instance list retrieved before resolving non-API filters is used [2].
    This commit changes the logic to resolve non-API filters first and
    then retrieve instances using the updated search_opts.

    Note that the image list is handled a bit specially. If 'image_name'
    is specified as a filter, we retrieve a corresponding image detail
    first before fetching instances to resolve the image name into its ID.
    Otherwise, we retrieve images only related to instances retrieved
    and this happens after retrieving instances.

    [1] https://opendev.org/openstack/horizon/src/commit/f90c3cd50174af4927737e29e2765cd2d7ca507f/openstack_dashboard/dashboards/admin/instances/views.py#L166
    [2] https://opendev.org/openstack/horizon/src/commit/f90c3cd50174af4927737e29e2765cd2d7ca507f/openstack_dashboard/dashboards/admin/instances/views.py#L154

    Closes-Bug: #1888490
    Co-Authored-By: Akihiro Motoki <email address hidden>
    Change-Id: Id43adbd44778d3375c0d49da3f7530cbb99e16fe