ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIA-105) Integrate new models into parser
Date Sun, 19 Mar 2017 13:30:43 GMT

    [ https://issues.apache.org/jira/browse/ARIA-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15931674#comment-15931674
] 

ASF GitHub Bot commented on ARIA-105:
-------------------------------------

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

    https://github.com/apache/incubator-ariatosca/pull/72#discussion_r106804951
  
    --- Diff: aria/orchestrator/workflows/builtin/utils.py ---
    @@ -14,33 +14,38 @@
     # limitations under the License.
     
     from ..api.task import OperationTask
    +from .. import exceptions
     
     
    -def create_node_task(operation_name, node):
    +def create_node_task(interface_name, operation_name, node):
         """
         Returns a new operation task if the operation exists in the node, otherwise returns
None.
         """
     
    -    if _has_operation(node.interfaces, operation_name):
    -        return OperationTask.node(instance=node,
    -                                  name=operation_name)
    -    return None
    +    try:
    +        return OperationTask.for_node(node=node,
    +                                      interface_name=interface_name,
    +                                      operation_name=operation_name)
    +    except exceptions.TaskException:
    +        return None
     
     
    -def create_relationship_tasks(operation_name, runs_on, node):
    +def create_relationship_tasks(interface_name, operation_name, runs_on, node):
         """
         Returns a list of operation tasks for each outbound relationship of the node if the
operation
         exists there.
         """
     
         sequence = []
         for relationship in node.outbound_relationships:
    -        if _has_operation(relationship.interfaces, operation_name):
    +        try:
                 sequence.append(
    -                OperationTask.relationship(instance=relationship,
    -                                           name=operation_name,
    -                                           edge='source',
    -                                           runs_on=runs_on))
    +                OperationTask.for_relationship(relationship=relationship,
    +                                               interface_name=interface_name,
    +                                               operation_name=operation_name,
    +                                               runs_on=runs_on))
    +        except exceptions.TaskException:
    --- End diff --
    
    ditto


> Integrate new models into parser
> --------------------------------
>
>                 Key: ARIA-105
>                 URL: https://issues.apache.org/jira/browse/ARIA-105
>             Project: AriaTosca
>          Issue Type: Task
>            Reporter: Ran Ziv
>            Assignee: Tal Liron
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message