Image filtering does not work for "protected" property

Bug #1674246 reported by Mateusz Kowalski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
space
OpenStack Dashboard (Horizon)
Invalid
Undecided
space

Bug Description

NOTE(rosmaita): this is actually a feature request. As it will impact the API (even slightly), it requires a spec because there's some question about how it should behave when values that don't make sense as a boolean are provided in a query string. The discussion is taking place on https://review.openstack.org/#/c/451560/

NOTE(makowals): Sorry, but I cannot agree, at least from Horizon perspective it's a bug. The filtering functionality (entry in a droplist) exists but does not work as expected and just confuses our users. If the feature does not exists in Glance it should be then removed from Horizon completely before implemented in Glance, but definitely not be exposed and point to something returning wrong result.

When trying to filter images by "Protected: yes", it always shows result of the filter "Protected: no", making it impossible to show only images which are protected.

space (fengzhr)
Changed in horizon:
assignee: nobody → space (fengzhr)
space (fengzhr)
Changed in glance:
assignee: nobody → space (fengzhr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/449108

Changed in glance:
status: New → In Progress
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

The 'protected' field is a boolean, so the filter value should be true or false. That being said, protected=true doesn't work--basically any value is treated as False.

description: updated
description: updated
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/449108
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=d6068bec44e179174bcde8c13827caf1ac738c5a
Submitter: Jenkins
Branch: master

commit d6068bec44e179174bcde8c13827caf1ac738c5a
Author: space <email address hidden>
Date: Thu Mar 23 08:03:38 2017 -0400

    Add 'protected' filter to image-list call

    Implements v2 API image-list filtering on the 'protected' property
    following the spec:
    https://git.openstack.org/cgit/openstack/glance-specs/tree/specs/pike
    /approved/glance/add-protected-filter.rst
    The 'protected' query string parameter accepts one of 'true', 'false'.
    Any other value raises a 400 with an appropriate message.
    See the discussion on https://review.openstack.org/#/c/451560/
    for why this implementation strategy was chosen.

    Change-Id: Ie90d952edddd3f69b3f489f056ff506e63f96376
    Closes-Bug: #1674246

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 15.0.0.0b3

This issue was fixed in the openstack/glance 15.0.0.0b3 development milestone.

Revision history for this message
Ying Zuo (yingzuo) wrote :

Can not reproduce this issue in Horizon anymore so I think it's been fixed by the glance patch.

Changed in horizon:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.