From aa36ec3991bf3e1f4e0ff7cf821b2ceba67335cd Mon Sep 17 00:00:00 2001 From: Steve Salevan Date: Wed, 9 Jul 2008 16:45:26 -0400 Subject: Committing fixes to delegation/overlord client code --- func/minion/modules/delegation.py | 4 ++-- func/overlord/client.py | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'func') diff --git a/func/minion/modules/delegation.py b/func/minion/modules/delegation.py index 7af3284..9f34d1a 100644 --- a/func/minion/modules/delegation.py +++ b/func/minion/modules/delegation.py @@ -27,8 +27,8 @@ class DelegationModule(func_module.FuncModule): next_hop = delegation_path[0] overlord = fc.Overlord(next_hop) if len(delegation_path) == 1: #minion exists under this overlord - meth = "%s.%s" % (module, method) - return getattr(overlord,meth)(*args[:]) + overlord_module = getattr(overlord,module) + return getattr(overlord_module,method)(*args[:]) stripped_list = delegation_path[1:len(delegation_path)] delegation_results = overlord.delegation.run(module,method,args,stripped_list) diff --git a/func/overlord/client.py b/func/overlord/client.py index 760b896..572d274 100755 --- a/func/overlord/client.py +++ b/func/overlord/client.py @@ -343,6 +343,8 @@ class Overlord(object): # this is the point at which we make the remote call. if use_delegate: retval = getattr(conn, meth)(module, method, args, delegation_path) + print retval + print spec else: retval = getattr(conn, meth)(*args[:]) @@ -395,7 +397,10 @@ class Overlord(object): minions = expanded_minions.get_urls()[0] # print minions results = process_server(0, 0, minions) - + + if use_delegate: + return results[spec] + return results # ----------------------------------------------- -- cgit