Skip to content

technologies-throw-required

Variable Service Template

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

tosca_definitions_version: tosca_variability_1_0_rc_3
node_types:
    application:
        derived_from: tosca.nodes.Root
    ansible_host:
        derived_from: tosca.nodes.Root
    terraform_host:
        derived_from: tosca.nodes.Root
    ansible_terraform_host:
        derived_from: tosca.nodes.Root
    database:
        derived_from: tosca.nodes.Root
    dbms:
        derived_from: tosca.nodes.Root
topology_template:
    variability:
        options:
            mode: semantic-loose
            optimization_technologies: true
            optimization_technologies_unique: true
            technology_pruning: true
            technology_constraint: true
            required_technology_check: true
        qualities:
            - component: ansible_host
              technology: terraform
            - component: terraform_host
              technology: terraform
            - component: ansible_terraform_host
              technology: terraform
            - component: database
              technology: terraform
            - component: dbms
              technology: terraform
    node_templates:
        application:
            type: application
            persistent: true
            requirements:
                - host:
                      node: ansible_host
                      conditions: false
                - host:
                      node: terraform_host
                      conditions: false
                - host:
                      node: ansible_terraform_host
                - database:
                      node: database
        ansible_host:
            type: ansible_host
        terraform_host:
            type: terraform_host
        ansible_terraform_host:
            type: ansible_terraform_host
        database:
            type: database
            technology: terraform
            requirements:
                - host:
                      node: dbms
        dbms:
            type: dbms
            technology: terraform

Expected Error

The following error is expected to be thrown, when resolving variability.

Node "application" has no technology candidates

Last update: December 4, 2024