xlab-si / xopera-opera

xOpera orchestrator compliant with TOSCA YAML v1.3 in the making
https://xlab-si.github.io/xopera-docs/
Apache License 2.0
35 stars 14 forks source link

Invalid assigment of the defaut of a parameter definition #225

Closed philippemerle closed 2 years ago

philippemerle commented 2 years ago

Into various service templates, e.g. examples/hello/service.yaml, we could find definitions like:

node_types:
  hello_type:
    derived_from: tosca.nodes.SoftwareComponent
    interfaces:
      Standard:
        inputs:
          marker:
            default: { get_input: marker }
            type: string
        operations:
          create: playbooks/create.yaml
          delete: playbooks/delete.yaml

But default: { get_input: marker } is an invalid assigment because the assigned part ({ get_input: marker }) should be a value (e.g. 1, hello, true, list, map, etc.) and not an expression or function call. See Section 3.6.14 of TOSCA 1.3.

In this example, default: { get_input: marker } should be replaced by value: { get_input: marker } because assigning an expression or function call to value is allowed by the TOSCA 1.3 grammar.

anzoman commented 2 years ago

Thank you for finding and opening this @philippemerle.