docs: fix issues
[parser.git] / tosca2heat / heat-translator-0.3.0 / translator / tests / data / storage / tosca_blockstorage_with_attachment_notation1.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4   TOSCA simple profile with a Single Block Storage node shared by 2-Tier Application with custom AttachesTo Type and implied relationships.
5
6 relationship_types:
7   MyAttachesTo:
8     derived_from: tosca.relationships.AttachesTo
9     properties:
10       location:
11         type: string
12         default: /default_location
13
14 topology_template:
15   inputs:
16     cpus:
17       type: integer
18       description: Number of CPUs for the server.
19       constraints:
20         - valid_values: [ 1, 2, 4, 8 ]
21     storage_size:
22       type: scalar-unit.size
23       default: 1 GB
24       description: Size of the storage to be created.
25     storage_snapshot_id:
26       type: string
27       description: >
28         Optional identifier for an existing snapshot to use when creating storage.
29
30   node_templates:
31     my_web_app_tier_1:
32       type: tosca.nodes.Compute
33       capabilities:
34         host:
35           properties:
36             disk_size: 10 GB
37             num_cpus: { get_input: cpus }
38             mem_size: 4096 MB
39         os:
40           properties:
41             architecture: x86_64
42             type: Linux
43             distribution: Fedora
44             version: 18.0
45       requirements:
46         - local_storage:
47             node: my_storage
48             relationship: MyAttachesTo
49
50     my_web_app_tier_2:
51       type: tosca.nodes.Compute
52       capabilities:
53         host:
54           properties:
55             disk_size: 10 GB
56             num_cpus: { get_input: cpus }
57             mem_size: 4096 MB
58         os:
59           properties:
60             architecture: x86_64
61             type: Linux
62             distribution: Fedora
63             version: 18.0
64       requirements:
65         - local_storage:
66             node: my_storage
67             relationship:
68               type: MyAttachesTo
69               properties:
70                 location: /some_other_data_location
71
72     my_storage:
73       type: tosca.nodes.BlockStorage
74       properties:
75         size: { get_input: storage_size }
76         snapshot_id: { get_input: storage_snapshot_id }
77
78   outputs:
79     private_ip_1:
80       description: The private IP address of the application's first tier.
81       value: { get_attribute: [my_web_app_tier_1, private_address] }
82     private_ip_2:
83       description: The private IP address of the application's second tier.
84       value: { get_attribute: [my_web_app_tier_2, private_address] }
85     volume_id:
86       description: The volume id of the block storage instance.
87       value: { get_attribute: [my_storage, volume_id] }