update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b second try
[osm/SO.git] / common / python / rift / mano / tosca_translator / test / data / ping_pong_csar / Definitions / ping_pong_nsd.yaml
1 tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
2 description: Toy NS
3 metadata:
4   ID: ping_pong_nsd
5   vendor: RIFT.io
6   version: 1.0
7 data_types:
8   tosca.datatypes.network.riftio.vnf_configuration:
9     properties:
10       config_details:
11         type: map
12       config_type:
13         type: string
14 capability_types:
15   tosca.capabilities.riftio.mgmt_interface_type:
16     derived_from: tosca.capabilities.Endpoint
17     properties:
18       dashboard_params:
19         type: map
20       vdu:
21         type: string
22   tosca.capabilities.riftio.http_endpoint_type:
23     derived_from: tosca.capabilities.Endpoint
24     properties:
25       path:
26         type: string
27       polling_interval:
28         type: integer
29   tosca.capabilities.riftio.monitoring_param:
30     derived_from: tosca.capabilities.nfv.Metric
31     properties:
32       description:
33         type: string
34       group_tag:
35         default: Group1
36         type: string
37       http_endpoint_ref:
38         type: string
39       id:
40         type: integer
41       json_query_method:
42         default: NAMEKEY
43         type: string
44       name:
45         type: string
46       units:
47         type: string
48       value_type:
49         default: INT
50         type: string
51       widget_type:
52         default: COUNTER
53         type: string
54 node_types:
55   tosca.nodes.riftio.CP1:
56     derived_from: tosca.nodes.nfv.CP
57     properties:
58       cp_type:
59         description: Type of the connection point
60         type: string
61       name:
62         description: Name of the connection point
63         type: string
64       vdu_intf_name:
65         description: Name of the interface on VDU
66         type: string
67       vdu_intf_type:
68         description: Type of the interface on VDU
69         type: string
70   tosca.nodes.riftio.VL1:
71     derived_from: tosca.nodes.nfv.VL.ELAN
72     properties:
73       description:
74         type: string
75   tosca.nodes.riftio.VNF1:
76     derived_from: tosca.nodes.nfv.VNF
77     properties:
78       port:
79         constraints:
80         - in_range: [1, 65535]
81         type: integer
82       vnf_configuration:
83         type: tosca.datatypes.network.riftio.vnf_configuration
84       start_by_default:
85         type: boolean
86         default: true
87     capabilities:
88       http_endpoint:
89         type: tosca.capabilities.riftio.http_endpoint_type
90       mgmt_interface:
91         type: tosca.capabilities.riftio.mgmt_interface_type
92       monitoring_param_0:
93         type: tosca.capabilities.riftio.monitoring_param
94       monitoring_param_1:
95         type: tosca.capabilities.riftio.monitoring_param
96     requirements:
97     - vdus:
98         node: tosca.nodes.riftio.VDU1
99         occurences: [1, UNBOUND]
100         relationship: tosca.relationships.nfv.VirtualLinksTo
101         type: tosca.capabilities.nfv.VirtualLinkable
102   tosca.nodes.riftio.VDU1:
103     derived_from: tosca.nodes.nfv.VDU
104     properties:
105       cloud_init:
106         default: #cloud-config
107         type: string
108       count:
109         default: 1
110         type: integer
111     capabilities:
112       virtualLink:
113         type: tosca.capabilities.nfv.VirtualLinkable
114 group_types:
115   tosca.groups.riftio.ConfigPrimitives:
116     derived_from: tosca.policies.Root
117     properties:
118       primitive: map
119 policy_types:
120   tosca.policies.riftio.InitialConfigPrimitive:
121     derived_from: tosca.policies.Root
122     properties:
123       name:
124         type: string
125       parameter:
126         type: map
127       seq:
128         type: integer
129       user_defined_script:
130         type: string
131   tosca.policies.riftio.ScalingGroup:
132     derived_from: tosca.policies.Root
133     properties:
134       config_actions:
135         type: map
136       max_instance_count:
137         type: integer
138       min_instance_count:
139         type: integer
140       name:
141         type: string
142       vnfd_members:
143         type: map
144 topology_template:
145   policies:
146   - scaling_group_descriptor:
147       config_actions:
148         post_scale_out: ping config
149       max_instance_count: 10
150       min_instance_count: 1
151       name: ping_group
152       type: tosca.policies.riftio.ScalingGroup
153       vnfd_members:
154         ping_vnfd: 1
155   - initial_config_primitive:
156       name: start traffic
157       seq: 1
158       type: tosca.policies.riftio.InitialConfigPrimitive
159       user_defined_script: start_traffic.py
160   groups:
161     config_primitive:
162       type: tosca.groups.riftio.ConfigPrimitives
163       members:
164       - ping_vnfd
165       - pong_vnfd
166       properties:
167         primitives:
168           ping config:
169             user_defined_script: ping_config.py
170   inputs:
171     vendor:
172       type: string
173       description: Translated from YANG
174   node_templates:
175     ping_vnfd:
176       type: tosca.nodes.riftio.VNF1
177       properties:
178         id: 1
179         port: 18888
180         start_by_default: false
181         vendor: RIFT.io
182         version: 1.0
183         vnf_configuration:
184           config_delay: 0
185           config_details:
186             script_type: rift
187           config_type: script
188       capabilities:
189         http_endpoint:
190           properties:
191             path: api/v1/ping/stats
192             polling_interval: 2
193             port: 18888
194             protocol: http
195         mgmt_interface:
196           properties:
197             dashboard_params:
198               path: api/v1/ping/stats
199               port: 18888
200             port: 18888
201             protocol: tcp
202             vdu: ping_vnfd_iovdu_0
203         monitoring_param_0:
204           properties:
205             description: no of ping requests
206             group_tag: Group1
207             http_endpoint_ref: api/v1/ping/stats
208             id: 1
209             json_query_method: NAMEKEY
210             name: ping-request-tx-count
211             units: packets
212             value_type: INT
213             widget_type: COUNTER
214         monitoring_param_1:
215           properties:
216             description: no of ping responses
217             group_tag: Group1
218             http_endpoint_ref: api/v1/ping/stats
219             id: 2
220             json_query_method: NAMEKEY
221             name: ping-response-rx-count
222             units: packets
223             value_type: INT
224             widget_type: COUNTER
225       requirements:
226       - vdus:
227           node: ping_vnfd_iovdu_0
228     pong_vnfd_iovdu_0:
229       type: tosca.nodes.riftio.VDU1
230       properties:
231         cloud_init: "#cloud-config\npassword: fedora\nchpasswd: { expire: False }\n\
232           ssh_pwauth: True\nruncmd:\n  - [ systemctl, daemon-reload ]\n  - [ systemctl,\
233           \ enable, pong.service ]\n  - [ systemctl, start, --no-block, pong.service\
234           \ ]\n  - [ ifup, eth1 ]\n"
235         count: 1
236       capabilities:
237         host:
238           properties:
239             disk_size: 4 GB
240             mem_size: 512 MB
241             num_cpus: 1
242       artifacts:
243         pong_vnfd_iovdu_0_vm_image:
244           file: ../images/Fedora-x86_64-20-20131211.1-sda-pong.qcow2
245           image_checksum: 1234567890abcdefg
246           type: tosca.artifacts.Deployment.Image.riftio.QCOW2
247       interfaces:
248         Standard:
249           create: pong_vnfd_iovdu_0_vm_image
250     pong_vnfd_cp0:
251       type: tosca.nodes.riftio.CP1
252       properties:
253         cp_type: VPORT
254         name: pong_vnfd/cp0
255         vdu_intf_name: eth0
256         vdu_intf_type: VIRTIO
257       requirements:
258       - virtualBinding:
259           node: pong_vnfd_iovdu_0
260       - virtualLink:
261           node: ping_pong_vld
262     ping_pong_vld:
263       type: tosca.nodes.riftio.VL1
264       properties:
265         description: Toy VL
266         vendor: RIFT.io
267     ping_vnfd_cp0:
268       type: tosca.nodes.riftio.CP1
269       properties:
270         cp_type: VPORT
271         name: ping_vnfd/cp0
272         vdu_intf_name: eth0
273         vdu_intf_type: VIRTIO
274       requirements:
275       - virtualBinding:
276           node: ping_vnfd_iovdu_0
277       - virtualLink:
278           node: ping_pong_vld
279     pong_vnfd:
280       type: tosca.nodes.riftio.VNF1
281       properties:
282         id: 2
283         port: 18889
284         vendor: RIFT.io
285         version: 1.0
286         vnf_configuration:
287           config_delay: 60
288           config_details:
289             script_type: rift
290           config_type: script
291       capabilities:
292         http_endpoint:
293           properties:
294             path: api/v1/pong/stats
295             polling_interval: 2
296             port: 18889
297             protocol: http
298         mgmt_interface:
299           properties:
300             dashboard_params:
301               path: api/v1/pong/stats
302               port: 18889
303             port: 18889
304             protocol: tcp
305             vdu: pong_vnfd_iovdu_0
306         monitoring_param_0:
307           properties:
308             description: no of ping requests
309             group_tag: Group1
310             http_endpoint_ref: api/v1/pong/stats
311             id: 1
312             json_query_method: NAMEKEY
313             name: ping-request-rx-count
314             units: packets
315             value_type: INT
316             widget_type: COUNTER
317         monitoring_param_1:
318           properties:
319             description: no of ping responses
320             group_tag: Group1
321             http_endpoint_ref: api/v1/pong/stats
322             id: 2
323             json_query_method: NAMEKEY
324             name: ping-response-tx-count
325             units: packets
326             value_type: INT
327             widget_type: COUNTER
328       requirements:
329       - vdus:
330           node: pong_vnfd_iovdu_0
331     ping_vnfd_iovdu_0:
332       type: tosca.nodes.riftio.VDU1
333       properties:
334         cloud_init: "#cloud-config\npassword: fedora\nchpasswd: { expire: False }\n\
335           ssh_pwauth: True\nruncmd:\n  - [ systemctl, daemon-reload ]\n  - [ systemctl,\
336           \ enable, ping.service ]\n  - [ systemctl, start, --no-block, ping.service\
337           \ ]\n  - [ ifup, eth1 ]\n"
338         count: 1
339       capabilities:
340         host:
341           properties:
342             disk_size: 4 GB
343             mem_size: 512 MB
344             num_cpus: 1
345       artifacts:
346         ping_vnfd_iovdu_0_vm_image:
347           file: ../images/Fedora-x86_64-20-20131211.1-sda-ping.qcow2
348           image_checksum: 1234567890abcdefg
349           type: tosca.artifacts.Deployment.Image.riftio.QCOW2
350       interfaces:
351         Standard:
352           create: ping_vnfd_iovdu_0_vm_image