Adding callback url to action context

* Callback URL is now provided by std.mistral_http
 action to easy understand where the result should be sent

Closes-Bug: #1500833

Change-Id: I347edc5848bde4262a2d57f1787db5f16e218f0a
(cherry picked from commit dde634d8b9)
This commit is contained in:
Nikolay Mahotkin 2015-11-16 16:27:06 +03:00 committed by Renat Akhmerov
parent 6ba38d00b2
commit 9775b399be
3 changed files with 5 additions and 2 deletions

View File

@ -242,6 +242,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(