tosca-community-contributions
tosca-community-contributions copied to clipboard
Is the node field optional or mandatory in a requirement assignment?
The following topology template:
tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
node_templates:
my_node:
type: tosca.nodes.Root
requirements:
- dependency:
capability: feature
seems to be correct according to the first table in section 3.8.2.1 of TOSCA 1.3 where the node field is optional (no in Required colunm). But the specification seems to not define the semantics of a requirement assignment with no node.
Proposition:
- Define the semantics of a requirement assignment with no
nodeor - Make
noderequired in the first table in section 3.8.2.1 of TOSCA 1.3.
Perhaps this should be also applied to TOSCA 2.0 https://docs.oasis-open.org/tosca/TOSCA/v2.0/csd05/TOSCA-v2.0-csd05.html#_Toc125468590.
Nice to hear from you Philippe. Yes, this should be clarified in the spec. If the capability keyword in a requirement assignment refers to a capability name (as opposed to a capability type), then
- Either a valid node type must have been specified in the corresponding requirement definition, or
- A valid node type or node name must have been specified in the requirement assignment.