Bug 840734 - AttributeError: 'JobConfig' object has no attribute 'jobxml_parsed'
AttributeError: 'JobConfig' object has no attribute 'jobxml_parsed'
Product: Beaker
Classification: Community
Component: command line (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.10.0
: ---
Assigned To: Nick Coghlan
Amit Saha
Depends On:
  Show dependency treegraph
Reported: 2012-07-17 02:13 EDT by Honggang LI
Modified: 2018-02-05 19:41 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-22 01:43:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Honggang LI 2012-07-17 02:13:41 EDT
Description of problem:

[lhg@lihg tmp]$ bkr workflow-xslt --dry-run demo-job.xml 
Traceback (most recent call last):
  File "/usr/bin/bkr", line 9, in <module>
    load_entry_point('bkr.client==0.9.0', 'console_scripts', 'bkr')()
  File "/usr/lib/python2.6/site-packages/bkr/client/main.py", line 45, in main
    return cmd.run(*cmd_args, **cmd_opts.__dict__)
  File "/usr/lib/python2.6/site-packages/bkr/client/commands/cmd_workflow_xslt.py", line 710, in run
  File "/usr/lib/python2.6/site-packages/bkr/client/commands/cmd_workflow_xslt.py", line 361, in ValidateArguments
    if self.jobxml_parsed is False:
AttributeError: 'JobConfig' object has no attribute 'jobxml_parsed'

[lhg@lihg tmp]$ cat demo-job.xml 
<?xml version="1.0"?>
  <name>Simple reserve workflow demonstration</name>
    <arg section="recipe" type="string">
      <name short="a">arch</name>
      <tag type="attribute" attrname="arch">system</tag>
    <arg section="recipe" type="string" optional="1">
      <name short="r">reserve-time</name>
      <tag type="value">reservetime</tag>
      <description>How long we should reserve the box</description>
[lhg@lihg tmp]$ cat demon.xsl 
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  <xsl:template match="/submit">
      <whiteboard>Beaker workflow-xslt demonstration</whiteboard>
      <xsl:apply-templates select="recipe"/>
  <xsl:template match="/submit/recipe">
      <recipe testrepo="devel" whiteboard="Reserve a test box">
            <arch op="=">
              <xsl:attribute name="value">
                <xsl:value-of select="system/@arch"/>
            <distro_name op="=" value="RHEL-6.2"/>
            <distro_variant op="=" value="Server"/>
            <distro_method op="=" value="nfs"/>
            <distro_arch op="=">
              <xsl:attribute name="value">
                <xsl:value-of select="system/@arch"/>
        <task name="/distribution/install" role="STANDALONE"/>
        <task name="/distribution/reservesys" role="STANDALONE">
            <param name="RESERVETIME">
              <xsl:attribute name="value">
                <xsl:value-of select="reservetime"/>

[lhg@lihg tmp]$ rpm -qfi $(which bkr)
Name        : beaker-client                Relocations: (not relocatable)
Version     : 0.9.0                             Vendor: Red Hat, Inc.
Release     : 7.el6eng                      Build Date: Mon 02 Jul 2012 10:04:43 AM CST
Install Date: Tue 17 Jul 2012 10:40:32 AM CST      Build Host: s390-004.build.bos.redhat.com
Group       : Applications/Internet         Source RPM: beaker-0.9.0-7.el6eng.src.rpm
Size        : 419699                           License: GPLv2+
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://fedorahosted.org/beaker
Summary     : Client component for talking to Beaker server
Description :
This is the command line interface used to interact with the Beaker Server.
[lhg@lihg tmp]$ 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 David Sommerseth 2012-07-17 04:45:18 EDT
Thanks a lot!  I've pushed out a patch for review: http://gerrit.beaker-project.org/#/c/1217/
Comment 2 Honggang LI 2012-07-17 22:38:35 EDT
Is there a new build of beaker-client that fixed this issue?
Comment 3 Dan Callaghan 2012-07-18 02:03:53 EDT
(In reply to comment #2)
> Is there a new build of beaker-client that fixed this issue?

David's patch is still being reviewed on Gerrit. This bug will transition to ON_QA when there is a build of beaker-client that includes the fix.
Comment 4 David Sommerseth 2012-07-18 04:52:22 EDT
(In reply to comment #2)
> Is there a new build of beaker-client that fixed this issue?

What this patch solves, is actually to provide a proper error message.  It will complain about missing --job-xml ... so you shouldn't be blocked by this issue if your command line says:

  $ bkr workflow-xslt --dry-run --job-xml demo-job.xml
Comment 6 Amit Saha 2012-11-09 00:09:03 EST
Verified to be fixed using the reporter's example files.

# bkr workflow-xslt --dry-run demo-job.xml
Usage: bkr workflow-xslt [options]

bkr: error: Missing --job-xml <filename>.  See --help for more information.
Comment 7 Raymond Mancy 2012-11-22 01:43:39 EST
This has now been released

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