Adam Young wrote:
Joint effort between me and Rob in getting this to work.
I've tested it with the following data:
[ayo...@ipa freeipa]$ cat ../bulk_request.json
{"method":"bulk","params":[[
{"method":"json_metadata","params":[[],{}]},
{"method":"user_find","params":[[],{"whoami":" true","all":"true"}]},
{"method":"user_show","params":[["admin"],{"all":true}],"id":4}
],{}],"id":1}
Called this way:
curl -H "Content-Type:application/json" -H "Accept:applicaton/json" -H
"Accept-Language:en" --negotiate -u : --cacert /etc/ipa/ca.crt -d
@../bulk_request.json -X POST http://localhost:8888/ipa/json
This needs a test, but that will be a follow on patch.
nack, I think this needs a bit more work before we push it. There are no
doc strings for the arguments, no documentation at all really. At a
minimum the example you have in this e-mail would be handy to have in
the plugin.
Do we want to expose this to the command-line or keep it for json only?
I can see admins wanting to use this for the cli but I have no clue how
we'd pass in the arguments :-)
This includes some apparently unrelated changes to internal.py
The List argument is actually a comma-separated list, not a python list.
It works, I suppose, but I'm not sure it is the right thing. In fact,
I'm not sure what the right param type is in this case.
I know I'm the one that suggested setting an empty error on success, I
wonder if that is really needed. Adam, would you use this to determine
if you have an actual response or not?
This code bothered me when I wrote it last night but I was in "make it
work" mode. There has to be a more elegant way. The incoming dict keys
are unicode, we need them to be strings:
+ newkw = {}
+ for k in kw:
+ newkw[str(k)] = kw[k]
rob
_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel