Pass opts into outputter system in the jobs runner

This commit is contained in:
Thomas S Hatch 2012-10-31 17:30:06 -06:00
parent 663d696560
commit 95daf9ce7e

View File

@ -49,7 +49,7 @@ def active():
continue
if os.path.exists(os.path.join(jid_dir, minion)):
ret[jid]['Returned'].append(minion)
salt.output.display_output(ret, 'yaml')
salt.output.display_output(ret, 'yaml', __opts__)
return ret
@ -68,7 +68,10 @@ def lookup_jid(jid, ext_source=None):
ret = {}
for mid, data in client.get_full_returns(jid, [], 0).items():
ret[mid] = data.get('ret')
salt.output.display_output({mid: ret[mid]}, data.get('out', None))
salt.output.display_output(
{mid: ret[mid]},
data.get('out', None),
__opts__)
return ret
@ -93,7 +96,7 @@ def list_jobs():
'Arguments': list(load['arg']),
'Target': load['tgt'],
'Target-type': load['tgt_type']}
salt.output.display_output(ret, 'yaml')
salt.output.display_output(ret, 'yaml', __opts__)
return ret
def print_job(job_id):
@ -128,5 +131,5 @@ def print_job(job_id):
'Target': load['tgt'],
'Target-type': load['tgt_type'],
'Result': hosts_return}
salt.output.display_output(ret, 'yaml')
salt.output.display_output(ret, 'yaml', __opts__)
return ret