Bug 839820

Summary: beaker-pxemenu: no way to select union of two tags
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: schedulerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.9CC: bpeck, dcallagh, rmancy, stl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-09 08:07:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.