Bug 839820 - beaker-pxemenu: no way to select union of two tags
Summary: beaker-pxemenu: no way to select union of two tags
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Callaghan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-12 23:34 UTC by Dan Callaghan
Modified: 2019-05-22 13:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-09 08:07:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2012-07-12 23:34:19 UTC
If an admin wants to configure a PXE menu using the union of distro trees from two tags, there is no way to do that. Passing --tag=TAG1 --tag=TAG2 gives the intersection, not union (the two filters are AND'ed, not OR'ed).

beaker-pxemenu gets its list of distros from the get_distro_trees XML-RPC method on the lab controller which is proxied to labcontroller.get_distro_trees on the server, which calls the same code as distrotrees.filter.

Unfortunately I don't think we can just flip distrotrees.filter from AND'ing the tags to OR'ing them because both are equally useful and we might break somebody who is expecting them to be AND'ed. Once again we have reached a point where users want to submit arbitrarily complex queries but we have no good way of representing them...

Comment 1 Bill Peck 2012-07-13 11:45:25 UTC
Well.  we do have the xml query that does allow for this..

<or>
 <distro_tag op="=" value="TAG1"/>
 <distro_tag op="=" value="TAG2"/>
</or>

We just need to make the Distro.by_filter() method available via xmlrpc.

We should make System.by_filter() available too..

Comment 2 Bill Peck 2012-07-16 14:10:13 UTC
added a little extra time to the estimate since there are some unknowns.

Comment 3 Dan Callaghan 2012-08-01 04:50:05 UTC
On Gerrit: http://gerrit.beaker-project.org/1260

This patch exposes the distro XML filtering for beaker-pxemenu. To select the union of two tags, one could use:

beaker-pxemenu --xml-filter '<or><distro_tag value="TAG1"/><distro_tag value="TAG2" /></or>'

Comment 4 Dan Callaghan 2012-08-09 08:07:02 UTC
Beaker 0.9.2 has been released.


Note You need to log in before you can comment on or make changes to this bug.