blob: 7e6e375865b649b52ebe4cdf4958ff5f3de61d64 (
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
|
tosca_definitions_version: tosca_simple_yaml_1_1
#it fails because DBMS node type has no Backup interface defined
metadata:
outcome: "fail"
imports:
- examples: tosca/tosca-examples-types.yaml
topology_template:
node_templates:
my_server:
type: tosca.nodes.Compute
mysql:
type: tosca.nodes.DBMS.MySQL
requirements:
- host: my_server
interfaces:
tosca.interfaces.nodes.custom.Backup:
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
|