Bug 737823 - [PATCH] workflow-xslt: Implement support for boolean arguments
Summary: [PATCH] workflow-xslt: Implement support for boolean arguments
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: command line
Version: 0.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
Assignee: Bill Peck
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-13 08:01 UTC by David Sommerseth
Modified: 2019-05-22 13:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-20 06:19:10 UTC


Attachments (Terms of Use)

Description David Sommerseth 2011-09-13 08:01:16 UTC
New feature for workflow-xslt:

workflow-xslt: Implement support for boolean arguments

This patch implements support for defining boolean argument types
in the job XML configuration. When this is used, workflow-xslt will
setup an argument which takes no options. When this option is present
the resulting XML file will use the value 'true' in the corresponding
XML tag/attribute.

Signed-off-by: David Sommerseth <davids@redhat.com>


http://beaker-gerrit.app.eng.bne.redhat.com/#change,669

Comment 2 Raymond Mancy 2011-09-20 03:47:44 UTC
I tried to run and verify this change on my local box, and I think it works as expected,

I used the example-job.xml from the man page and added: 

  <arg section="recipe" type="bool">
    <name>foo</name>
    <metavar>ENABLE-FOO</metavar>
    <default>false</default>
    <tag type="attribute" attrname="foo">name</tag>
    <description>foo identifier</description
  </arg>

And then ran the following:

  bkr workflow-xslt --dry-run --job-xml example_job.xml --save-internal-xml  example.xml -i 99 -n "Example" -g "Group1" --phone-numbers 123,456,789 --foo

The results it spat out was:

  <submit>
    <whiteboard/>
    <recipe>
      <phones>
        <number>123</number>
        <number>456</number>
        <number>789</number>
      </phones>
      <name foo="true" group="Group1" version="99">Example</name>
    </recipe>
  </submit>

This seems fine to me.

Comment 3 David Sommerseth 2011-09-20 09:23:30 UTC
ACK.  This is exactly how this feature is designed to work.


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