ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxmrlv <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #143: ARIA-254 Create multiple nodes per te...
Date Tue, 04 Jul 2017 12:49:36 GMT
Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/143#discussion_r125460359
  
    --- Diff: extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py ---
    @@ -162,6 +164,30 @@ def convert_capability_from_definition_to_assignment(context, presentation,
cont
         return CapabilityAssignment(name=presentation._name, raw=raw, container=container)
     
     
    +def merge_capability_definition(context, presentation, capability_definition,
    +                                from_capability_definition):
    +    raw_properties = OrderedDict()
    +
    +    # Merge properties from type
    +    from_property_defintions = from_capability_definition.properties
    +    merge_raw_parameter_definitions(context, presentation, raw_properties, from_property_defintions,
    +                                    'properties')
    +
    +    # Merge our properties
    +    merge_raw_parameter_definitions(context, presentation, raw_properties,
    +                                    capability_definition.properties, 'properties')
    +
    +    if raw_properties:
    +        capability_definition._raw['properties'] = raw_properties
    +        capability_definition._reset_method_cache()
    +
    +    # Merge occurrences
    +    occurrences = from_capability_definition._raw.get('occurrences')
    +    if (occurrences is not None) and (capability_definition._raw.get('occurrences') is
None):
    --- End diff --
    
    why the redundant parenthesis? 


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