Github user ran-z commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/72#discussion_r104922547
--- Diff: aria/orchestrator/workflows/core/task.py ---
@@ -66,65 +67,60 @@ class StubTask(BaseTask):
def __init__(self, *args, **kwargs):
super(StubTask, self).__init__(*args, **kwargs)
- self.status = model.Task.PENDING
+ self.status = models.Task.PENDING
self.due_at = datetime.utcnow()
class StartWorkflowTask(StubTask):
"""
- Tasks marking a workflow start
+ Task marking a workflow start
"""
pass
class EndWorkflowTask(StubTask):
"""
- Tasks marking a workflow end
+ Task marking a workflow end
"""
pass
class StartSubWorkflowTask(StubTask):
"""
- Tasks marking a subworkflow start
+ Task marking a subworkflow start
"""
pass
class EndSubWorkflowTask(StubTask):
"""
- Tasks marking a subworkflow end
+ Task marking a subworkflow end
"""
pass
class OperationTask(BaseTask):
"""
- Operation tasks
+ Operation task
"""
def __init__(self, api_task, *args, **kwargs):
super(OperationTask, self).__init__(id=api_task.id, **kwargs)
self._workflow_context = api_task._workflow_context
model_storage = api_task._workflow_context.model
+ plugin = api_task.plugin
base_task_model = model_storage.task.model_cls
- if isinstance(api_task.actor, model.Node):
+ if isinstance(api_task.actor, models.Node):
context_cls = operation_context.NodeOperationContext
- task_model_cls = base_task_model.as_node_instance
- elif isinstance(api_task.actor, model.Relationship):
+ task_model_cls = base_task_model.as_node_task
+ elif isinstance(api_task.actor, models.Relationship):
context_cls = operation_context.RelationshipOperationContext
- task_model_cls = base_task_model.as_relationship_instance
+ task_model_cls = base_task_model.as_relationship_task
else:
raise RuntimeError('No operation context could be created for
{actor.model_cls}'
.format(actor=api_task.actor))
- plugin = api_task.plugin
--- End diff --
why was this deleted again?
---
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.
---