Skip to content

implications-naive-motivating-scenario-static

Variable Service Template

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

tosca_definitions_version: tosca_variability_1_0
topology_template:
    variability:
        inputs:
            static:
                type: boolean
                default: true
        presets:
            static:
                inputs:
                    static: true
            elastic:
                inputs:
                    static: false
        expressions:
            is_static:
                equal:
                    - variability_input: static
                    - true
            is_elastic:
                equal:
                    - variability_input: static
                    - false
        options:
            mode: semantic-loose
            node_default_condition_mode: incomingnaive-host
            hosting_stack_constraint: true
            optimization_topology: true
    node_templates:
        shop:
            type: shop.component
            persistent: true
            requirements:
                - host:
                      node: os_kubernetes
                      conditions:
                          logic_expression: is_static
                - host:
                      node: gcp_runtime
                      conditions:
                          logic_expression: is_elastic
                - database:
                      node: database
                      conditions: true
                      implied: true
        database:
            type: shop.database
            requirements:
                - host:
                      node: os_dbms
                - host:
                      node: gcp_dbms
        os_dbms:
            type: os.dbms
            requirements:
                - host: os_kubernetes
        os_monitor:
            type: os.monitor
            requirements:
                - host: os_kubernetes
        os_logger:
            type: os.logger
            requirements:
                - host: os_kubernetes
        os_kubernetes:
            type: os.kubernetes
            requirements:
                - host: os_compute
        os_compute:
            type: os.compute
            requirements:
                - host: os_cloud
        os_cloud:
            type: os_cloud
        gcp_dbms:
            type: gcp.dbms
            requirements:
                - host: gcp_cloud
        gcp_runtime:
            type: gcp.runtime
            requirements:
                - host: gcp_cloud
        gcp_cloud:
            type: gcp.cloud

Variability-Resolved Service Template

The following variability-resolved service template is expected.

tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
    node_templates:
        shop:
            type: shop.component
            requirements:
                - host: os_kubernetes
                - database: database
        database:
            type: shop.database
            requirements:
                - host: os_dbms
        os_dbms:
            type: os.dbms
            requirements:
                - host: os_kubernetes
        os_monitor:
            type: os.monitor
            requirements:
                - host: os_kubernetes
        os_logger:
            type: os.logger
            requirements:
                - host: os_kubernetes
        os_kubernetes:
            type: os.kubernetes
            requirements:
                - host: os_compute
        os_compute:
            type: os.compute
            requirements:
                - host: os_cloud
        os_cloud:
            type: os_cloud

Last update: December 4, 2024