Include both type uri and shorthand name for standard interface regex
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/0ee98a6b Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/0ee98a6b Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/0ee98a6b Branch: refs/heads/ARIA-126-update-node-statuses Commit: 0ee98a6b88306b086f96fde9c67bff487d283814 Parents: c248108 Author: Avia Efrat <[email protected]> Authored: Sun Mar 26 11:41:05 2017 +0300 Committer: Avia Efrat <[email protected]> Committed: Sun Mar 26 11:41:05 2017 +0300 ---------------------------------------------------------------------- aria/orchestrator/workflows/core/events_handler.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0ee98a6b/aria/orchestrator/workflows/core/events_handler.py ---------------------------------------------------------------------- diff --git a/aria/orchestrator/workflows/core/events_handler.py b/aria/orchestrator/workflows/core/events_handler.py index 814f6a2..16563e1 100644 --- a/aria/orchestrator/workflows/core/events_handler.py +++ b/aria/orchestrator/workflows/core/events_handler.py @@ -128,8 +128,11 @@ def _workflow_cancelling(workflow_context, *args, **kwargs): def _update_node_state(task, transitional=False): - match = re.search('^Standard:(\S+)@node', task.context.name) + match = re.search('(?:tosca.interfaces.node.lifecycle.Standard|Standard):(\S+)@node', + task.context.name) if match: - state = task.runs_on.determine_state(match.group(1), transitional) + node = task.runs_on + state = node.determine_state(match.group(1), transitional) if state: - task.runs_on.state = state + node.state = state + task.context.model.node.update(node)
