Skip to content

artifacts-conditional

Variable Service Template

The variability of the following variable service template shall be resolved.

tosca_definitions_version: tosca_variability_1_0
topology_template:
    variability:
        options:
            type_default_condition: true
            expected_artifact_check: false
    node_templates:
        node_one:
            type: node
            artifacts:
                - artifact_one_one:
                      type: artifact_a
                      conditions: true
                - artifact_one_one:
                      type: artifact_b
                      conditions: false
        node_two:
            type: node
            artifacts:
                artifact_two_one:
                    type: artifact
                    conditions: true
        node_three:
            type: node
            artifacts:
                artifact_three_one:
                    type: artifact
        node_four:
            type: node
            artifacts:
                artifact_three_one:
                    type: artifact
                    conditions: false

Variability-Resolved Service Template

The following variability-resolved service template is expected.

tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
    node_templates:
        node_one:
            type: node
            artifacts:
                artifact_one_one:
                    type: artifact_a
        node_two:
            type: node
            artifacts:
                artifact_two_one:
                    type: artifact
        node_three:
            type: node
            artifacts:
                artifact_three_one:
                    type: artifact
        node_four:
            type: node

Last update: November 18, 2024