Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions pepper/libpepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def low(self, lowstate, path='/'):
return self.req(path, lowstate)

def local(self, tgt, fun, arg=None, kwarg=None, expr_form='glob',
timeout=None, ret=None):
timeout=None, ret=None, full_return=False):
'''
Run a single command using the ``local`` client

Expand All @@ -325,10 +325,13 @@ def local(self, tgt, fun, arg=None, kwarg=None, expr_form='glob',
if ret:
low['ret'] = ret

if full_return:
low['full_return'] = full_return

return self.low([low])

def local_async(self, tgt, fun, arg=None, kwarg=None, expr_form='glob',
timeout=None, ret=None):
timeout=None, ret=None, full_return=False):
'''
Run a single command using the ``local_async`` client

Expand All @@ -355,10 +358,13 @@ def local_async(self, tgt, fun, arg=None, kwarg=None, expr_form='glob',
if ret:
low['ret'] = ret

if full_return:
low['full_return'] = full_return

return self.low([low])

def local_batch(self, tgt, fun, arg=None, kwarg=None, expr_form='glob',
batch='50%', ret=None):
batch='50%', ret=None, full_return=False):
'''
Run a single command using the ``local_batch`` client

Expand All @@ -385,16 +391,19 @@ def local_batch(self, tgt, fun, arg=None, kwarg=None, expr_form='glob',
if ret:
low['ret'] = ret

if full_return:
low['full_return'] = full_return

return self.low([low])

def lookup_jid(self, jid):
def lookup_jid(self, jid, full_return=False):
'''
Get job results

Wraps :meth:`runner`.
'''

return self.runner('jobs.lookup_jid', jid='{0}'.format(jid))
return self.runner('jobs.lookup_jid', jid='{0}'.format(jid), full_return=full_return)

def runner(self, fun, arg=None, **kwargs):
'''
Expand Down