Skip to content

Commit

Permalink
rest: return input files and parameters in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidalgarcia committed Mar 19, 2020
1 parent e02d696 commit eb9814d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion reana_server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,15 @@ def clone_workflow(workflow, reana_spec):

def reconstruct_reana_yaml(workflow):
"""Reconstruct the REANA.yaml from a workflow object."""
return {
input_files = workflow.reana_specification.get('inputs', {}) \
.get('files', {})

spec = {
'workflow': {
'specification': workflow.get_specification(),
'type': workflow.type_},
'inputs': {'parameters': workflow.get_input_parameters()}}

if input_files:
spec['inputs']['files'] = input_files
return {'specification': spec, 'parameters': workflow.input_parameters}

0 comments on commit eb9814d

Please sign in to comment.