Bug 813860

Summary: Incorrect examples in documentation (Running the RHQ CLI)
Product: [Other] RHQ Project Reporter: Filip Brychta <fbrychta>
Component: CLI, DocumentationAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: medium    
Version: unspecifiedCC: dlackey, hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-04 02:20:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.