Merge "Adding callback url to action context"

This commit is contained in:
Jenkins 2015-11-18 09:51:27 +00:00 committed by Gerrit Code Review
commit 72d0e38368
3 changed files with 5 additions and 2 deletions

View File

@ -243,6 +243,7 @@ class MistralHTTPAction(HTTPAction):
'Mistral-Workflow-Execution-Id': actx.get('workflow_execution_id'),
'Mistral-Task-Id': actx.get('task_id'),
'Mistral-Action-Execution-Id': actx.get('action_execution_id'),
'Mistral-Callback-URL': actx.get('callback_url'),
})
super(MistralHTTPAction, self).__init__(

View File

@ -156,7 +156,8 @@ def get_action_context(task_ex, action_ex_id):
'task_id': task_ex.id,
'task_name': task_ex.name,
'task_tags': task_ex.tags,
'action_execution_id': action_ex_id
'action_execution_id': action_ex_id,
'callback_url': '/v2/action_executions/%s' % action_ex_id
}
}

View File

@ -77,7 +77,8 @@ class ActionContextTest(base.EngineTestCase):
'Mistral-Workflow-Name': wf_ex.workflow_name,
'Mistral-Workflow-Execution-Id': wf_ex.id,
'Mistral-Task-Id': task_ex.id,
'Mistral-Action-Execution-Id': action_ex.id
'Mistral-Action-Execution-Id': action_ex.id,
'Mistral-Callback-URL': '/v2/action_executions/%s' % action_ex.id
}
requests.request.assert_called_with(