Bug 812916 - RFE: Print help for cli rhc app cartridge add
Summary: RFE: Print help for cli rhc app cartridge add
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: John (J5) Palmieri
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-16 14:49 UTC by Kenny Woodson
Modified: 2015-05-15 01:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-11 02:09:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kenny Woodson 2012-04-16 14:49:17 UTC
Description of problem:

When attempting to add a cartridge to my application it wasn't clear to me how to do so.  I ran the "rhc" command and it listed commands.  I then ran "rhc app" command.  It states the following about cartridge actions:
---
cartridge      <action>        Manage an embedded cartridge

List of cartridge actions
  list                           List of supported embedded cartridges
  add                            Add an embedded application
  remove                         Remove an embedded application
  stop                           Stop the embedded application
  start                          Start the embedded application
  restart                        Restart the embedded application
  status                         Returns embedded application status
  reload                         Reloads embedded application configuration
---
This output above is good.  The only problem is that I didn't see a list of cartridges to add so I then ran, "rhc app cartridge" and it output the following:
---

# rhc app cartridge 

List of supported embedded cartridges:

Obtaining list of cartridges (please excuse the delay)...
mongodb-2.0, cron-1.4, mysql-5.1, postgresql-8.4, haproxy-1.4, 10gen-mms-agent-0.1, phpmyadmin-3.4, metrics-0.1, rockmongo-1.1, jenkins-client-1.4
---

This is good for a  cartridge list but then I did not see any commands on how to interact with "rhc app cartridge".  It should repeat the same information that is in "rhc app" for cartridges.  This will simplify and improve the user experience.



Version-Release number of selected component (if applicable):
rhc-0.89.12-1.el6_2.noarch

How reproducible:



Steps to Reproduce:
1.
2.
3.
  
Actual results:

The printed menu wasn't helpful as it only listed the available cartridges.  


Expected results:

This should print a help menu for the cartridge command containing a list of actions available for the command and how to issue them.  

The help menu info for cartridge could be removed from "rhc app" and put into its own menu under "rhc app cartridge".  This would be even better for readability and understanding.

Additional info:

Give examples.  Those are worth 1000 words.

Comment 1 Abhishek Gupta 2012-06-22 19:27:57 UTC
Just a note: 

When you execute "rhc app cartridge" its not the help/usage that is being displayed, but rather the "rhc app cartridge list" command that is being executed as the "default". Hence examples perhaps don't belong there. If one is looking for help, one can run "rhc app cartridge --help". If this is getting confusing, we should get rid of these "default" operations and force the user to explicitly specify the command like "rhc app cartridge list" and display usage/help if the "list" action is missing.

On the other hand, what is really required, I believe is command level help - "rhc app cartridge --help" should give the usage/help info for cartridge operations only and "rhc app create --help" should give help on application creation. This was something that I just did not have time to implement when I first worked on the new CLI tools format. Though, command level help is a separate feature unto itself.

Comment 2 John (J5) Palmieri 2012-06-22 20:57:23 UTC
Command level help is something I have in mind for the reorg of the tools.  Moving to Commander should make this easier.  Every option should be specified with help documentation and the "usage" output should be compiled from that instead of us hard coding it as we do now.

I would like to punt this bug into the reorg story unless we think this is important enough to address in the legacy bits.

Comment 3 John (J5) Palmieri 2012-09-11 02:09:19 UTC
so in the new model rhc help cartridge or rhc cartridge help will print out help.  Closing this as wontfix for legacy.


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