Andrey Kurilin 6049be67c0 [CLI] Fix token auth type
There are 2 known issues which breaks token auth method in CLI:

* The wrong check of flag (the check should be for --os-token since
  arguments are not parsed at that moment) is performed in CLI inner method
  `_append_global_identity_args`. It led to usage of "password" auth
  type by default[1] even if `--os-token` cli argument is specified.
  If `--os-auth-type` is specified to token, keystoneauth1 library makes
  the right decision[2].

* Based on an auth type, keystoneauth library registers different CLI
  arguments[3]. It means that `--os-username` argument is available only
  in password auth type, `--os-token` is available only in token auth
  type, etc.
  It also affects the way in which the python code should access such
  arguments. The arguments which are unrelated to the selected auth type
  are omitted from the parsed arguments object.
  That sounds reasonable, but unfortunately the code assumes the
  unrelated arguments are always present which leads to an
  AttributeError.

Combination of these 2 issues made token auth type broken in CLI layer.

[1] ee2221f052/novaclient/shell.py (L255-L257)
[2] 14dd37b34c/keystoneauth1/loading/cli.py (L51-L52)
[3] 14dd37b34c/keystoneauth1/loading/cli.py (L65-L73)

Closes-Bug: #1659015
Change-Id: Ibc861d396b71fe105288d8336623cc22cf92523e
2018-04-19 18:43:45 +00:00
2018-04-04 00:08:52 +00:00
2018-04-19 18:43:45 +00:00
2014-05-07 12:16:41 -07:00
2017-03-23 14:55:17 -04:00
2018-03-22 17:57:39 -04:00
2015-09-08 10:10:25 -07:00
2011-08-08 13:25:29 -07:00
2017-03-06 01:18:45 +00:00
2018-03-22 17:57:39 -04:00

Team and repository tags

image

Python bindings to the OpenStack Compute API

Latest Version

Downloads

This is a client for the OpenStack Compute API. It provides a Python API (the novaclient module) and a command-line script (nova). Each implements 100% of the OpenStack Compute API.

Description
OpenStack Compute (Nova) Client
Readme 36 MiB
Languages
Python 100%