ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran-z <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #95: ARIA-92 Automatic operation task confi...
Date Wed, 12 Apr 2017 15:31:23 GMT
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/95#discussion_r111183546
  
    --- 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:
    --- End diff --
    
    (FYI this section is refactored elsewhere in the CLI branch, so it will get overridden
here too)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message