Commit 8775ae73 authored by Matthieu Lamalle's avatar Matthieu Lamalle

Merge branch '435_no_returns_in_list' into 'develop'

remove 'return' in v1.server.exec.list

See merge request !14
parents e86498b3 99ded1d1
Pipeline #565 passed with stage
in 0 seconds
......@@ -289,7 +289,7 @@ class ServerRunner(ZephirCommonController):
'automation': automation,
'executed': False}
def result_to_dict(self, result, automation):
def result_to_dict(self, result, automation, with_returns=True):
dico = {'job_id': result['jid'],
'server_id': int(result['minion']),
'automation': automation,
......@@ -302,7 +302,8 @@ class ServerRunner(ZephirCommonController):
if 'success' in result :
dico['success'] = result['success']
dico['retcode'] = result['retcode']
dico['return'] = result['return']
if with_returns:
dico['return'] = result['return']
return dico
@register_wamp('v1.server.exec.list', notification_uri=None, database=True, profil_adapter='get_profil_for_server')
......@@ -315,7 +316,7 @@ class ServerRunner(ZephirCommonController):
raise Exception(_('Automation engine not supported: {}').format(automation))
ret = []
for result in results:
ret.append(self.result_to_dict(result, automation))
ret.append(self.result_to_dict(result, automation, with_returns=False))
return ret
@register_wamp('v1.server.exec.deploy', notification_uri=None, database=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment