← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1718725] Re: non-api bound filters in instance index page are broken

 

Reviewed:  https://review.openstack.org/506716
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=610798376191902c402890c24e39e4de2e240d2e
Submitter: Jenkins
Branch:    master

commit 610798376191902c402890c24e39e4de2e240d2e
Author: Huan Xiong <huan.xiong@xxxxxxxxxxxxxxxx>
Date:   Sat Sep 23 00:41:15 2017 +0800

    Fix non-API bound filters in project and admin instance panels
    
    Filters like "image_name", "flavor_name" and "project" in instance
    panels are keys not supported in Nova List-Servers API directly, so they
    should be converted to "image", "flavor" and "project_id", respectively,
    before Horizon calling Nova List-Servers API.
    
    That used to work, but was broken in commit
    df194c8b4c25c6128f03a98fd0e628ba14b743ff because the code change messed
    up the order. This commit fixes it by converting those filters first and
    then calling Nova API with modified filters.
    
    Change-Id: I504caaab2b6f256e7eb8c2605acaec39c004e80f
    Closes-Bug: #1718725


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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1718725

Title:
  non-api bound filters in instance index page  are broken

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  The issue was observed on latest code and can be reproduced as below:

  - go to Admin dashboard instance index page
  - select "image name" filter
  - input a valid image name value (note: there are instances created with this image)
  - press filter button
  - a new page is returned with all instance, instead of instances with that image name

  The same issue exists for "project" and "flavor name" filter (all are
  non-api bound filters).

  Project dashboard has same issue too.

  For Admin dashboard, I think the issue is with these code:

          if 'project' in search_opts and \
                  not swap_filter(tenants, search_opts, 'project', 'tenant_id'):
                  self._more = False
                  return instances
          elif 'image_name' in search_opts and \
                  not swap_filter(images, search_opts, 'image_name', 'image'):
                  self._more = False
                  return instances
          elif "flavor_name" in search_opts and \
                  not swap_filter(flavors, search_opts, 'flavor_name', 'flavor'):
                  self._more = False
                  return instances

  From what I can tell, they effectively do nothing unless user input
  invalid filter values. That explains why these filter don't work when
  user input valid filter values.

  For Project dashboard, I don't find code that process the above
  filters. Bug?

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


References