Github user mxmrlv commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/12#discussion_r85097566
--- Diff: aria/workflows/builtin/heal.py ---
@@ -141,35 +136,32 @@ def heal_install(context, graph,
failing_node_instances, targeted_node_instances
node_instance_sub_workflow =
node_instance_sub_workflows[node_instance.id]
for relationship_instance in node_instance.relationship_instances:
- target_node_instance = context.storage.node_instance.get(
- relationship_instance.target_id)
- if target_node_instance in failing_node_instances:
- after_tasks =
[node_instance_sub_workflows[relationship.target_id]
- for relationship in
node_instance.relationship_instances]
+ target_node_instance =
context.model.node_instance.get(relationship_instance.target_id)
+ target_node_instance_subgraph =
node_instance_sub_workflows[target_node_instance.id]
+ graph.add_dependency(node_instance_sub_workflow,
target_node_instance_subgraph)
- elif target_node_instance in targeted_node_instances:
- after_tasks = [relationship_tasks(
+ if target_node_instance in failing_node_instances:
+ dependent = graph.parallel(*relationship_tasks(
node_instance=node_instance,
relationship_instance=relationship_instance,
context=context,
-
operation_name='aria.interfaces.relationship_lifecycle.establish')]
+
operation_name='aria.interfaces.relationship_lifecycle.establish'))
- if after_tasks:
- graph.dependency(source_task=node_instance_sub_workflow,
after=after_tasks)
+ graph.add_dependency(dependent, node_instance_sub_workflow)
def _get_contained_subgraph(context, host_node_instance):
- contained_instances = set(node_instance
- for node_instance in context.node_instances
- if node_instance.host_id ==
host_node_instance.id and
- node_instance.id != node_instance.host_id)
- result = {host_node_instance}
+ contained_instances = [node_instance
+ for node_instance in context.node_instances
+ if node_instance.host_id ==
host_node_instance.id and
+ node_instance.id != node_instance.host_id]
+ result = [host_node_instance]
--- End diff --
are you sure there arent going to be any duplicates in this set-turned-list?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---