Bug 868763 - Bad output format for rhc help
Bad output format for rhc help
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-22 01:22 EDT by Rony Gong
Modified: 2015-05-14 22:07 EDT (History)
3 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Rony Gong 2012-10-22 01:22:15 EDT
Description of problem:
The output of all rhc command help is very bad format, dosen't obey the left Align rule.

Version-Release number of selected component (if applicable):
devenv_2360
rhc-0.99.10.gem

How reproducible:
always

Steps to Reproduce:
1.rhc -h
2.
3.
  
Actual results:
[qgong@localhost ~]$ rhc -h
Usage: rhc (<resource> | --help) [<action>] [<args>]Command line interface for OpenShift.List of Commands and Resources  alias              Add or remove a custom domain name for the application  app                Commands for creating and managing applications  cartridge          Manage your application cartridges  domain             Manage the domain and namespace for your applications.  port-forward       Forward remote ports to the workstation  server             Display information about the status of the OpenShift service.  setup              Easy to use wizard for getting started with OpenShift.  snapshot           Pull down application snapshot for a user.  sshkey             Manage multiple keys for the registered rhcloud user.  tail               Tail the logs of an application  threaddump         Trigger a thread dump for JBossAS, JBossEAP, and Ruby applications.Global Options  -l, --rhlogin login       OpenShift login  -p, --password password   OpenShift password  -d, --debug               Turn on debugging  --noprompt                Suppress the interactive setup wizard from running before a command  --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 commandsSee 'rhc help <resource>' for more specifics on each resource or command.


Expected results:
Usage: 
rhc (<resource> | --help) [<action>] [<args>]Command line interface for OpenShift.
List of Commands and Resources  
alias              Add or remove a custom domain name for the application  
app                Commands for creating and managing applications  
cartridge          Manage your application cartridges  
domain             Manage the domain and namespace for your applications.  
port-forward       Forward remote ports to the workstation  
server             Display information about the status of the OpenShift service.  
setup              Easy to use wizard for getting started with OpenShift.  
snapshot           Pull down application snapshot for a user.  
sshkey             Manage multiple keys for the registered rhcloud user.  
tail               Tail the logs of an application  
threaddump         Trigger a thread dump for JBossAS, JBossEAP, and Ruby applications.

Global Options  
-l, --rhlogin login       OpenShift login  
-p, --password password   OpenShift password  
-d, --debug               Turn on debugging  
--noprompt                Suppress the interactive setup wizard from running before a command  
--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 
commandsSee 'rhc help <resource>' for more specifics on each resource or command.


Additional info:
Comment 1 Rony Gong 2012-10-22 03:18:50 EDT
Also bad format for others, like:
[qgong@localhost qzend]$ rhc sshkey list

RESULT:
Password: 

       Name: default       Type: ssh-rsaFingerprint: ab:14:6e:48:e1:25:1a:dc:af:04:d6:e2:e4:7b:6b:02       Name: Win7x64PC       Type: ssh-rsaFingerprint: 38:a3:f0:91:db:37:08:0b:92:2a:d4:7e:42:ea:7f:2e       Name: qtest2       Type: ssh-rsaFingerprint: b5:e7:6c:f5:4a:33:1f:b9:4e:0f:27:9f:2e:70:61:92
Comment 2 John (J5) Palmieri 2012-10-22 09:41:09 EDT
Looks like the wrap command is being to greedy when stripping \n

Make sure we add back the last \n for each line when recomposing the wrapped line
Comment 3 Xiaoli Tian 2012-10-23 02:51:01 EDT
Move it to ON_QA since pull request https://github.com/openshift/rhc/pull/194 is merged in devenv_2365.
Comment 4 Chandrika Gole 2012-10-23 19:14:52 EDT
[root@ip-10-127-154-68 ~]# rhc -h
Usage: rhc (<resource> | --help) [<action>] [<args>]
Command line interface for OpenShift.

List of Commands and Resources
  alias              Add or remove a custom domain name for the application
  app                Commands for creating and managing applications
  cartridge          Manage your application cartridges
  domain             Manage the domain and namespace for your applications.
  port-forward       Forward remote ports to the workstation
  server             Display information about the status of the OpenShift service.
  setup              Easy to use wizard for getting started with OpenShift.
  snapshot           Pull down application snapshot for a user.
  sshkey             Manage multiple keys for the registered rhcloud user.
  tail               Tail the logs of an application
  threaddump         Trigger a thread dump for JBoss and Ruby applications.

Global Options
  -l, --rhlogin login       OpenShift login
  -p, --password password   OpenShift password
  -d, --debug               Turn on debugging
  --noprompt                Suppress the interactive setup wizard from running before a command
  --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

See 'rhc help <resource>' for more specifics on each resource or command.
[root@ip-10-127-154-68 ~]# rhc sshkey list

RESULT:
Password:


       Name: default
       Type: ssh-rsa
Fingerprint: a1:fa:21:57:c1:49:d5:63:7c:27:f4:63:c1:70:1a:89

       Name: cgoleip101271546
       Type: ssh-rsa
Fingerprint: 6e:54:fd:e1:7d:56:79:98:52:75:2d:50:02:7a:02:cc

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