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 #72: ARIA-105 integrate modeling
Date Wed, 08 Mar 2017 10:49:35 GMT
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/72#discussion_r104891794
  
    --- Diff: aria/orchestrator/workflows/api/task.py ---
    @@ -69,21 +73,38 @@ def __init__(self,
                      ignore_failure=None,
                      inputs=None,
                      plugin=None,
    -                 runs_on=None):
    +                 runs_on=None,
    +                 dry=False):
             """
             Creates an operation task using the name, details, node instance and any additional
kwargs.
    -        :param name: the operation of the name.
    +
    +        :param name: the name of the operation.
             :param actor: the operation host on which this operation is registered.
             :param inputs: operation inputs.
             """
    -        assert isinstance(actor, (model.Node,
    -                                  model.Relationship))
    +
    +        assert isinstance(actor, (models.Node, models.Relationship))
             super(OperationTask, self).__init__()
    +
    +        if dry:
    +            from ..dry import convert_to_dry
    +            plugin, implementation, inputs = convert_to_dry(plugin, implementation, inputs)
    +
    +        # Coerce inputs
    +        if inputs is None:
    +            inputs = {}
    +        else:
    +            for k, v in inputs.iteritems():
    +                if not isinstance(v, models.Parameter):
    --- End diff --
    
    im not sure i understand why this check is needed


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