tliron / puccini

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

Property refinements not supported in capability type defintions #98

Closed pmjordan closed 2 years ago

pmjordan commented 2 years ago

My TOSCA template contains

tosca_defintions_version: tosca_simple_yaml_1_3
capability_types:
  TMFAPI:
    derived_from: tosca.capabilities.Node
    description: a TMForum defined REST API
      properties:
        id:
          type: string
          description: the id e.g TMF632
        name
          type: string
          description: the name, e.g. party

  TMF632:
     derived_from: TMFAPI
     properties:
       id: TMF632
       name: party

But this is rejected the puccini parser with a message @19, 7 capability_types["TMF632"].properties["id"]: "string" instead of "map" @20, 7 capability_types["TMF632"].properties["name"]: "string" instead of "map"

Perhaps this is because you are not expecting property defintion refinements as described in section 3.6.10.6 of TOSCA v1.3

thanks to @philippemerle for pointing out that an example of this syntax is given in section 3.6.10.8

tliron commented 2 years ago

Thanks! The YAML you provided here is malformed, possibly a copy-paste error. I fixed it to what I think you meant, but then cannot replicate the issue:

tosca_defintions_version: tosca_simple_yaml_1_3
capability_types:
  TMFAPI:
    derived_from: tosca.capabilities.Node
    description: a TMForum defined REST API
    properties:
      id:
        type: string
        description: the id e.g TMF632
      name:
        type: string
        description: the name, e.g. party

  TMF632:
     derived_from: TMFAPI
     properties:
       id: TMF632
       name: party
pmjordan commented 2 years ago

Sorry. Must have been my error.