Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 996522

Summary: "rhc authorization delete all" command doesn't work
Product: OpenShift Container Platform Reporter: Ma xiaoqiang <xiama>
Component: ocAssignee: Miciah Dashiel Butler Masters <mmasters>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 1.2.1CC: baulakh, bleanhar, jforrest, jialiu, libra-onpremise-devel, lzhang, wsun, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Minor bugs and inconsistent command options in the client tools caused confusion for users. Fixes to the –help option for some CLI commands, new command aliases, and changes to the default action for the “rhc cartridge” command in the current release of OpenShift Enterprise alleviates some of the confusion for users.
Story Points: ---
Clone Of: 974439 Environment:
Last Closed: 2013-09-05 13:24:17 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:
Embargoed:
Bug Depends On: 974439    
Bug Blocks:    

Description Ma xiaoqiang 2013-08-13 11:01:50 UTC
This problem is existing in 1.2/2013-08-12.3 puddle build
# rhc --version
rhc 1.9.6

+++ This bug was initially created as a clone of Bug #974439 +++

Description of problem:
"rhc authorization delete -h" has "all" action, but "rhc authorization delete all" doesn't work. "rhc authorization delete all -h" displays "Usage: rhc authorization-delete-all", and "rhc authorization-delete-all" can work well.

Version-Release number of selected component (if applicable):
devenv_3360
rhc-1.10.1 build from devenv_3358

How reproducible:
always

Steps to Reproduce:
1.rhc authorization delete all
2.
3.

Actual results:
"rhc authorization delete all" is an alias of "rhc authorization-delete-all" should work well. 

Expected results:
"rhc authorization delete all" command doesn't work 

Additional info:

--- Additional comment from Jessica Forrester on 2013-06-14 17:26:03 EDT ---

"rhc authorization delete all" is not a valid command, you have to do "rhc authorization delete-all".  The command "rhc authorization delete -h" has been fixed to not report the "all" action.

Fix in https://github.com/openshift/rhc/pull/402

--- Additional comment from openshift-github-bot on 2013-06-17 12:23:16 EDT ---

Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/e578d35e8bbc9243519c8ea2d24a94f5edce8ce9
Bug 974439 - add testcase

--- Additional comment from openshift-github-bot on 2013-06-17 15:32:55 EDT ---

Commits pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/0929bd00acab5c1ab32d6f4e79a67b5b4ed29a09
Bug 974439 - fix rhc help issues

Add new spec test for authorizations list command

Add rhc alias_action from aliases to alias list

https://github.com/openshift/rhc/commit/d55ed81cbc657483748c09658da5fec0ba400e94
Bug 974439 - review feedback

--- Additional comment from Lei Zhang on 2013-06-18 03:09:14 EDT ---

Test on deven_3375 and rch-1.10.2, "rhc authorization delete -h" has been changed, so verify this bug, log as following:

[rayzhang@rayzhang Work]$ rhc authorization delete -h
Usage: rhc authorization-delete <token_or_id> [...<token_or_id>]

Delete one or more of the authorization tokens associated with your account. After deletion, any clients using the token will no longer have access to
OpenShift and will need to reauthenticate.


Options
  --auth-token TOKEN        The token you wish to delete

Global Options
  -l, --rhlogin LOGIN       OpenShift login
  -p, --password PASSWORD   OpenShift password
  --token TOKEN             An authorization token for accessing your account.
  --server NAME             An OpenShift server hostname (default: openshift.redhat.com)
  --timeout SECONDS         The timeout for operations

  See 'rhc help options' for a full list of global options.

[rayzhang@rayzhang Work]$ rhc authorization list
RHC/1.10.2 (from rayzhang on x86_64-linux)
------------------------------------------
  Token:      d994367d9fc88472c82e5e14502c6499c46929d004a564fb8b3b92cb703e6ac4
  Scopes:     session
  Created:    10:40 AM
  Expires In: about 22 hours

[rayzhang@rayzhang Work]$ rhc authorization delete --auth-token d994367d9fc88472c82e5e14502c6499c46929d004a564fb8b3b92cb703e6ac4
Deleting authorization ... done

[rayzhang@rayzhang Work]$ rhc authorization list
Your authorization token has expired. Please sign in now to continue.
Password: **********


RHC/1.10.2 (from rayzhang on x86_64-linux)
------------------------------------------
  Token:      0b606adea1a0812f04dade270f0f738c3b462357de4fdc7b699f04becf858a41
  Scopes:     session
  Created:    12:47 PM
  Expires In: about 24 hours

--- Additional comment from Wei Sun on 2013-06-18 03:25:47 EDT ---

According to #Comment 4,verify this bug.

Comment 2 Miciah Dashiel Butler Masters 2013-08-21 17:26:42 UTC
We need to pull both of these pull requests into Enterprise:

https://github.com/openshift/rhc/pull/402
https://github.com/openshift/rhc/pull/441

The first, <https://github.com/openshift/rhc/pull/402>, does the following:

• Fixes rhc's help output so that if a command 'foo' has both an action 'bar' and a hyphenated action 'bar-baz', the help output of `rhc foo bar` will not erroneously list 'baz' as an action.

• Fixes rhc's help output for management commands to show both options and actions rather than one or the other.

• Adds `rhc aliases`, which is an alias for `rhc alias list`.

• Adds `rhc authorizations list`, which is an alias for `rhc authorizations`.

The second, <https://github.com/openshift/rhc/pull/441>, does the following:

• Deletes the default action for `rhc cartridge` so that `rhc cartridge` just displays the help text with options and actions.

• Fixes a bug introduced by the first pull request where the help text for 'cartridges' in `rhc -h` randomly sometimes displays the summary of the 'cartridge' management command ('Manage your application cartridges') instead of the correct summary ('List available cartridges').

Comment 3 Miciah Dashiel Butler Masters 2013-08-22 02:06:17 UTC
https://github.com/openshift/enterprise-rhc/pull/1

Comment 5 Ma xiaoqiang 2013-08-23 04:28:07 UTC
Checked on puddle-1-2-2013-08-22, issue fixed:

 rhc authorization delete -h
Usage: rhc authorization-delete <token_or_id> [...<token_or_id>]

Delete one or more of the authorization tokens associated with your account. After deletion, any clients using the
token will no longer have access to OpenShift and will need to reauthenticate.

Options
  --auth-token TOKEN        The token you wish to delete

Global Options
  -l, --rhlogin LOGIN       OpenShift login
  -p, --password PASSWORD   OpenShift password
  --token TOKEN             An authorization token for accessing your account.
  --server NAME             An OpenShift server hostname (default: openshift.redhat.com)
  --timeout SECONDS         The timeout for operations

  See 'rhc help options' for a full list of global options.
move it to verified

Comment 8 errata-xmlrpc 2013-09-05 13:24:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1211.html