_get_explicit_relationship loose original relationship type

Bug #1897267 reported by Miguel Caballer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
Fix Released
Undecided
Miguel Caballer

Bug Description

There is a problem when parsing custom relationships.

In case of using a custom relationship when you call the try to get the "NodeTemplate.relationships" property you will get a dict where the returned RelationshipType always is the first normative RelationshipType parent type of the current relationship.

Using this TOSCA extracted from the TOSCA spec (section 9.1.4.2), if you try to get the "NodeTemplate.relationships" from node "my_web_app_tier_2" you will get a "AttachesTo" RelationshipType so all the information about the new defined relationship_types "MyAttachesTo" is lost:

tosca_definitions_version: tosca_simple_yaml_1_0

topology_template:

 node_templates:

  my_block_storage:
    type: BlockStorage
    properties:
      size: 10 MB

  my_web_app_tier_2:
    type: Compute
    requirements:
      - local_storage:
          node: my_block_storage
          relationship:
            type: MyAttachesTo
            properties:
              location: /some_other_data_location

relationship_types:

  MyAttachesTo:
    derived_from: AttachesTo
    properties:
      location: /default_location
    interfaces:
      Configure:
        post_configure_target:
          implementation: default_script.sh

Changed in tosca-parser:
assignee: nobody → Miguel Caballer (micafer1)
Changed in tosca-parser:
status: New → In Progress
Changed in tosca-parser:
status: In Progress → Fix Committed
Changed in tosca-parser:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.