[
https://issues.apache.org/jira/browse/ARIA-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002227#comment-16002227
]
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_r115426507
--- Diff: aria/modeling/service_template.py ---
@@ -549,9 +549,13 @@ 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)
+ if self.nodes:
+ latest_node_index = self.nodes[-1].name.rsplit('_', 1)[1]
+ index = int(latest_node_index) + 1
+ else:
+ index = 0
--- End diff --
i'd start from index=1 actually
> 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)