summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/b_xmlrpc.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-10-02 19:42:06 -0600
committerJason Gerard DeRose <jderose@redhat.com>2008-10-02 19:42:06 -0600
commit3ffbaac64cc3a9ab704c707112f59e041986576c (patch)
treee113753d2d822d813f082f78718515c517234960 /ipalib/plugins/b_xmlrpc.py
parentd84e27f0d41aa13cfa5dd154ee476bd7c5e8b072 (diff)
downloadfreeipa.git-3ffbaac64cc3a9ab704c707112f59e041986576c.tar.gz
freeipa.git-3ffbaac64cc3a9ab704c707112f59e041986576c.tar.xz
freeipa.git-3ffbaac64cc3a9ab704c707112f59e041986576c.zip
Backend.xmlrpc and simple-server.py now use the xmlrpc_marshal() and xmlrpc_unmarshal() functions respectively
Diffstat (limited to 'ipalib/plugins/b_xmlrpc.py')
-rw-r--r--ipalib/plugins/b_xmlrpc.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ipalib/plugins/b_xmlrpc.py b/ipalib/plugins/b_xmlrpc.py
index afe76505..61935f01 100644
--- a/ipalib/plugins/b_xmlrpc.py
+++ b/ipalib/plugins/b_xmlrpc.py
@@ -25,6 +25,7 @@ Lightwieght XML-RPC client using Python standard library xmlrpclib.
import xmlrpclib
from ipalib.backend import Backend
+from ipalib.util import xmlrpc_marshal
from ipalib import api
class xmlrpc(Backend):
@@ -36,4 +37,13 @@ class xmlrpc(Backend):
# FIXME: The server uri should come from self.api.env.server_uri
return xmlrpclib.ServerProxy('http://localhost:8080', allow_none=True)
+ def forward_call(self, name, *args, **kw):
+ """
+ Forward a call over XML-RPC to an IPA server.
+ """
+ client = self.get_client()
+ command = getattr(client, name)
+ params = xmlrpc_marshal(*args, **kw)
+ return command(*params)
+
api.register(xmlrpc)