tliron / puccini

Cloud topology management and deployment tools based on TOSCA
https://puccini.cloud
Apache License 2.0
88 stars 20 forks source link

Capability name from requirement assignment is not rendered #134

Closed Shishqa closed 1 year ago

Shishqa commented 1 year ago

Consider an example:

tosca_definitions_version: tosca_simple_yaml_1_3

topology_template:

  node_templates:

    node_1:
      type: tosca:Root
      requirements:
        - dependency:
            node: node_2
            capability: feature

    node_2:
      type: tosca:Root

Here I explicitly point to a capability named feature and expect it to show up in the normalized output:

requirements:
      - name: dependency
        capabilityTypeName: tosca::Node
        capabilityName: feature

However, I get the following output:

requirements:
      - name: dependency
        capabilityTypeName: tosca::Node
        capabilityName: ""
tliron commented 1 year ago

@Shishqa Your PR fixes one issue but breaks others. Will investigate.

tliron commented 1 year ago

Generally I recommend running scripts/test before submitting a PR!

Shishqa commented 1 year ago

Sorry for that 🌚 I found the problem, will submit a fixing PR now

tliron commented 1 year ago

It might be tricky... I am trying to fix it, too, and it's not so simple to discover in that piece of code if it's a type name or a capability name...

Shishqa commented 1 year ago

I see, my "fix" brings everything back and not solves the issue above

tliron commented 1 year ago

I am working on it ... it's tricky :)