OASIS Topology and Orchestration Specification for Cloud Applications (TOSCA) TC

 View Only

Attibute mapping vs. Attribute mapping definition

  • 1.  Attibute mapping vs. Attribute mapping definition

    Posted 01-19-2021 14:10
    Dear Calin and Tosca Community   Can you help us to clarify the intended usage of attribute mapping and attribute mapping definition.   In https://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.3/os/TOSCA-Simple-Profile-YAML-v1.3-os.html   The spec states that:   “3.8.9 Attribute mapping An attribute mapping allows to map the attribute of a substituted node type an output of the topology template.   3.6.15 Attribute Mapping definition An attribute mapping defines a named output value that is expected to be returned by an operation implementations and a mapping that specifies the node or relationship attribute into which the returned output value must be stored.”   Which of the two attribute mapping is to be used in the following parts of the standard:   3.8.13 Substitution mapping   attributes - map of attribute mappings   -> 3.8.1 (our assumption)   3.6.19 Notification definition   outputs - map of attribute mappings      -> 3.6.15 (our assumption)   3.8.7 Imperative Workflow definition   outputs - map of attribute mappings      -> 3.6.15 (our assumption)   3.6.17 Operation definition   outputs - map of attribute mappings      -> 3.6.15 (our assumption)   Are these assumptions correct?   The spec states the following: “In 3.6.15 Attribute Mapping definition   SELF SOURCE TARGET    For operation outputs in interfaces on node templates, the only allowed keyname is SELF: output values must always be stored into attributes that belong to the node template that has the interface for which the output values are returned.    For operation outputs in interfaces on relationship templates, allowable keynames are SELF, SOURCE, or TARGET.”   but in 3.6.17 Operation definition also includes attribute mappings.    “The optional map of attribute mappings that specify named operation output values and their mappings onto attributes of the node_type or relationship that contains the interface within which the operation is defined.   Operations may appear inside a type definition.” For example, interface type.   So 3.6.15 states that a mapping shall start with SELF, SOURCE or TARGET (only present in templates ex. node template), but attribute mapping appears in type definitions (ex. Interface type).   tosca_definitions_version: tosca_simple_yaml_1_2 interface_types:   interface_type_1:     derived_from: tosca.interfaces.Root     operation_1:       outputs:         o1: [ TARGET, a, b, c ]   Can you help us to clarify this situation?   Thanks Denes