Bug 1472981 - python-openstackclient: running "openstack --os-token" fails with __init__() got an unexpected keyword argument 'token'
Summary: python-openstackclient: running "openstack --os-token" fails with __init__() ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstackclient
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 12.0 (Pike)
Assignee: Julie Pichon
QA Contact: Shai Revivo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-19 17:39 UTC by Alexander Chuzhoy
Modified: 2017-08-23 21:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-23 21:39:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alexander Chuzhoy 2017-07-19 17:39:22 UTC
python-openstackclient: running "openstack --os-token" fails with __init__() got an unexpected keyword argument 'token'

Environment:
python-openstackclient-3.11.0-0.20170613232431.c69304e.el7ost.noarch
instack-undercloud-7.1.1-0.20170710151630.el7ost.noarch
openstack-puppet-modules-10.0.0-0.20170315222135.0333c73.el7.1.noarch
openstack-tripleo-heat-templates-7.0.0-0.20170710191337.el7ost.noarch


Steps to reproduce:

on a deployed setup try to run:
openstack --os-token <token> --os-url <url> user list

Result:
__init__() got an unexpected keyword argument 'token'

Comment 1 Julie Pichon 2017-08-16 09:48:18 UTC
This seems to be working for me locally:

$ openstack --os-token $MY_TOKEN --os-url http://192.168.24.1:5000/v3 user list
+----------------------------------+------------------+
| ID                               | Name             |
+----------------------------------+------------------+
| 03686a4f8f5644dcb452efc235a73045 | neutron          |
| 1688126f64bb4265ad9d63d412541e89 | aodh             |
[...]
$ rpm -qa python-openstackclient
python-openstackclient-3.11.0-0.20170613232431.c69304e.el7ost.noarch

Does it work when explicitly setting the --os-auth-type flag to "token" or "admin_token"?
Do you have other OS_* OpenStack environment variables set, like a username?

Looking around I get the impression this not-ideal error message happens when there's a conflict between authentication methods (e.g. https://bugs.launchpad.net/devstack/+bug/1549095 ).

Comment 2 Alexander Chuzhoy 2017-08-23 21:39:13 UTC
Additional OS_ vars were initialized , which caused this.

Closing as not a bug.
Thanks a lot Julie.


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