Bug 813860 - Incorrect examples in documentation (Running the RHQ CLI)
Incorrect examples in documentation (Running the RHQ CLI)
Status: CLOSED NOTABUG
Product: RHQ Project
Classification: Other
Component: CLI, Documentation (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-18 11:33 EDT by Filip Brychta
Modified: 2016-02-03 21:20 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-03 21:20:01 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 Filip Brychta 2012-04-18 11:33:58 EDT
Description of problem:

Following examples from http://rhq-project.org/display/JOPR2/Running+the+RHQ+CLI are incorrect.


1- chapter RHQ CLI Command Line Options (subchapter Examples)
rhq-cli -u rhqadmin -u rhqadmin -c "pretty.print(ResourceTypeManager.findResourceTypesByCriteria(new ResourceTypeCriteria()))" > resource_types.txt

there are two options '-u', one of them should be '-p'

2- chapter Script Arguments (Handling Script Arguments example): 
if (args.length > 2) {              <<-- '>' should be '<'
    throw "Not enough arguments!";
}

for (i in args) {
    println('args[' + i '] = ' + args[i]); <<-- missing '+'
}

3- chapter Script Arguments (echo_args.js example)

for (i in args) {
    println('args[' + i '] = ' + args[i]);  <<-- missing '+'
}

4- chapter Script Arguments (box above echo_args.js example)
rhqadmin@localhost:7080$ exec -f echo_args.js --args-style=named x=1, y=2 
remove comma between 'x=1' and 'x=2'
Comment 1 Mike Foley 2012-04-23 12:11:06 EDT
setting priority to medium per BZ triage 4/23 (crouch, santos, oleary, foley)
Comment 2 Heiko W. Rupp 2013-09-04 05:44:38 EDT
Was that implemented, Deon?
Comment 3 Deon Ballard 2016-02-03 21:20:01 EST
The original wiki page no longer exists, and the CLI guide was rewritten. Closing.

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