Artifacts: filtering by dictionary key is not working

Bug #1479700 reported by Alexander Tivelkov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Alexander Tivelkov

Bug Description

If we define an artifact type with a Dict property, it should be possible to list only those artifacts of this type which have a particular key present (i.e. set to any value). According to the initial spec it should be possible.

However, the query /v3/artifacts/my_type/v1?property=key returns an HTTP 500

Also, I expect to be able to filter artifacts by a particular key-value combination, e.g. with a request like
"/v3/artifacts/my_type/v1?property=key.value"
This currently does not work as well, also resulting in HTTP 500

Tags: artifacts
Changed in glance:
assignee: nobody → Alexander Tivelkov (ativelkov)
description: updated
description: updated
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/207374

Changed in glance:
status: New → In Progress
tags: added: artifacts
Revision history for this message
Ekaterina Chernova (efedorova) wrote :

Migration murano to artifacts is blocked by this issue.

Changed in murano:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 2015.1.1
assignee: nobody → Alexander Tivelkov (ativelkov)
Changed in murano:
milestone: 2015.1.1 → liberty-rc1
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/207374
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=b3b75925e49bd0601471e702745c2c6ab272f4ff
Submitter: Jenkins
Branch: master

commit b3b75925e49bd0601471e702745c2c6ab272f4ff
Author: Alexander Tivelkov <email address hidden>
Date: Thu Jul 30 13:01:30 2015 +0300

    Artifacts are now properly filtered by dict props

    The ability to filter the artifacts list by the dict-based type-specific
    property was broken: the code which was intended to do it was trying to
    filter by 'name' property for some reason, thus returning an HTTP 500
    error.

    This patch fixes this issue, making sure the filtering on queries like
    ?property-name=key or ?property-name.key=value is working properly.

    FastTrack
    Closes-bug: #1479700

    Change-Id: I22adf9f8a2b69dc15cf1974c00be873b90e5e0d6

Changed in glance:
status: In Progress → Fix Committed
Changed in murano:
status: Confirmed → Fix Committed
no longer affects: murano
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.