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

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

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

    https://github.com/apache/incubator-ariatosca/pull/117#discussion_r114535773
  
    --- Diff: aria/orchestrator/workflows/api/task.py ---
    @@ -87,86 +88,43 @@ def __init__(self,
                                    if ignore_failure is None else 
ignore_failure)
             self.interface_name = interface_name
             self.operation_name = operation_name
    +        self.name = OperationTask.NAME_FORMAT.format(type=actor_type,
    +                                                     name=actor.name,
    +                                                     
interface=self.interface_name,
    +                                                     
operation=self.operation_name)
    +        self.is_stub = self.is_empty(self.actor, self.interface_name, 
self.operation_name)
    +        if self.is_stub:
    +            return
     
             operation = 
self.actor.interfaces[self.interface_name].operations[self.operation_name]
             self.plugin = operation.plugin
             self.inputs = modeling_utils.create_inputs(inputs or {}, 
operation.inputs)
             self.implementation = operation.implementation
    -        self.name = OperationTask.NAME_FORMAT.format(type=actor_type,
    -                                                     name=actor.name,
    -                                                     
interface=self.interface_name,
    -                                                     
operation=self.operation_name)
     
         def __repr__(self):
             return self.name
     
    -    @classmethod
    -    def for_node(cls,
    -                 node,
    -                 interface_name,
    -                 operation_name,
    -                 max_attempts=None,
    -                 retry_interval=None,
    -                 ignore_failure=None,
    -                 inputs=None):
    -        """
    -        Creates an operation on a node.
    -
    -        :param node: The node on which to run the operation
    -        :param interface_name: The interface name
    -        :param operation_name: The operation name within the interface
    -        :param max_attempts: The maximum number of attempts in case the 
operation fails
    -                             (if not specified the defaults it taken from 
the workflow context)
    -        :param retry_interval: The interval in seconds between attempts 
when the operation fails
    -                               (if not specified the defaults it taken 
from the workflow context)
    -        :param ignore_failure: Whether to ignore failures
    -                               (if not specified the defaults it taken 
from the workflow context)
    -        :param inputs: Additional operation inputs
    -        """
    -
    -        assert isinstance(node, models.Node)
    -        return cls(
    -            actor=node,
    -            interface_name=interface_name,
    -            operation_name=operation_name,
    -            max_attempts=max_attempts,
    -            retry_interval=retry_interval,
    -            ignore_failure=ignore_failure,
    -            inputs=inputs)
    -
    -    @classmethod
    -    def for_relationship(cls,
    -                         relationship,
    -                         interface_name,
    -                         operation_name,
    -                         max_attempts=None,
    -                         retry_interval=None,
    -                         ignore_failure=None,
    -                         inputs=None):
    -        """
    -        Creates an operation on a relationship edge.
    -
    -        :param relationship: The relationship on which to run the operation
    -        :param interface_name: The interface name
    -        :param operation_name: The operation name within the interface
    -        :param max_attempts: The maximum number of attempts in case the 
operation fails
    -                             (if not specified the defaults it taken from 
the workflow context)
    -        :param retry_interval: The interval in seconds between attempts 
when the operation fails
    -                               (if not specified the defaults it taken 
from the workflow context)
    -        :param ignore_failure: Whether to ignore failures
    -                               (if not specified the defaults it taken 
from the workflow context)
    -        :param inputs: Additional operation inputs
    -        """
    -
    -        assert isinstance(relationship, models.Relationship)
    -        return cls(
    -            actor=relationship,
    -            interface_name=interface_name,
    -            operation_name=operation_name,
    -            max_attempts=max_attempts,
    -            retry_interval=retry_interval,
    -            ignore_failure=ignore_failure,
    -            inputs=inputs)
    +    # def __new__(cls, actor, interface_name, operation_name, *args, 
**kwargs):
    --- End diff --
    
    Talk to Tal


> Update node state for stub tasks
> --------------------------------
>
>                 Key: ARIA-163
>                 URL: https://issues.apache.org/jira/browse/ARIA-163
>             Project: AriaTosca
>          Issue Type: Story
>    Affects Versions: 0.1.0
>            Reporter: Maxim Orlov
>            Assignee: Maxim Orlov
>
> Currently each node that has no implementation for an operation, has its 
> operations labeled a stub tasks. Those stub tasks aren't run through the 
> normal path of the workflow engine, and thus no update to the state of the 
> node is being done. this should be fixed 



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

Reply via email to