From 6000b6b5c62181d25783b6d45adb2ed6f3928480 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Thu, 2 Oct 2008 17:02:24 -0600 Subject: Implemented basic Command.forward() method --- ipalib/frontend.py | 6 +++--- ipalib/plugins/f_user.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'ipalib') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index 30f5942b..6decb17d 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -542,9 +542,9 @@ class Command(plugable.Plugin): print ' kw =', kw def forward(self, *args, **kw): - print '%s.execute():' % self.name - print ' args =', args - print ' kw =', kw + xmlrpc_client = self.api.Backend.xmlrpc.get_client() + return getattr(xmlrpc_client, self.name)(kw, *args) + def __call__(self, *args, **kw): if len(args) > 0: diff --git a/ipalib/plugins/f_user.py b/ipalib/plugins/f_user.py index a482a963..29f0f8a0 100644 --- a/ipalib/plugins/f_user.py +++ b/ipalib/plugins/f_user.py @@ -87,10 +87,10 @@ api.register(user_mod) class user_find(crud.Find): 'Search the users.' - def execute(self, *args, **kw): - uid=args[0] - result = servercore.get_sub_entry(servercore.basedn, "uid=%s" % uid, ["*"]) - return result +# def execute(self, *args, **kw): +# uid=args[0] +# result = servercore.get_sub_entry(servercore.basedn, "uid=%s" % uid, ["*"]) +# return result api.register(user_find) -- cgit