Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/95#discussion_r111196059
  
    --- Diff: aria/orchestrator/workflows/api/task.py ---
    @@ -66,98 +66,84 @@ def __init__(self,
                      actor_type,
                      interface_name,
                      operation_name,
    -                 runs_on=None,
    +                 inputs=None,
                      max_attempts=None,
                      retry_interval=None,
    -                 ignore_failure=None,
    -                 inputs=None):
    +                 ignore_failure=None):
             """
             Do not call this constructor directly. Instead, use 
:meth:`for_node` or
             :meth:`for_relationship`.
             """
     
    -        assert isinstance(actor, (models.Node, models.Relationship))
    -        assert actor_type in ('node', 'relationship')
             assert interface_name and operation_name
    -        assert runs_on in models.Task.RUNS_ON
             super(OperationTask, self).__init__()
     
    +        operation = None
    +        interface = actor.interfaces.get(interface_name)
    +        if interface is not None:
    +            operation = interface.operations.get(operation_name)
    +
    +        if operation is None:
    +            raise exceptions.OperationNotFoundException(
    +                'Could not find operation "{0}" on interface "{1}" for {2} 
"{3}"'
    +                .format(operation_name, interface_name, actor_type, 
actor.name))
    +
    +        if operation.implementation is None:
    --- End diff --
    
    What is the meaning of an empty implementation operation? The operation 
would fail in the orchestrator, seems much better to catch that here and not 
create that operation.


---
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.
---

Reply via email to