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

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

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

    https://github.com/apache/incubator-ariatosca/pull/125#discussion_r115431430
  
    --- Diff: aria/modeling/service_template.py ---
    @@ -549,9 +549,14 @@ def as_raw(self):
                 ('requirement_templates', 
formatting.as_raw_list(self.requirement_templates))))
     
         def instantiate(self, container):
    -        context = ConsumptionContext.get_thread_local()
             from . import models
    -        name = context.modeling.generate_node_id(self.name)
    +        import pydevd; pydevd.settrace('localhost', suspend=False)
    +        if self.nodes:
    +            highest_name_suffix = max(self.nodes, key=lambda n: 
n.name).name.rsplit('_', 1)[1]
    --- End diff --
    
    im not sure this would work;
    note that `mynode_2` will come after `mynode_11` :|


> Make node name suffix UUIDs become more readable
> ------------------------------------------------
>
>                 Key: ARIA-165
>                 URL: https://issues.apache.org/jira/browse/ARIA-165
>             Project: AriaTosca
>          Issue Type: Story
>            Reporter: Ran Ziv
>            Assignee: Maxim Orlov
>            Priority: Minor
>
> Node names are currently constructed of the node template name with a UUID 
> suffix. While this makes the node name unique across all services, it also 
> makes the node names less readable, and since nodes are already unique via 
> their ID, it might be better to use a different type of suffix.
> One option would be to generate a shorter, no capital letters string, which 
> would be more readable, and (in very high probability) unique in a single 
> service.
> Another option would be to go for a running number suffix for each node of a 
> given node template, which could be simple, unique and readable.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to