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

Use all artifacts when accessing them with get_artifact function #111

Closed anzoman closed 4 years ago

anzoman commented 4 years ago

These changes apply mostly to the usage of get_artifact TOSCA function. Up until now opera used just the artifacts defined within node types and when addressing them with get_artifact everything worked okay. Fine, right? No, there's more that meets the eye. Artifacts can also be defined right before the deployment within the node template itself. So we needed to take those into account too, so that they can be accessed with get_artifact function. Since TOSCA does not specially define artifact assignments, there is no priority between them. This could then result in error if user defines the artifact with the same name in node type and node template. However, TOSCA states that when having duplicated artifacts, the ones in node template should augment those that were provided by its declared node type. So this still leaves us with the idea that we need to prioritize node templates' artifacts. We have also updated an example in /examples/artifacts to test both types of artifact definitions.