Bug 839820 - beaker-pxemenu: no way to select union of two tags
beaker-pxemenu: no way to select union of two tags
Product: Beaker
Classification: Community
Component: scheduler (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.9.2
: ---
Assigned To: Dan Callaghan
Depends On:
  Show dependency treegraph
Reported: 2012-07-12 19:34 EDT by Dan Callaghan
Modified: 2012-08-09 04:07 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-09 04:07:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan Callaghan 2012-07-12 19:34:19 EDT
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 07:45:25 EDT
Well.  we do have the xml query that does allow for this..

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

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 10:10:13 EDT
added a little extra time to the estimate since there are some unknowns.
Comment 3 Dan Callaghan 2012-08-01 00:50:05 EDT
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 04:07:02 EDT
Beaker 0.9.2 has been released.

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