Bug 1574530

Summary: Element <flag/> silently ignored in machine search
Product: [Retired] Beaker Reporter: Vilém Maršík <vmarsik>
Component: command lineAssignee: beaker-dev-list
Status: CLOSED WONTFIX QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-21 14:15:32 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 Vilém Maršík 2018-05-03 13:41:14 UTC
Description of problem:
"bkr system-list --xml-filter .." not working with <flag/>, but not writing an error either

Version-Release number of selected component (if applicable):
client version 24.3
server version 25.2

How reproducible:
100%

Steps to Reproduce / Actual results:
<flag/> looks to be silently ignored in the filter:
$ bkr system-list | wc -l
6790
$ bkr system-list  --xml-filter '<cpureq><flag value="rdrand" op="=="/></cpureq>'| wc -l
6790
$ bkr system-list  --xml-filter '<cpureq><flag value="rdrand" op="="/></cpureq>'| wc -l
6790
$ bkr system-list  --xml-filter '<cpureq><flag>rdrand</flag></cpureq>'| wc -l
6790

OTOH, filtering by CPU flags looks possible with key_value/CPUFLAGS:
$ bkr system-list  --xml-filter '<key_value key="CPUFLAGS" op="=" value="rdrand"/>' | wc -l
1816

Expected results:
Values filtered, or error displayed for incorrect XML syntax.


Additional info:
1. XML elements according to https://beaker-project.org/docs/_downloads/beaker-job.rng . Do we have already have a better documentation?
2. it is confusing that the "--xml-filter" only accepts inline XML and no XML files - without writing any complaint again