Bug 784996

Summary: JON 3.0.1 RC#1 CLI Doc Table 2.3 lists method on "rhq" that is not available
Product: [Other] RHQ Project Reporter: Mike Foley <mfoley>
Component: DocumentationAssignee: Deon Ballard <dlackey>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: 3.0.1CC: hrupp
Target Milestone: ---   
Target Release: JON 3.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-21 23:16:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 782579    

Description Mike Foley 2012-01-26 21:06:57 UTC
Description of problem: JON 3.0.1 RC#1  CLI Doc Table 2.3 lists method on "rhq" that is not available.  The documentation lists that the "rhq" object has the commands "login", "logout", and "quit".  Using tab completion, I observe that "rhq" only has the methods "login" and "logout" ... and that if one were to type "rhq.quit()" nothing happens anyways.  


Version-Release number of selected component (if applicable):  JON 3.0.1 RC#1


How reproducible:  100%


Steps to Reproduce:
1.  ./rhq-cli.sh -u rhqadmin -p rhqadmin

2.  type "rhq" ... then tab (for tab completion)
3.  observe that only the methods "login" and "logout" are on this object
4.  read the doc that says "login, logout, and quit" are on this object
5.  try "rhq.quit()" ... nothing happens
  
Actual results:  a documented method does not exist


Expected results:  the CLI documentation for the table in 2.3 accurately reflects the API


Additional info:

rhqadmin@localhost:7080$ rhq.log

login    logout

Comment 1 Mike Foley 2012-01-26 21:09:22 UTC
ditto above for the documented "DataAccess" object

Comment 2 Mike Foley 2012-01-30 16:25:49 UTC
12/30/2012 BZ triage meeting mfoley, ccrouch, loleary, asantos

Comment 3 Deon Ballard 2012-02-08 17:31:48 UTC
DataAccess should be DataAccessManager. I'm checking, but I think that's the only one missing the required "Manager" on the end.

Comment 4 Deon Ballard 2012-02-08 19:03:45 UTC
From what I understand from Ian and John, these commands are native to the CLI. I know the usage is ...

$ quit
$ logout
$ exec -f foo.js

So, you wouldn't really call rhq.quit. I don't know why rhq.login and rhq.logout seem to work; I did find those in the client API, so my guess is that those are public for some reason, but the other commands -- quit, exec, version -- aren't.

Anyway, I removed that rhq row from the table and move the information about the commands to the top of the CLI Commands section. login/logout/etc. are already covered in the Commands section, and it seems more confusing than helpful to have that table row there, especially since they aren't variables.

Comment 5 Deon Ballard 2012-02-23 20:45:22 UTC
Problem solved! rhq.login and rhq.logout can be called in a server-side script, while exec, version, and quit only work in the interactive CLI.

http://documentation-stage.bne.redhat.com/docs/en-US/JBoss_Operations_Network/100/html/Running_JON_Command-Line_Scripts/Running_the_CLI-Running_the_JON_CLI.html#Working_with_the_CLI-Implicit_Variables

Comment 6 Deon Ballard 2012-06-21 23:16:02 UTC
Closing.