Update tosca lib to version 0.5
[parser.git] / tosca2heat / heat-translator / translator / tests / data / storage / tosca_blockstorage_with_attachment.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4   TOSCA simple profile with server and attached block storage using the normative AttachesTo Relationship Type.
5
6 topology_template:
7
8   inputs:
9     cpus:
10       type: integer
11       description: Number of CPUs for the server.
12       constraints:
13         - valid_values: [ 1, 2, 4, 8 ]
14     storage_size:
15       type: scalar-unit.size
16       description: Size of the storage to be created.
17       default: 1 GB
18     storage_snapshot_id:
19       type: string
20       description: >
21         Optional identifier for an existing snapshot to use when creating storage.
22     storage_location:
23       type: string
24       description: Block storage mount point (filesystem path).
25
26   node_templates:
27     my_server:
28       type: Compute
29       capabilities:
30         host:
31           properties:
32             disk_size: 10 GB
33             num_cpus: { get_input: cpus }
34             mem_size: 4096 kB
35         os:
36           properties:
37             architecture: x86_64
38             type: linux
39             distribution: fedora
40             version: 18.0
41       requirements:
42         - local_storage:
43             node: my_storage
44             relationship:
45               type: AttachesTo
46               properties:
47                 location: { get_input: storage_location }
48
49     my_storage:
50       type: BlockStorage
51       properties:
52         size: { get_input: storage_size }
53         snapshot_id: { get_input: storage_snapshot_id }
54
55   outputs:
56     private_ip:
57       description: The private IP address of the newly created compute instance.
58       value: { get_attribute: [my_server, private_address] }
59     volume_id:
60       description: The volume id of the block storage instance.
61       value: { get_attribute: [my_storage, volume_id] }