Bug 813860 - Incorrect examples in documentation (Running the RHQ CLI)
Summary: Incorrect examples in documentation (Running the RHQ CLI)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI, Documentation
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-18 15:33 UTC by Filip Brychta
Modified: 2016-02-04 02:20 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-04 02:20:01 UTC
Embargoed:


Attachments (Terms of Use)

Description Filip Brychta 2012-04-18 15:33:58 UTC
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 16:11:06 UTC
setting priority to medium per BZ triage 4/23 (crouch, santos, oleary, foley)

Comment 2 Heiko W. Rupp 2013-09-04 09:44:38 UTC
Was that implemented, Deon?

Comment 3 Deon Ballard 2016-02-04 02:20:01 UTC
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.