Bug 860928 - [US2597][fork]Show exception when type rhc app
[US2597][fork]Show exception when type rhc app
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2012-09-27 02:25 EDT by Rony Gong
Modified: 2015-05-14 22:05 EDT (History)
3 users (show)

See Also:
Fixed In Version: fork_ami_US2597_US2599_US2813_US2817_US2872_186
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-06 13:49:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rony Gong 2012-09-27 02:25:17 EDT
Description of problem:
maybe here didn't define "help" method in code, so throw exception of undefined method `help, it should show the help list.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Type "rhc app"
Actual results:
[root@ip-10-93-11-197 usr]# rhc app
/usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/user_interaction.rb:237:in `method_missing': undefined method `help' for #<RHC::Commands::App:0x7fdaf0645c08> (NoMethodError)
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands/base.rb:199:in `send'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands/base.rb:199:in `run'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands.rb:103:in `send'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/commands.rb:103:in `to_commander'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/command_runner.rb:30:in `run!'
	from /usr/lib/ruby/gems/1.8/gems/commander-4.0.3/lib/commander/delegates.rb:7:in `run!'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/lib/rhc/cli.rb:40:in `start'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.99.3/bin/rhc:57
	from /usr/bin/rhc:19:in `load'
	from /usr/bin/rhc:19

Expected results:
Show like:
Missing or invalid command!
Obtaining list of cartridges (please excuse the delay)...

Usage: rhc app (<command> | cartridge <cartridge-action> | --help) [<args>]
Create and manage an OpenShift application.

List of commands
  create                         Create a new application on OpenShift
  show                           Display information about a user

Additional info:
Comment 1 John (J5) Palmieri 2012-09-28 18:28:49 EDT
added a generic help method which is called by default for rhc app
Comment 2 Rony Gong 2012-09-28 22:58:13 EDT
Verified on fork_ami_US2597_US259...US2817_US2872_186
openshift@openshift-ubuntu:~/rhc$ rhc app
Usage: rhc app <action>

Creates and controls an OpenShift application.  To see the list of all applications use the rhc domain show command.  Note that delete is
not reversible and will stop your application and then remove the application and repo from the remote server. No local changes are made.

List of Actions
  start              Start the application
  restart            Restart the application
  delete             Delete an application from the server
  show               Show information about an application
  status             Show status of an application's gears
  create             Create an application and adds it to a domain
  git-clone          Clone and configure an application's repository locally
  stop               Stop the application
  force-stop         Stops all application processes
  reload             Reload the application's configuration
  tidy               Clean out the application's logs and tmp directories and tidy up the git repo on the server

Global Options
  -l, --rhlogin login       OpenShift login
  -p, --password password   OpenShift password
  -d, --debug               Turn on debugging
  --noprompt                Do not ask for input
  --config FILE             Path of a different config file
  -h, --help                Display help documentation
  -v, --version             Display version information
  --timeout seconds         Set the timeout in seconds for network commands

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