Open aszs opened 2 years ago
Thanks Mikhail for providing these use cases. You are correct that the TOSCA v1.3 syntax does not allow you to unambiguously define intended requirement mapping behavior. I believe there are two different scenarios that need to be supported:
Your question is very timely, because the TOSCA TC is planning to revisit v2.0 substitution mapping later this month.
Hi! Is there any progress on that task? Current syntax for the requirement mapping does not allow to map requirements of the substituted type to requirements of multiple nodes.
Can't the
map
of requirement mappings be replaced with the list of maps, as it is done in requirement definition and assignment?For example:
This may be isomorphic to:
But in the first example the host will be explicitly set in the top level template (where
directives: [ substitute ]
is used). And the second meaning can be used, when template is deployed independently, and the requirement must be fulfilledIn case, when multiple requirements with the same name are listed in the top level template, each of them is mapped to each node in the substitution:
Here, after substitution, each software (a, b, c) will have two hosts in the requirements.
Does it break the contract somewhere? Or I miss some validation problems?