Bug 1308643 - [Beaker 22.1][RFE restraint] xslt template to strip beaker jobs to create a valid restraint xml
[Beaker 22.1][RFE restraint] xslt template to strip beaker jobs to create a v...
Status: CLOSED NEXTRELEASE
Product: Restraint
Classification: Community
Component: general (Show other bugs)
0.1.23
Unspecified Unspecified
unspecified Severity unspecified
: 0.1.24
: ---
Assigned To: Artem Savkov
tools-bugs
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-15 11:44 EST by PaulB
Modified: 2016-04-20 20:50 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-18 14:57:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description PaulB 2016-02-15 11:44:12 EST
Description of problem:
 Previously one could export a Beaker xml and use the "unmodified xml" to run
testing on a remote host using restraint. The restraint command now fails if the xml contains elements or attributes that are not listed in 
usr/share/restraint/client/job_schema.rng.

Version-Release number of selected component (if applicable):
Beaker: 22.1
restraint: 0.1.23-2.el6eso.x86_64

Actual results:
The restraint command now fails if xml contains elements or attributes that are not listed in usr/share/restraint/client/job_schema.rng.

I see that the following restraint option now exists:
  -n, --novalidate (Do not perform xml validation)

Expected results:
Can you include an xslt template to strip beaker jobs to create a valid 
restraint xml.

Additional info:
Comment 1 PaulB 2016-02-15 11:48:43 EST
All,
Somebody moved the cheese ;)

[pbunyan@Desktop]$ cat restraint_cheese 
[root@Remote~]# restraint --help
Usage:
  restraint [OPTION...]

Test harness for Beaker. Runs tasks according to a job 
and collects their results.

Help Options:
  -h, --help                                                     
Show help options

Application Options:
  -6, --ipv6                                                     Use IPV6 for communication
  -p, --port=PORT                                                Specify the port to listen on
  -j, --job=FILE                                                 Run job from file
  -r, --run=DIR                                                  Continue interrupted job from DIR
  -n, --novalidate                                               Do not perform xml validation
  -t, --host=<recipe_id>=[<user>@]<host>[:<port>][/ssh_port]     Set host for a recipe with specific id.
  -v, --verbose                                                  Increase verbosity, up to three times.

[root@Remote ~]# 

[root@Remote xmls]# rpm -ql restraint-client
/usr/bin/restraint
/usr/share/restraint/client/bootstrap/LICENSE
/usr/share/restraint/client/bootstrap/README
/usr/share/restraint/client/bootstrap/bootstrap.min.css
/usr/share/restraint/client/job2html.xml
/usr/share/restraint/client/job2junit.xml
/usr/share/restraint/client/job_schema.rng
[root@Remote xmls]# 

[root@Remote xmls]# cat /usr/share/restraint/client/job_schema.rng
<element name="job" xmlns="http://relaxng.org/ns/structure/1.0">
  <oneOrMore>
    <element name="recipeSet">
      <oneOrMore>
        <element name="recipe">
          <optional>
            <attribute name="id"/>
          </optional>
          <optional>
            <attribute name="whiteboard"/>
          </optional>
          <optional>
            <attribute name="role"/>
          </optional>
          <oneOrMore>
            <element name="task">
              <optional>
                <attribute name="name"/>
              </optional>
              <optional>
                <attribute name="role"/>
              </optional>
              <interleave>
                <optional>
                  <element name="params">
                    <zeroOrMore>
                      <element name="param">
                        <group>
                          <attribute name="name"/>
                          <attribute name="value"/>
                        </group>
                      </element>
                    </zeroOrMore>
                  </element>
                </optional>
                <choice>
                  <element name="rpm">
                    <attribute name="name"/>
                    <attribute name="path"/>
                  </element>
                  <element name="fetch">
                    <attribute name="url"/>
                  </element>
                </choice>
              </interleave>
            </element>
          </oneOrMore>
        </element>
      </oneOrMore>
    </element>
  </oneOrMore>
</element>
[root@Remote xmls]#
[pbunyan@Desktop]$ 


Best,
-pbunyan
Comment 2 Artem Savkov 2016-02-16 11:37:53 EST
https://gerrit.beaker-project.org/#/c/4688/

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