Artifacts: filtering by range is not working as expected

Bug #1480392 reported by Alexander Tivelkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Mike Fedosin

Bug Description

According to spec, the list artifacts API call should be able to list artifacts by the range of some of its property, if the property supports comparison, e.g
/v3/artifacts/some_type/?property=gt:1&property=lt:10
 should return all the artifacts having the value of "property" greater than 1 and less than 10.
However this does not work: greater than 1 part is ignored and only the last condition is applied.

Tags: artifacts
Changed in glance:
assignee: nobody → Alexander Tivelkov (ativelkov)
Mike Fedosin (mfedosin)
Changed in glance:
assignee: Alexander Tivelkov (ativelkov) → Mike Fedosin (mfedosin)
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/215577

Changed in glance:
status: New → In Progress
Changed in glance:
milestone: none → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

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

commit 419432ffe308ed0fb71b7cd1ff730a1ac46185a0
Author: Mike Fedosin <email address hidden>
Date: Fri Aug 28 15:23:13 2015 +0300

    Allow to filter artifacts by range

    This code enables filtering properties by range by providing
    several parameters, that now considered as concatination,rather
    than using only the latest one.

    Example: /v3/artifacts/some_type/?property=gt:1&property=lt:10
    Returns all the artifacts having the value of "property" greater
    than 1 and less than 10.

    ApiImpact
    FastTrack

    Closes-Bug: #1480392

    Change-Id: I6fda6b0b6ee6a1da1d0eba8fa9f766e74c4e70d4

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-rc1 → 11.0.0
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.