The relationship processing logic in nodetype is incomplete

Bug #1578751 reported by xiaodong shang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
Triaged
Undecided
xiaodong shang

Bug Description

        Currently in the implementation of relationship in nodetype.py, it only deals with the normative capability type when there is not node in requirements (only relationship and capability), as a result the function of _get_node_type_by_cap and _get_relation are both return None when select node and relationship as long as the capability is custom type(in fact it call select the right node if a node includes the custom capability in the service template ).
        A example which can reappear the bug is shown below:

           tosca.nodes.Nodexxx:
                 derived_from: tosca.nodes.Root
                 # omitted here for brevity
                requirements:
                    - host:
                           capability: tosca.capabilities.ContainerCustom # custom capabilty type, not normative
                           relationship: tosca.relationships.HostedOn
                           # no node definiton

          tosca.capabilities.ContainerCustom: # custom capabilty type, not normative
                 derived_from: tosca.capabilities.Container

           tosca.nodes.Computeyyy:
                 derived_from: tosca.nodes.Compute
                 # omitted here for brevity
                capabilities:
                     host:
                           type: tosca.capabilities.ContainerCustom # custom capabilty type, not normative

      In the above brief example, Node type Nodexxx will have the relationship HostedOn with Computeyyy, but in current code it will not just because of the custom capability of tosca.capabilities.ContainerCustom.

Changed in tosca-parser:
assignee: nobody → shangxdy (shangxdy)
Sahdev Zala (spzala)
Changed in tosca-parser:
status: New → Triaged
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.