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
This commit is contained in:
@@ -75,7 +75,8 @@ class UserManager(base.ManagerWithFind):
|
|||||||
params = {"user": {"password": passwd,
|
params = {"user": {"password": passwd,
|
||||||
"original_password": origpasswd}}
|
"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",
|
response_key="access",
|
||||||
method="PATCH",
|
method="PATCH",
|
||||||
endpoint_filter={'interface': 'public'},
|
endpoint_filter={'interface': 'public'},
|
||||||
|
@@ -40,7 +40,8 @@ class AccessTokenManager(base.CrudManager):
|
|||||||
resource_owner_secret=request_secret,
|
resource_owner_secret=request_secret,
|
||||||
signature_method=oauth1.SIGNATURE_HMAC,
|
signature_method=oauth1.SIGNATURE_HMAC,
|
||||||
verifier=verifier)
|
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,
|
url, headers, body = oauth_client.sign(url + endpoint,
|
||||||
http_method='POST')
|
http_method='POST')
|
||||||
resp, body = self.client.post(endpoint, headers=headers)
|
resp, body = self.client.post(endpoint, headers=headers)
|
||||||
|
@@ -63,7 +63,8 @@ class RequestTokenManager(base.CrudManager):
|
|||||||
client_secret=consumer_secret,
|
client_secret=consumer_secret,
|
||||||
signature_method=oauth1.SIGNATURE_HMAC,
|
signature_method=oauth1.SIGNATURE_HMAC,
|
||||||
callback_uri="oob")
|
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,
|
url, headers, body = oauth_client.sign(url + endpoint,
|
||||||
http_method='POST',
|
http_method='POST',
|
||||||
headers=headers)
|
headers=headers)
|
||||||
|
@@ -156,7 +156,7 @@ class UserManager(base.CrudManager):
|
|||||||
params = {'user': {'password': new_password,
|
params = {'user': {'password': new_password,
|
||||||
'original_password': old_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,
|
return self._update(base_url, params, method='POST', log=False,
|
||||||
endpoint_filter={'interface': 'public'})
|
endpoint_filter={'interface': 'public'})
|
||||||
|
Reference in New Issue
Block a user