Bug 1122702 - "rhc server add" with --no-use-authorization-tokens does not work as expected
Summary: "rhc server add" with --no-use-authorization-tokens does not work as expected
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-23 19:52 UTC by Brenton Leanhardt
Modified: 2015-05-15 02:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-10-10 00:49:33 UTC

Attachments (Terms of Use)

Description Brenton Leanhardt 2014-07-23 19:52:10 UTC
Description of problem:

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

rhc 1.28.1

How reproducible:

Steps to Reproduce:
1. cat ~/.openshift/servers.yml

- server:
    hostname: openshift.redhat.com
    nickname: online
    login: XXXXX
    use_authorization_tokens: true
    insecure: false

2. rhc server add server2 --no-use-authorization-tokens

Actual results:

Generate a token now? (yes|no)

Expected results:

We shouldn't ask that question if we aren't using authorization tokens.

Additional info:

It seems like part of the problem is that the setup wizard has a --create-token option and the server function has a --use-authorization-tokens option.  The latter does not pass through wizard_to_server function.

Comment 1 Brenton Leanhardt 2014-07-23 19:55:31 UTC
Possible fix: https://github.com/openshift/rhc/pull/631

Comment 2 Fabiano Franz 2014-07-24 15:37:13 UTC
Fixed in https://github.com/openshift/rhc/pull/631

Comment 3 openshift-github-bot 2014-07-24 16:38:31 UTC
Commit pushed to master at https://github.com/openshift/rhc

Bug 1122702 - "rhc server add" with --no-use-authorization-tokens does not work as expected

Comment 4 XiuJuan Wang 2014-07-25 03:15:06 UTC
Checked with rhc-1.28.2

1. If add server with --no-use-authorization-tokens,will don't ask 'generate a token' question, just skip it.And the parameter in server.yml sets to false.

use_authorization_tokens: false

2. If add server with/without --use-authorization-tokens,will ask the question.

use_authorization_tokens: ture

move bug to verified.

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