Updating objects in Keystone using v3 API http patch error
I've been trying update objects in keystone with the v3 API but keep receiving the same kind of message. For example,
if i try to change the password of a user or if i try to change the description on a domain. It all boils down to takes exactly 4 non-keyword arguments...3 given
I'm completely lost as to why this is failing as it's following the same patterns explained in this API doc: http://developer.openstack.org/api-re...
Prove that the object does exist:
INFO: 1 * Sending client request on thread main
1 > GET https://135.121.18.47:35357/v3/domains/f50f4689424d4a2ba6254924d0edb8d4
1 > X-Auth-Token: password
INFO: 2 * Client response received on thread main
2 < 200
2 < Connection: keep-alive
2 < Content-Length: 186
2 < Content-Type: application/json
2 < Date: Sat, 23 Aug 2014 20:56:15 GMT
2 < Vary: X-Auth-Token
{"domain": {"enabled": true, "id": "f50f4689424d4a2ba6254924d0edb8d4", "links": {"self": "https://135.121.18.47:35357/v3/domains/f50f4689424d4a2ba6254924d0edb8d4"}, "name": "wscDomain"}}
Update the description for the domain
INFO: 1 * Sending client request on thread main
1 > PATCH https://XXXX:35357/v3/domains/f50f4689424d4a2ba6254924d0edb8d4
1 > Content-Type: application/json
1 > X-Auth-Token: password
{
"domain" : {
"description" : "new description",
"enabled" : true
}
}
INFO: 2 * Client response received on thread main
2 < 400
2 < Connection: keep-alive
2 < Content-Length: 126
2 < Content-Type: application/json
2 < Date: Sat, 23 Aug 2014 20:56:15 GMT
2 < Vary: X-Auth-Token
{"error": {"message": "update_domain() takes exactly 4 non-keyword arguments (3 given)", "code": 400, "title": "Bad Request"}}
Here's the keystone log entries:
2014-08-23 21:04:12.243 1265 ERROR keystone.common.wsgi [-] update_domain() takes exactly 4 non-keyword arguments (3 given)
2014-08-23 21:04:12.243 1265 TRACE keystone.common.wsgi Traceback (most recent call last):
2014-08-23 21:04:12.243 1265 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/common/wsgi.py", line 207, in __call__
2014-08-23 21:04:12.243 1265 TRACE keystone.common.wsgi result = method(context, **params)
2014-08-23 21:04:12.243 1265 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/common/controller.py", line 152, in inner
2014-08-23 21:04:12.243 1265 TRACE keystone.common.wsgi return f(self, context, *args, **kwargs)
2014-08-23 21:04:12.243 1265 TRACE keystone.common.wsgi TypeError: update_domain() takes exactly 4 non-keyword arguments (3 given)
Here's my current situation (dev enviroment - passwords/id aren't important):
Role called 'admin'
Domain called 'testDomain'
Project called 'projectTest'
User called 'admin' with password 'admin' created in the domain 'testDomain' and has been assigned role 'admin'
I'm trying to change project enabled from true to false. Here's all the output.
###################################################
FETCHING TOKEN AS USER ADMIN, WITH THE SCOPE OF THE DOMAIN
###################################################
Aug 25, 2014 11:51:59 AM org.glassfish.jersey.filter.LoggingFilter log
INFO: 1 * Sending client request on thread main
1 > POST https://x.x.x.x:35357/v3/auth/tokens
1 > Content-Type: application/json
{
"auth" : {
"identity" : {
"methods" : [ "password" ],
"password" : {
"user" : {
"name" : "admin",
"domain" : {
"id" : "f50f4689424d4a2ba6254924d0edb8d4"
},
"password" : "admin"
}
}
},
"scope" : {
"domain" : {
"id" : "f50f4689424d4a2ba6254924d0edb8d4"
}
}
}
}
Aug 25 ...