## 5 Prototypical Validation and Case Study
### Variability4 TOSCA: An Extension of the TOSCA Standard
#### 5.1.2 Extending TOSCA for VDMM  
To support VDMM, we extend the TOSCA standard as follows. Variability4 TOSCA is based on TOSCA Simple Profile in YAML Version 1.3 [4] and introduces conditional elements. Thereby, we extend the Topology Template with a _Variability Definition_ that contains _Variability Inputs_. A Variability Condition is modeled as a Boolean expression producing a Boolean value, i.e., _true_ or _false_, when evaluated. Thereby, Boolean, arithmetic, and constraint operators along with intrinsic functions can be used inside conditions. These include, among others, _and_, _or_, _not_, _xor_, _implies_, _getVariabilityInput_, _getVariabilityCondition_, _getElementPresence_, _add_, _sub_, _concat_, _equal_, and _greaterThan_ operators. To model conditional elements, we extend _Node Templates_, _Requirement Assignments_, and _Group Definitions_ with the capability to contain a _Variability Condition_. Requirement Assignments are entities in TOSCA that assign the Source and Target Node Template to a Relationship Template, while Group Definitions are used to group Node Templates. Furthermore, we extend Group Definitions by allowing Requirement Assignments to be group members. An example of a conditional element from our motivating scenario is shown in Listing 1 in Line 13: The Node Template \"DevRuntime\" is only present if the Variability Condition in Line 15 is true, thus, if the Variability Input \"mode\" equals \"dev\". It is also possible to assign multiple conditions by specifying a list. In such a case, the conditions are combined using the logical _and_ operator. To reduce repetitiveness, a Variability Condition, or even only parts of the condition, can be defined globally as part of the Variability Definition and then referenced on multiple occasions. ```
1 topology_template:
2 node_templates:
3 WebComponent:
4 type: Nodes14 App
5 requirements:
6-host:
7 node: DevRuntime
8 conditions: {equal: [{get_variability_input: mode}, devl}]
9-host:
10 node: ProdRuntime
11 conditions: {equal: [{get_variability_input: mode}, prod}]
12...
13 DevRuntime:
14 type: Nodes14 Runtime
15 conditions: {equal: [{get_variability_input: mode}, devl}]
16...
17 ProdRuntime:
18 type: GoogleAppEngine
19 conditions: {equal: [{get_variability_input: mode}, prod}]
20...
21...
22...
23...

### System Architecture for a Variability4 TOSCA Deployment System

In this section, we present a conceptual system architecture for a Variability4 TOSCA Deployment System, which is implemented by our OpenTOSCA Vintner prototype described in the next section. Our system architecture is shown in Figure 5 and consists of the following components. The _Variability4 TOSCA Model Importer_ parses a Variability4 TOSCA model and transforms it into an internal data structure. To derive a Variability-Resolved Deployment Model, the _Variability Resolver_ implements the algorithms from Section 4.2. A derived model is then exported as TOSCA conform deployment model using the _TOSCA Model Exporter_. The _Deployment Manager_ executes the deployment model using _Orchestrator Plugins_ which communicate with TOSCA conform orchestrators. Therefore, our architecture is not restricted to a specific TOSCA orchestrator. TOSCA models and definitions, such as TOSCA Type Definitions and Topology Templates, are stored in the _TOSCA Models_ database. Information about instances of a TOSCA model, such as used Topology Templates, are stored in the _Instance Models_ database. ### OpenTOSCA Vintner

OpenTOSCA Vintner implements the system architecture introduced above. The system is written in NodeJs and can be invoked using the command line or a REST API. The Variability Resolver can be also used as a standalone tool and, thus, be integrated into any toolchain. The Deployment Manager is able to deploy applications using xOpera and Unfurl. Thereby, we implemented a plugin for Linux and for Windows using the Windows-Subsystem for Linux (WSL) [18]. To store TOSCA models and instance models, the filesystem is used.