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

Extended grammar for requirement relationship assignment unsupported #253

Open philippemerle opened 2 years ago

philippemerle commented 2 years ago

For the following service template

tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
  node_templates:
    compute:
      type: tosca.nodes.Compute
      requirements:
      - local_storage:
          node: storage
          relationship:
            properties:
              location: /path_to_access_the_storage_from_the_compute
    storage:
      type: BlockStorage
      properties:
        name: storage

opera raises an error

$ opera validate issue.yaml 
Validating service template...
issue.yaml:8:11: [RequirementAssignment] Expected a relationship template name as a 'relationship' value.

So the second table in Section 3.8.2.1 and the whole Section 3.8.2.2.3 of TOSCA 1.3 seem to be not supported.

anzoman commented 2 years ago

Thanks for discovering this @philippemerle , this is not surprising to me since we focused more on standard notation when implementing opera parser as those extended grammar notation features sometimes feel unnatural and are in some occasions even hard to implement as they can clash with standard notations.

But we have this feature in the backlog for the future and we should see if the same notation will also be present in TOSCA 2.0. Some time ago we also decided to separate xOpera TOSCA parser from the opera orchestrator (we already have it and just have to use it in the orchestrator in one of the future version), so I also invite you to take a look at https://github.com/xlab-si/xopera-tosca-parser and from now on we can open any new issues regarding TOSCA parsing there.

philippemerle commented 2 years ago

For info, TOSCA 2.0 still supports this extended notation, see Section 4.3.5.6.2.3 https://docs.oasis-open.org/tosca/TOSCA/v2.0/csd03/TOSCA-v2.0-csd03.html#_Toc56506397.