summaryrefslogtreecommitdiff
path: root/keystoneclient/v2_0
diff options
context:
space:
mode:
authorBoris Bobrov <bbobrov@mirantis.com>2016-07-29 16:17:44 +0300
committerBoris Bobrov <bbobrov@mirantis.com>2016-07-29 16:17:44 +0300
commit2b3258dcd0581e3a1291bd0e9277698b5631dced (patch)
treef82809ef4f93ca429dcf0f9f2875d0a414d352d1 /keystoneclient/v2_0
parent64a388caa7df21a701719a25c20b7c62e9de96de (diff)
downloadpython-keystoneclient-2b3258dcd0581e3a1291bd0e9277698b5631dced.tar.gz
Do not send user ids as payload
User ids are already in the URL. Keystone doesn't consume ids in the body. Change-Id: Ie90ebd32fe584dd1b360dc75a828316b1a9aedde Closes-Bug: 1607751
Diffstat (limited to 'keystoneclient/v2_0')
-rw-r--r--keystoneclient/v2_0/users.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/keystoneclient/v2_0/users.py b/keystoneclient/v2_0/users.py
index b791166..f663626 100644
--- a/keystoneclient/v2_0/users.py
+++ b/keystoneclient/v2_0/users.py
@@ -53,22 +53,19 @@ class UserManager(base.ManagerWithFind):
# FIXME(gabriel): "tenantId" seems to be accepted by the API but
# fails to actually update the default tenant.
params = {"user": kwargs}
- params['user']['id'] = base.getid(user)
url = "/users/%s" % base.getid(user)
return self._update(url, params, "user")
def update_enabled(self, user, enabled):
"""Update enabled-ness."""
- params = {"user": {"id": base.getid(user),
- "enabled": enabled}}
+ params = {"user": {"enabled": enabled}}
self._update("/users/%s/OS-KSADM/enabled" % base.getid(user), params,
"user")
def update_password(self, user, password):
"""Update password."""
- params = {"user": {"id": base.getid(user),
- "password": password}}
+ params = {"user": {"password": password}}
return self._update("/users/%s/OS-KSADM/password" % base.getid(user),
params, "user", log=False)
@@ -87,8 +84,7 @@ class UserManager(base.ManagerWithFind):
def update_tenant(self, user, tenant):
"""Update default tenant."""
- params = {"user": {"id": base.getid(user),
- "tenantId": base.getid(tenant)}}
+ params = {"user": {"tenantId": base.getid(tenant)}}
# FIXME(ja): seems like a bad url - default tenant is an attribute
# not a subresource!???