From efe5a96725d3ddcd05b03a1ca9df5597eee693be Mon Sep 17 00:00:00 2001 From: Ana Krivokapic Date: Fri, 2 Aug 2013 16:11:16 +0200 Subject: Enable running API commands in ipa-advise plugins https://fedorahosted.org/freeipa/ticket/3671 https://fedorahosted.org/freeipa/ticket/3672 --- ipalib/rpc.py | 4 ++-- ipaserver/advise/base.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ipalib/rpc.py b/ipalib/rpc.py index 36daa839..81e7aa35 100644 --- a/ipalib/rpc.py +++ b/ipalib/rpc.py @@ -621,7 +621,7 @@ class xmlclient(Connectible): kw['transport'] = KerbTransport() else: kw['transport'] = LanguageAwareTransport() - self.log.info('trying %s' % url) + self.log.debug('trying %s' % url) setattr(context, 'request_url', url) serverproxy = ServerProxy(url, **kw) if len(urls) == 1: @@ -697,7 +697,7 @@ class xmlclient(Connectible): '%s.forward(): %r not in api.Command' % (self.name, name) ) server = getattr(context, 'request_url', None) - self.info("Forwarding '%s' to server '%s'", name, server) + self.debug("Forwarding '%s' to server '%s'", name, server) command = getattr(self.conn, name) params = [args, kw] try: diff --git a/ipaserver/advise/base.py b/ipaserver/advise/base.py index 5a55c3de..8350bdbc 100644 --- a/ipaserver/advise/base.py +++ b/ipaserver/advise/base.py @@ -163,7 +163,9 @@ class IpaAdvise(admintool.AdminTool): advice.set_options(self.options) # Print out the actual advice + api.Backend.xmlclient.connect() advice.get_info() + api.Backend.xmlclient.disconnect() for line in advice.log.content: print line -- cgit