Remove RAX-specific auth in cinderclient
Change-Id: Idd36694a322f467ba5e8c1f58bfac701bff8f3f8 Closes-Bug: #966329
This commit is contained in:
parent
e2642796b8
commit
fbee97cf19
@ -22,7 +22,6 @@ OpenStack Client interface. Handles the REST calls and responses.
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import urlparse
|
import urlparse
|
||||||
@ -296,10 +295,7 @@ class HTTPClient(object):
|
|||||||
auth_url = self.auth_url
|
auth_url = self.auth_url
|
||||||
if self.version == "v2.0":
|
if self.version == "v2.0":
|
||||||
while auth_url:
|
while auth_url:
|
||||||
if "CINDER_RAX_AUTH" in os.environ:
|
auth_url = self._v2_auth(auth_url)
|
||||||
auth_url = self._rax_auth(auth_url)
|
|
||||||
else:
|
|
||||||
auth_url = self._v2_auth(auth_url)
|
|
||||||
|
|
||||||
# Are we acting on behalf of another user via an
|
# Are we acting on behalf of another user via an
|
||||||
# existing token? If so, our actual endpoints may
|
# existing token? If so, our actual endpoints may
|
||||||
@ -358,16 +354,6 @@ class HTTPClient(object):
|
|||||||
|
|
||||||
self._authenticate(url, body)
|
self._authenticate(url, body)
|
||||||
|
|
||||||
def _rax_auth(self, url):
|
|
||||||
"""Authenticate against the Rackspace auth service."""
|
|
||||||
body = {"auth": {
|
|
||||||
"RAX-KSKEY:apiKeyCredentials": {
|
|
||||||
"username": self.user,
|
|
||||||
"apiKey": self.password,
|
|
||||||
"tenantName": self.projectid}}}
|
|
||||||
|
|
||||||
self._authenticate(url, body)
|
|
||||||
|
|
||||||
def _authenticate(self, url, body):
|
def _authenticate(self, url, body):
|
||||||
"""Authenticate and extract the service catalog."""
|
"""Authenticate and extract the service catalog."""
|
||||||
token_url = url + "/tokens"
|
token_url = url + "/tokens"
|
||||||
|
@ -33,6 +33,7 @@ MASTER
|
|||||||
------
|
------
|
||||||
* Add support for reset-state on multiple volumes or snapshots at once
|
* Add support for reset-state on multiple volumes or snapshots at once
|
||||||
|
|
||||||
|
.. _966329: https://bugs.launchpad.net/python-cinderclient/+bug/966329
|
||||||
.. _1265893: https://bugs.launchpad.net/python-cinderclient/+bug/1265893
|
.. _1265893: https://bugs.launchpad.net/python-cinderclient/+bug/1265893
|
||||||
.. _1256043: https://bugs.launchpad.net/python-cinderclient/+bug/1256043
|
.. _1256043: https://bugs.launchpad.net/python-cinderclient/+bug/1256043
|
||||||
.. _1254951: http://bugs.launchpad.net/python-cinderclient/+bug/1254951
|
.. _1254951: http://bugs.launchpad.net/python-cinderclient/+bug/1254951
|
||||||
|
Loading…
x
Reference in New Issue
Block a user