ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (ARIA-92) Execution plugin operations default mappings
Date Thu, 13 Apr 2017 11:37:41 GMT


ASF GitHub Bot commented on ARIA-92:

Github user ran-z commented on a diff in the pull request:
    --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/ ---
    @@ -352,20 +359,44 @@ def create_interface_template_model(context, service_template, interface):
         return model if model.operation_templates else None
    -def create_operation_template_model(context, service_template, operation): # pylint:
    +def create_operation_template_model(context, service_template, operation):
         model = OperationTemplate(name=operation._name)
         if operation.description:
             model.description = operation.description.value
         implementation = operation.implementation
    -    if (implementation is not None) and operation.implementation.primary:
    -        model.plugin_specification, model.implementation = \
    -            parse_implementation_string(context, service_template, operation.implementation.primary)
    +    if implementation is not None: 
    +        primary = implementation.primary
    +        plugin_name, model.implementation = split_prefix(primary)
    +        if plugin_name is not None:
    +            model.plugin_specification = service_template.plugin_specifications.get(plugin_name)
    +            if model.plugin_specification is None:
    +                    'unknown plugin "%s" specified in operation implementation: %s'
    +                    % (plugin_name, primary),
    +                    locator=operation._get_child_locator('implementation', 'primary'),
    +                    level=Issue.BETWEEN_TYPES)
    +        relationship_edge = operation._get_extensions(context).get('relationship_edge')
    +        if relationship_edge is not None:
    --- End diff --
    Don't you think it'd be better to have it be set to `source` by default?
    I assume when it's `None` we should treat it as `source`, so I think it'd be better if
the data model reflects this design decision, no?

> Execution plugin operations default mappings
> --------------------------------------------
>                 Key: ARIA-92
>                 URL:
>             Project: AriaTosca
>          Issue Type: Story
>            Reporter: Ran Ziv
>            Assignee: Tal Liron
> The execution plugin serves as the default plugin, i.e. if no other plugin was specified,
it'll be used to execute scripts in operations.
> These scripts will currently only execute locally. The execution plugin also supports
running scripts on remote machines (via SSH).
> One option is to have the parser recognize whether the node in question is contained
inside a host node, in which case the script should be executed remotely (by default, yet
overridable by specifying the full plugin operation mapping), and if not then it should be
executed locally.
> Another option is to have the user specify it using special syntax, e.g.:
> "local >" and "remote >"

This message was sent by Atlassian JIRA

View raw message