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

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

Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/95#discussion_r111150551
  
    --- Diff: aria/modeling/service_instance.py ---
    @@ -529,6 +524,32 @@ def validate_capabilities(self):
                     satisfied = False
             return satisfied
     
    +    def find_host(self):
    +        def _find_host(node):
    --- End diff --
    
    im still a bit confused by this myself - caching the host is definitely a 
good idea, but it looks here like the internal method _find_host is called 
recursively repeatedly.
    I'm not sure this is exactly the same as what Maxim meant, but I think I'd 
expect each node's host finding method to run once at most, so that would mean 
either "host" is a self-initializing property, or a field initialized at its 
constructor, or you could use the "find_host" method, but basically what i'm 
missing here is the check for whether the value has been cached already or not.
    
    i'd expect it to be more like:
    ```
    def find_host(self):
        def _find_host(node):
        ....
            host = the_relationship.target_node.find_host()
        ....
    
    if not self.host:  # or indeed use some extra flag
        self.host = _find_host(node)    
    return self.host
    ```


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

Reply via email to