Yardsitck Gambia Release 7.2.0 release notes.
[yardstick.git] / samples / tosca.yaml
1 ##############################################################################
2 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 tosca_definitions_version:tosca_simple_yaml_1_0_0
10 description:
11         This module defines a VNF Deployment Unit.
12 import:
13         
14
15 metadata:
16          ID: clearwater
17          Vendor: HP
18 dsl_definitions:
19         compute_props_host_ellis: &compute_props_host_ellis
20                  num_cpu: 4
21                  mem_size: 4096
22         compute_props_host_bono: &compute_props_host_bono
23                  num_cpu: 3
24                  mem_size: 2048
25 node_types:
26         tosca.nodes.compute.ellis:
27                 derived_from: tosca.nodes.compute
28
29         tosca.nodes.compute.bono:
30                 derived_from: tosca.nodes.compute
31
32 topology_template:
33                 # A description of the topology template
34                 description: >
35                         Vdus used in a vnfd
36         inputs:
37                 storage_size:
38                         type: scalar-unit.size
39                         default: 2048
40                         description: The required storage resource
41                         default: 3000
42                         description: The required storage resource
43                 storage_location:
44                         type: string
45                         description: >
46                                 Block storage mount point (filesystem path).
47         node_templates:
48                 ellis:
49                         type: tosca.nodes.Compute
50                         capabilities:
51                                 os:
52                                         properties:
53                                                 architecture:
54                                                 type:
55                                                 distribution:
56                                                 version:
57                                 host:
58                                         properties: *compute_props_host_ellis
59                                 scalable:
60                                         properties:
61                                                 min_instances: 1
62                                                 default_instances: 1
63                         requirements:
64                                 - local_storage:
65                                         node: ellis_BlockStorage
66                                                 relationship:
67                                                         type: AttachesTo
68                                                         properties:
69                                                                 location: { get_input:storage_location }
70                         interfaces:
71                                 Standard:
72                                         start:
73                                                 implementation: start.sh
74                                         delete:
75                                                 implementaion: stop.sh
76                                         stop:
77                                                 implementaion: shutdown.sh
78                 ellis_BlockStorage:
79                         type: tosca.nodes.BlockStorage
80                         properties:
81                                 size: { get_input:storage_size }
82                 bono:
83                         type: tosca.nodes.Compute
84                         capabilities:
85                                 os:
86                                         properties:
87                                                 architecture:
88                                                 type:
89                                                 distribution:
90                                                 version:
91                                 host:
92                                         properties: *compute_props_host_bono
93                                 scalable:
94                                         properties:
95                                                 min_instances: 3
96                                                 default_instances: 3
97                         requirements:
98                                 - local_storage:
99                                         node: bono_BlockStorage
100                                                 relationship:
101                                                         type: AttachesTo
102                                                         properties:
103                                                                 location: { get_input:storage_location }
104                         interfaces:
105                                 Standard:
106                                         start:
107                                                 implementation: start.sh
108                                         delete:
109                                                 implementaion: stop.sh
110                                         stop:
111                                                 implementaion: shutdown.sh
112                 bono_BlockStorage:
113                         type: tosca.nodes.BlockStorage
114                         properties:
115                                 size: { get_input:storage_size }
116         clearwater_network1:
117                         type:tosca.nodes.network.Network
118                         properties:
119                         ip_version:4
120         ellis_port1:
121                         type:tosca.nodes.network.Port
122                         requirements:
123                                 - binding:
124                                         node:ellis
125                                 - link:
126                                          node:clearwater_network1
127         clearwater_network2:
128                         type:tosca.nodes.network.Network
129                         properties:
130                         ip_version:4
131         ellis_port2:
132                         type:tosca.nodes.network.Port
133                         requirements:
134                                 - binding:
135                                         node:ellis
136                                 - link:
137                                          node:clearwater_network2
138         clearwater_network1:
139                         type:tosca.nodes.network.Network
140                         properties:
141                         ip_version:4
142         bono_port1:
143                         type:tosca.nodes.network.Port
144                         requirements:
145                                 - binding:
146                                         node:bono
147                                 - link:
148                                          node:clearwater_network1
149         clearwater_network2:
150                         type:tosca.nodes.network.Network
151                         properties:
152                         ip_version:4
153         bono_port2:
154                         type:tosca.nodes.network.Port
155                         requirements:
156                                 - binding:
157                                         node:bono
158                                 - link:
159                                          node:clearwater_network2