When there is no session, because novaclient is using an auth plugin instead of keystone, the fix in doesn't work.
https://review.openstack.org/#/c/220192/
REQ: curl -g -i 'https://iad.servers.api.rackspacecloud.com/' -X GET -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Token: <removed>" RESP: [401] {'content-length': '0', 'via': '1.1 Repose (Repose/7.1.3.0)', 'server': 'Jetty(9.2.z-SNAPSHOT)', 'x-trans-id': 'c9ade6f3-54a4-42e8-92c7-09fbf8d16bbd', 'date': 'Wed, 09 Sep 2015 18:45:03 GMT', 'www-authenticate': 'Keystone uri=https://identity.api.rackspacecloud.com/v2.0'} RESP BODY: null
DEBUG (shell:901) Unauthorized (HTTP 401)
Traceback (most recent call last):
File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/shell.py", line 898, in main
OpenStackComputeShell().main(argv)
File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/shell.py", line 732, in main
api_version = api_versions.discover_version(self.cs, api_version)
File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/api_versions.py", line 253, in discover_version
client)
File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/api_versions.py", line 235, in _get_server_version_range
version = client.versions.get_current()
File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/v2/versions.py", line 61, in get_current
all_versions = self.list()
File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/v2/versions.py", line 80, in list
return self._list(version_url, "versions")
File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/base.py", line 72, in _list
_resp, body = self.api.client.get(url)
File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/client.py", line 445, in get
return self._cs_request(url, 'GET', **kwargs)
File "/Users/dani6186/.pyenv/versions/2.7.10/lib/python2.7/site-packages/novaclient/client.py", line 437, in _cs_request
raise e
Unauthorized: Unauthorized (HTTP 401)
ERROR (Unauthorized): Unauthorized (HTTP 401)
Reviewed: https:/ /review. openstack. org/221570 /git.openstack. org/cgit/ openstack/ python- novaclient/ commit/ ?id=b2221c8a702 0ac66197360f594 ba58b27434cf7d
Committed: https:/
Submitter: Jenkins
Branch: master
commit b2221c8a7020ac6 6197360f594ba58 b27434cf7d
Author: Daniel Wallace <email address hidden>
Date: Tue Sep 8 20:13:39 2015 -0500
Fix bugs with rackspace
not all apis have the versions available
Rackspace api does not open up for querying versions. This causes it to auth-plugin
still break when using the rackspace-
add tests for api_version Unauthorized
make sure that the list can still run even if the api_version check is
unauthorized.
Closes-Bug: #1493974 a0688aef989f133 7aee835b945
Closes-Bug: #1491579
Change-Id: I038b84bad5b747