summaryrefslogtreecommitdiffstats
path: root/javatoscachecker/checker/src/test/tosca/workflow_1.yaml
blob: fda6a279da9164ceeffa0ce89a8be75d5cacf1b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
tosca_definitions_version: tosca_simple_yaml_1_1_0

imports:
  - example: tosca/tosca-examples-types.yaml

topology_template:

  inputs:
    software_version:
      type: version
      default: 0.1
    management_option:
      type: string
      default: ATT
      constraints:
        - valid_values: [ ATT, CUSTOMER ]

  node_templates:
    my_server:
      type: tosca.nodes.Compute
    mysql:
      type: tosca.nodes.DBMS.MySQL
      requirements:
        - host: my_server
      interfaces:
        tosca.interfaces.nodes.custom.Backup:
#  operations:
          backup: backup.sh
  workflows:
    backup:
      description: Performs a snapshot of the MySQL data.
      preconditions:
        - target: my_server
          condition:
            - assert:
              - state: [{equal: available}]
        - target: mysql
          condition:
            - assert:
              - state: [{valid_values: [started, available]}]
              - my_attribute: [{equal: ready }]
      steps:
        my_step:
          target: mysql
          activities:
            - call_operation: tosca.interfaces.nodes.custom.Backup.backup