Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5CD88200C64 for ; Thu, 13 Apr 2017 19:28:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5A5CC160B89; Thu, 13 Apr 2017 17:28:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A924C160BA7 for ; Thu, 13 Apr 2017 19:28:45 +0200 (CEST) Received: (qmail 64739 invoked by uid 500); 13 Apr 2017 17:28:44 -0000 Mailing-List: contact dev-help@ariatosca.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ariatosca.incubator.apache.org Delivered-To: mailing list dev@ariatosca.incubator.apache.org Received: (qmail 64620 invoked by uid 99); 13 Apr 2017 17:28:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Apr 2017 17:28:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6B972C142D for ; Thu, 13 Apr 2017 17:28:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tLCoTmq0bCdK for ; Thu, 13 Apr 2017 17:28:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id ACC705FCFA for ; Thu, 13 Apr 2017 17:28:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E8878E0D20 for ; Thu, 13 Apr 2017 17:28:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A224424069 for ; Thu, 13 Apr 2017 17:28:41 +0000 (UTC) Date: Thu, 13 Apr 2017 17:28:41 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@ariatosca.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARIA-92) Execution plugin operations default mappings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 13 Apr 2017 17:28:46 -0000 [ https://issues.apache.org/jira/browse/ARIA-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967931#comment-15967931 ] ASF GitHub Bot commented on ARIA-92: ------------------------------------ Github user tliron commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/95#discussion_r111443166 --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py --- @@ -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: disable=unused-argument +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: + context.validation.report( + '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 -- We agreed that it's better to keep this "edge was not set" information. > Execution plugin operations default mappings > -------------------------------------------- > > Key: ARIA-92 > URL: https://issues.apache.org/jira/browse/ARIA-92 > 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 > script.sh" and "remote > script.sh" -- This message was sent by Atlassian JIRA (v6.3.15#6346)