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


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