[Freeipa-users] call implemented methods via xml-rpc
ALAHYANE Rachid
afkkir at gmail.com
Mon Apr 19 14:22:14 UTC 2010
Hi,
Using F12 with the alpha version of ipa, I want to know if there is some
ways to call implemented methods like user_show() with my own script
python. My goal is to call these methods with a client xml-rpc that I will
to developpe later.
On my client, I tried this but it does not work :(
----------------------------------------------------------------------------
>>> from ipalib import api
>>> api.bootstrap_with_global_options()
(<Values at 0xb74f556c: {'debug': None, 'conf': None, 'env': None,
'verbose': None}>, [])
>>> api.load_plugins()
>>> api.finalize()
>>> api.Method.user_show.__doc__
'\n Display user.\n '
>>> api.Method.user_show(u'raca')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 398, in
__call__
ret = self.run(*args, **options)
File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 667, in
run
return self.forward(*args, **options)
File "/usr/lib/python2.6/site-packages/ipalib/frontend.py", line 688, in
forward
return self.Backend.xmlclient.forward(self.name, *args, **kw)
File "/usr/lib/python2.6/site-packages/ipalib/rpc.py", line 403, in
forward
command = getattr(self.conn, name)
File "/usr/lib/python2.6/site-packages/ipalib/backend.py", line 96, in
__get_conn
self.id, threading.currentThread().getName())
AttributeError: no context.xmlclient in thread 'MainThread'
----------------------------------------------------------------------------
Have you any idea ? or some pertinent docs
Sorry for my bad English :)
--
Meilleures salutations / Best Regards
Rachid ALAHYANE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-users/attachments/20100419/4ffa083a/attachment.htm>
More information about the Freeipa-users
mailing list