Red Hat Bugzilla – Bug 839820
beaker-pxemenu: no way to select union of two tags
Last modified: 2012-08-09 04:07:02 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...
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..
added a little extra time to the estimate since there are some unknowns.
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>'
Beaker 0.9.2 has been released.