ariatosca-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tal Liron (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ARIA-356) Specifying relationship type in a node template ignores the input overrides
Date Tue, 29 Aug 2017 18:00:00 GMT
Tal Liron created ARIA-356:
------------------------------

             Summary: Specifying relationship type in a node template ignores the input overrides
                 Key: ARIA-356
                 URL: https://issues.apache.org/jira/browse/ARIA-356
             Project: AriaTosca
          Issue Type: Story
            Reporter: Tal Liron


See this example:
{code}
tosca_definitions_version: tosca_simple_yaml_1_0

data_types:

  MyData:
    properties:
      field:
        type: string
        default: default value

relationship_types:

  MyRelationship:
    interfaces:
      Configure:
        type: tosca.interfaces.relationship.Configure
        add_target:
          inputs:
            my_input:
              type: MyData

capability_types:

  MyCapability: {}

node_types:

  MyNode1:
    capabilities:
      my_capability: MyCapability

  MyNode2:
    requirements:
      - my_requirement:
          capability: MyCapability
          relationship: MyRelationship

topology_template:

  node_templates:

    my_node1:
      type: MyNode1

    my_node2:
      type: MyNode2
      requirements:
        - my_requirement:
            relationship:
              type: MyRelationship # THE PROBLEM
              interfaces:
                Configure:
                  add_target:
                    inputs:
                      my_input:
                        field: assigned value
{code}
The above will fail to parse with this error:
{code}
Validation issues:
  4: interface definition "Configure" does not assign a value to a required operation input
"add_target.my_input" in "relationship"
{code}
The reason is that specifying the type (see the line with the "THE PROBLEM" comment) causes
ARIA to ignore the following interface definition, so indeed the required input remains unassigned.

Commenting out the "THE PROBLEM" line will allow the service template to parse correctly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message