summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2015-07-24 14:14:00 -0500
committerBrant Knudson <bknudson@us.ibm.com>2015-07-26 06:54:22 -0500
commitfee5ba7432ff4b282aacbb8dafac948af2006f45 (patch)
tree1230461d2f48dcbf992faccbaf21b530599a3284
parentb1496abbb77360672d1d94e689513daeeb3cafd0 (diff)
downloadpython-keystoneclient-fee5ba7432ff4b282aacbb8dafac948af2006f45.tar.gz
Stop using Manager.api
base.Manager's api is documented as being deprecated, but there was still code using it. Deprecated function must not be used. bp deprecations Change-Id: I58678626b55f3cd11f4fdbcddbe4cc9461692fbf
-rw-r--r--keystoneclient/v2_0/users.py3
-rw-r--r--keystoneclient/v3/contrib/oauth1/access_tokens.py3
-rw-r--r--keystoneclient/v3/contrib/oauth1/request_tokens.py3
-rw-r--r--keystoneclient/v3/users.py2
4 files changed, 7 insertions, 4 deletions
diff --git a/keystoneclient/v2_0/users.py b/keystoneclient/v2_0/users.py
index 11e06f3..ccbaf2c 100644
--- a/keystoneclient/v2_0/users.py
+++ b/keystoneclient/v2_0/users.py
@@ -75,7 +75,8 @@ class UserManager(base.ManagerWithFind):
params = {"user": {"password": passwd,
"original_password": origpasswd}}
- return self._update("/OS-KSCRUD/users/%s" % self.api.user_id, params,
+ return self._update("/OS-KSCRUD/users/%s" % self.client.user_id,
+ params,
response_key="access",
method="PATCH",
endpoint_filter={'interface': 'public'},
diff --git a/keystoneclient/v3/contrib/oauth1/access_tokens.py b/keystoneclient/v3/contrib/oauth1/access_tokens.py
index 12b0c6b..d45bf3f 100644
--- a/keystoneclient/v3/contrib/oauth1/access_tokens.py
+++ b/keystoneclient/v3/contrib/oauth1/access_tokens.py
@@ -40,7 +40,8 @@ class AccessTokenManager(base.CrudManager):
resource_owner_secret=request_secret,
signature_method=oauth1.SIGNATURE_HMAC,
verifier=verifier)
- url = self.api.get_endpoint(interface=auth.AUTH_INTERFACE).rstrip('/')
+ url = self.client.get_endpoint(interface=auth.AUTH_INTERFACE).rstrip(
+ '/')
url, headers, body = oauth_client.sign(url + endpoint,
http_method='POST')
resp, body = self.client.post(endpoint, headers=headers)
diff --git a/keystoneclient/v3/contrib/oauth1/request_tokens.py b/keystoneclient/v3/contrib/oauth1/request_tokens.py
index 33ecc3a..27f79c1 100644
--- a/keystoneclient/v3/contrib/oauth1/request_tokens.py
+++ b/keystoneclient/v3/contrib/oauth1/request_tokens.py
@@ -63,7 +63,8 @@ class RequestTokenManager(base.CrudManager):
client_secret=consumer_secret,
signature_method=oauth1.SIGNATURE_HMAC,
callback_uri="oob")
- url = self.api.get_endpoint(interface=auth.AUTH_INTERFACE).rstrip("/")
+ url = self.client.get_endpoint(interface=auth.AUTH_INTERFACE).rstrip(
+ "/")
url, headers, body = oauth_client.sign(url + endpoint,
http_method='POST',
headers=headers)
diff --git a/keystoneclient/v3/users.py b/keystoneclient/v3/users.py
index 2e20ede..35c42cc 100644
--- a/keystoneclient/v3/users.py
+++ b/keystoneclient/v3/users.py
@@ -156,7 +156,7 @@ class UserManager(base.CrudManager):
params = {'user': {'password': new_password,
'original_password': old_password}}
- base_url = '/users/%s/password' % self.api.user_id
+ base_url = '/users/%s/password' % self.client.user_id
return self._update(base_url, params, method='POST', log=False,
endpoint_filter={'interface': 'public'})