Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/143#discussion_r125754130
  
    --- 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 --
    
    I do not consider them redundant at all. Nobody should have to remember 
operation precedence, you should be able to tell at a glance. I recommend 
everybody follow this practice in every language. :)


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to