ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [07/12] incubator-ariatosca git commit: Include both type uri and shorthand name for standard interface regex
Date Sun, 26 Mar 2017 09:25:57 GMT
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/8d74c511
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/8d74c511
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/8d74c511

Branch: refs/heads/ARIA-126-update-node-statuses
Commit: 8d74c51106ba45f6037d74e0a7c03488e17ba000
Parents: a3d0a92
Author: Avia Efrat <avia@gigaspaces.com>
Authored: Sun Mar 26 11:41:05 2017 +0300
Committer: Avia Efrat <avia@gigaspaces.com>
Committed: Sun Mar 26 12:25:33 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/8d74c511/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)


Mime
View raw message