ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran-z <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #125: ARIA-165 Make node name suffix UUIDs ...
Date Tue, 09 May 2017 07:48:01 GMT
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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message