Add database subsystem definition in the use case of
[parser.git] / tosca2heat / tosca-parser / toscaparser / tests / data / test_requirements.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4   Test Requirements.
5
6 imports:
7   - custom_types/wordpress.yaml
8
9 topology_template:
10   node_templates:
11     my_app:
12       description: >
13         Specify multiple requirement via node and relationship keyword,
14         as an explicit relationship. Also demonstrates relationship with
15         type keyword and without it as an in-line reference.
16       type: tosca.nodes.WebApplication.WordPress
17       requirements:
18         - req1:
19             node: my_webserver
20             relationship: tosca.relationships.HostedOn
21         - req2:
22             node: mysql_database
23             relationship:
24               type: tosca.relationships.ConnectsTo
25     mysql_database:
26       description: Specify requirement via a capability as an implicit relationship.
27       type: tosca.nodes.Database
28       requirements:
29         - host:
30             node: my_dbms
31             relationship: tosca.relationships.HostedOn
32     my_dbms:
33       type: tosca.nodes.DBMS
34     my_webserver:
35       type: tosca.nodes.WebServer
36     my_server:
37       description: >
38         Specify requirement via a relationship template, as an explicit relationship.
39       type: tosca.nodes.Compute
40       capabilities:
41         host:
42           properties:
43             num_cpus: 2
44             disk_size: 10 GB
45             mem_size: 4 MB
46         os:
47           properties:
48             # host Operating System image properties
49             architecture: x86_64
50             type: linux
51             distribution: rhel
52             version: 6.5
53       requirements:
54         - req1:
55             node: my_storage
56             relationship: storage_attachment
57     my_storage:
58       type: tosca.nodes.BlockStorage
59       properties:
60         size: 1 GiB
61         snapshot_id: id
62
63   relationship_templates:
64     storage_attachment:
65       type: tosca.relationships.AttachesTo
66       properties:
67         location: /temp