dbapi should support filtering from a list

Bug #1472212 reported by Ramakrishnan G (rameshg87)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Wishlist
Ramakrishnan G (rameshg87)

Bug Description

Currently our dbapi doesn't support filtering out nodes whose values are in a list.

For example,

If I want all nodes reserved by conductors [c1,c2,...cn], there is no way, but to get the list of all nodes (matching other conditions) and iterate and do it in python. It would be much better if we supported a list so that we can get it done by the db itself.

Tags: db
Dmitry Tantsur (divius)
Changed in ironic:
status: New → Triaged
importance: Undecided → Wishlist
tags: added: db
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
assignee: nobody → Ramakrishnan G (rameshg87) (rameshg87)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/210325
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=1669d4d75f95f148503f9a3203b60b3af58f0f59
Submitter: Jenkins
Branch: master

commit 1669d4d75f95f148503f9a3203b60b3af58f0f59
Author: Ramakrishnan G <email address hidden>
Date: Fri Aug 7 10:46:27 2015 +0000

    Add better dbapi support for querying reservation

    This commit adds support for querying reservation of
    a node by a list of desired conductor names. It adds
    a new filter 'reserved_by_any_of' which is expected to
    be a list of conductors.

    Change-Id: I149eae115fd3267e9b9efdb99aca445e7b18ba03
    Closes-Bug: 1472212

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
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.