update parser document
[parser.git] / docs / parser_docs / tosca2heat / examples / TOSCA_nfv_definition_1_0.yaml
1 # Licensed :under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 #  http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12
13 ###########################################################################
14 # The content of this file reflects TOSCA nfv Profile in YAML version
15 # 1.0.0, which is derived from TOSCA Simple Profile. It describes the
16 # definition for nfv TOSCA types including Node Type,
17 # Relationship Type, Capability Type and Interfaces.
18 ###########################################################################
19 tosca_definitions_version: tosca_simple_yaml_1_0
20
21 metadata:
22   template_name: tosca_simple_profile_for_nfv
23   template_author: opnfv_parser_project
24   template_version: tosca_simple_profile_for_nfv_1_0
25
26 ###########################################################################
27 # Node Type.
28 # A Node Type is a reusable entity that defines the type of one or more
29 # Node Templates.
30 ###########################################################################
31 node_types:
32   tosca.nodes.nfv.VNF:
33     derived_from: tosca.nodes.Root
34     properties:
35       id:
36         type: string
37         description: ID of this VNF
38       vendor:
39         type: string
40         description: name of the vendor which provides this VNF
41       version:
42         type: version
43         description: version of the software for this VNF
44     requirements:
45       - virtualLink:
46           capability: tosca.capabilities.nfv.VirtualLinkable
47
48   tosca.nodes.nfv.VDU:
49     derived_from: tosca.nodes.SoftwareComponent
50     properties:
51       id:
52         type: string
53         required: true
54         description: >
55           A unique identifier of this VDU within the scope
56           of the VNFD, including version functional
57           description and other identification information.
58           This will be used to refer to VDU when defining
59           relationships between them.
60     capabilities:
61       high_availability:
62         type: tosca.capabilities.nfv.HA
63       virtualbinding:
64         type: tosca.capabilities.nfv.VirtualBindable
65       monitoring_parameter:
66         type: tosca.capabilities.nfv.Metric
67     requirements:
68       - high_availability:
69           capability: tosca.capabilities.nfv.HA
70           relationship: tosca.relationships.nfv.HA
71           occurrences: [ 0, 1 ]
72       - host:
73           capability: tosca.capabilities.Container
74           node: tosca.nodes.Compute
75           relationship: tosca.relationships.HostedOn
76
77   tosca.nodes.nfv.CP:
78     derived_from: tosca.nodes.Root
79     properties:
80       type:
81         type: string
82         required: false
83     attributes:
84       IP_address:
85         type: string
86         required: false
87     requirements:
88       - virtualLink:
89           capability: tosca.capabilities.nfv.VirtualLinkable
90       - virtualbinding:
91           capability: tosca.capabilities.nfv.Virtualbindable
92
93   tosca.nodes.nfv.VL:
94     derived_from: tosca.nodes.Root
95     properties:
96       vendor:
97         type: string
98         required: true
99         description: name of the vendor who generate this VL
100     capabilities:
101       virtual_linkable:
102         type: tosca.capabilities.nfv.VirtualLinkable
103
104   tosca.nodes.nfv.VL.ELine:
105     derived_from: tosca.nodes.nfv.VL
106     capabilities:
107       virtual_linkable:
108         occurrences: 2
109
110   tosca.nodes.nfv.VL.ELAN:
111     derived_from: tosca.nodes.nfv.VL
112
113   tosca.nodes.nfv.VL.ETree:
114     derived_from: tosca.nodes.nfv.VL
115
116   tosca.nodes.nfv.FP:
117     derived_from: tosca.nodes.Root
118     properties:
119       policy:
120         type: string
121         required: false
122         description: name of the vendor who generate this VL
123     requirements:
124       - forwarder:
125           capability: tosca.capabilities.nfv.Forwarder
126
127 ##########################################################################
128 # Capability Type.
129 # A Capability Type is a reusable entity that describes a kind of
130 # capability that a Node Type can declare to expose.
131 ##########################################################################
132 capability_types:
133   tosca.capabilities.nfv.VirtualBindable:
134     derived_from: tosca.capabilities.Root
135
136   tosca.capabilities.nfv.HA:
137     derived_from: tosca.capabilities.Root
138     valid_source_types: [ tosca.nodes.nfv.VDU ]
139
140   tosca.capabilities.nfv.HA.ActiveActive:
141     derived_from: tosca.capabilities.nfv.HA
142
143   tosca.capabilities.nfv.HA.ActivePassive:
144     derived_from: tosca.capabilities.nfv.HA
145
146   tosca.capabilities.nfv.Metric:
147     derived_from: tosca.capabilities.Root
148
149   tosca.capabilities.nfv.Forwarder:
150     derived_from: tosca.capabilities.Root
151
152   tosca.capabilities.nfv.VirtualLinkable:
153     derived_from: tosca.capabilities.Root
154
155   tosca.capabilities.nfv.CPU_extension:
156     derived_from: tosca.capabilities.Root
157     properties:
158       cpu_instruction_set_extension:
159         type: list
160         required: false
161         entry_schema:
162           type: string
163         constraints:
164           - min_length: 1
165         description: >
166           Instruction sets are often enhanced with
167           instruction set extensions. This element
168           represents instruction set extensions that the
169           VDU has been developed, optimized or tested with
170       cpu_model:
171         type: list
172         required: false
173         entry_schema:
174           type: string
175         constraints:
176           - min_length: 1
177         description: >
178           The CPU model for which the VDU has been
179           developed, compiled with CPU model specific
180           optimisations, optimized or validated on.
181       cpu_model_specification_binding:
182         type: string
183         required: false
184         description: >
185           VDUs may be developed, compiled, optimized
186           or validated on particular CPU models. Some
187           deployments may wish to permit the VDU to
188           be deployed on a platform with the specified
189           CPU only, or with an alternative CPU with the
190           same architecture, instruction set, and if
191           specified, instruction set extensions, or with a
192           CPU of equivalent or greater capability.
193       cpu_min_clock_speed:
194         type: string
195         required: false
196         description: >
197           The minimum CPU clock speed may be one of
198           the elements that the development and
199           validation of the VDU has been considered
200           with. This may be in conjunction with some of
201           the other CPU elements such as CPU Model.
202           Requiring a minimum clock speed may be part
203           of a deployment requirement necessary to
204           help ensure particular performance or timing
205           related characteristics are met in the
206           deployment.
207       cpu_core_reservation:
208         type: string
209         required: false
210         description: >
211           The number of CPU cores allocated to the
212           VDU. This may be necessary to help ensure
213           particular performance or timing related
214           characteristics are met in the deployment.
215       cpu_simultaneous_multi_threading_hw_thread_specification:
216         type: string
217         required: false
218         description: >
219           The use of Simultaneous Multi-Threading HW
220           is an efficient way to increase the compute
221           capacity of a platform. SMT HW threads share
222           some CPU core resources. In some VDU
223           implementations, it may be necessary to very
224           explicitly control the HW thread allocation on a
225           platform. This could be to help ensure locality
226           in data caches or as a mechanism to enhance
227           determinism.
228       cpu_core_oversubscription_policy:
229         type: string
230         required: false
231         description: >
232           The VDU may co-exist on a platform with
233           multiple VDUs or VMs and as such will be
234           sharing CPU core resources available in the
235           platform. It may be necessary to specify the
236           CPU core oversubscription policy in terms of
237           virtual cores to physical cores/threads on the
238           platform. This policy could be based on
239           required VDU deployment characteristics such
240           as high performance, low latency, and /or
241           deterministic behaviour.
242       cpu_core_and_hw_thread_allocation_topology_policy:
243         type: string
244         required: false
245         description: >
246           The VDU may be designed to use a specific
247           mapping of virtual CPUs to HW threads or
248           cores with a specific allocation topology in
249           order to ensure locality in data caches and
250           maximize performance. The VDU will not
251           specify which physical resources to use, but
252           may specify if virtual CPUs shall be coupled
253           together as HW threads belonging to the same
254           core, or as belonging to the same processor.
255       cpu_last_level_cache_size:
256         type: scalar-unit.size
257         required: false
258         constraints:
259           - greater_or_equal: 0 KB
260         description: >
261           The size of the last level cache may impact the
262           performance of the VDU, particularly for cache
263           intensive workloads.
264       cpu_direct_io_access_to_cache:
265         type: string
266         required: false
267         description: >
268           The ability of an I/O device to have direct
269           access to the CPU cache enables
270           considerable memory access savings and for
271           I/O intensive workloads can offer significant
272           performance benefits.
273       cpu_translation_look_aside_buffer_parameter:
274         type: list
275         required: false
276         entry_schema:
277           type: string
278         constraints:
279           - min_length: 1
280         description: >
281           The Translation Look-aside Buffer (TLB) is a
282           cache for address translation typically used by
283           a hardware based memory management units.
284           The Input/Output TLB (IOTLB) is a cache for
285           address translation related to remapping
286           hardware. The availability of a TLB and an
287           IOTLB can significantly improve the
288           performance of a virtual machine.
289           A number of parameters of the TLBs impact
290           the performance potential. These include:
291           1  TLB Size.
292           2  TLB Large Page Support.
293           3  IOTLB Size.
294           4  IOTLB Large Page Support.
295       cpu_hot_add:
296         type: boolean
297         required: false
298         description: >
299           Hot add CPU is the ability to dynamically add
300           CPUs to a running system. The new CPU can
301           immediately replace a failing CPU via
302           migration or be brought on-line later.
303       cpu_support_accelerator:
304         type: list
305         required: false
306         entry_schema:
307           type: string
308         constraints:
309           - min_length: 1
310         description: >
311           This capability refers to support by the CPU
312           and associated chipsets of a data processing
313           accelerator framework, together with its
314           libraries and drivers.
315
316   tosca.capabilities.nfv.Memory_extension:
317     derived_from: tosca.capabilities.Root
318     properties:
319       memory_parameter:
320         type: list
321         required: false
322         entry_schema:
323           type: string
324         constraints:
325           - min_length: 1
326         description: >
327           There are a number of memory related parameters that can have a
328           significant impact on the performance and/or reliability of the VDU.
329           These include:
330           •  Memory Type.
331           •  Memory Speed
332           •  Number of memory channels.
333           •  Size of available memory.
334           •  Reliability characteristics such as Memory Error Correction
335           codes.
336           •  Memory oversubscription policy.
337           •  Memory bandwidth required per VDU.
338           •  Number of large pages required per VDU
339           •  Non-Uniform Memory Architecture (NUMA) Allocation Policy,
340           i.e. in NUMA architecture how you specify memory allocation
341           that is cognisant of the relevant process/core allocation. This
342           applies also to allocation of huge pages.
343       memory_hot_add:
344         type: boolean
345         required: false
346         description: >
347           Hot add memory is the ability to add physical memory while the system
348           is running. Added memory can immediately replace failing memory via
349           migration or be brought on-line later.
350
351   tosca.capabilities.nfv.Hypervisors:
352     derived_from: tosca.capabilities.Root
353     properties:
354       hypervisors:
355         type: list
356         required: false
357         entry_schema:
358           type: string
359         constraints:
360           - min_length: 1
361         description: >
362           There are a number of hypervisor related parameters that can have a
363           significant impact on the deployment and performance of the VDU.
364           These include:
365           •  Hypervisor type
366           •  Hypervisor version as a VDU may be validated with a particular
367           version.
368           •  Hypervisor Address Translation support parameters including:
369           o  Second Level Address Translation.
370           o  Second Level Address Translation with Large page
371           support.
372           o  Second Level Address Translation for I/O.
373           o  Second Level Address Translation for I/O with Large page.
374           support. Where "Large" is considered to be 1 GB or
375           greater.
376           o  Support for interrupt remapping, i.e. supporting the IOMMU
377           in the hypervisor.
378           o  Support of data processing acceleration libraries in the
379           hypervisor, i.e. for acceleration libraries which require
380           hypervisor support for high performance.
381
382   tosca.capabilities.nfv.PCIe:
383     derived_from: tosca.capabilities.Root
384     properties:
385       platform_pcie_parameter:
386         type: list
387         required: false
388         entry_schema:
389           type: string
390         constraints:
391           - min_length: 1
392         description: >
393           There are a number of PCIe related parameters that can
394           have a significant impact on the deployment and
395           performance of the VDU. These include:
396           •  PCIe generational capabilities.
397           •  PCIe bandwidth.
398           •  PCIe Device Pass-through.
399           •  PCIe SR-IOV as the VDU may require that an SR-
400           IOV virtual vunction from the specified PCIe
401           device can be allocated to the VM.
402           •  PCIe Device Assignment Affinity. The VDU may
403           require for performance reasons the ability to
404           allocate a partitionable PCIe Device capability
405           such as a NIC port, an entire NIC or a NIC virtual
406           function to the VDU while also ensuring that the
407           selected device is locally connected to the same
408           processor.
409       platform_pcie_parameter:
410         type: string
411         required: false
412         description: >
413           Detecting and reporting correctable and un-correctable
414           (fatal and non-fatal) PCIe errors to software for error
415           handling and remediation.
416       platform_acceleration_device:
417         type: list
418         required: false
419         entry_schema:
420           type: string
421         constraints:
422           - min_length: 1
423         description: >
424           The VDU may have been developed, optimized or
425           tested with an acceleration device such as a crypto
426           accelerator that may typically be accessed over a PCIe
427           bus.
428
429   tosca.capabilities.nfv.network.Interfaces:
430     derived_from: tosca.capabilities.Root
431     properties:
432       network_interface_card_capability:
433         type: list
434         required: false
435         entry_schema:
436           type: string
437         constraints:
438           - min_length: 1
439         description: >
440           The VDU may have been developed, optimized or
441           tested with certain NIC capabilities to benefit items
442           such as performance or scalability. These include:
443           •  TCP Large Segmentation Offload (LSO) for
444           offload the segmentation of large TCP
445           messages into MTU sized packets from the
446           CPU to the NIC.
447           •  Large Receive Offload (LRO), i.e. the
448           inverse of LSO by coalescing incoming
449           TCP/IP packets into larger segments for
450           processing in the CPU.
451           •  Checksum Offload.
452           •  Receive Side Scaling (RSS), for packet
453           distribution between cores.
454           •  Flow Director, for more fine grained (than
455           RSS) packet distribution between cores.
456           •  Mirroring of packets between interfaces.
457           •  Availability of Independent Rx/Tx queues for
458           VM so that queue pairs in the NIC can be
459           allocated to the VMs.
460           •  Jumbo Frame support.
461           •  VLAN tag stripping.
462           •  RDMA support.
463           •  SR-IOV support.
464           •  Data processing acceleration software
465           library support, e.g. DPDK ® - see note.
466       network_interface_bandwidth:
467         type: list
468         required: false
469         entry_schema:
470           type: string
471         constraints:
472           - min_length: 1
473         description: >
474           The network speed/bandwidth to be guaranteed
475           per requested NIC.
476       data_processing_acceleration_library:
477         type: list
478         required: false
479         entry_schema:
480           type: string
481         constraints:
482           - min_length: 1
483         description: >
484           Name and version of the data processing
485           acceleration library used. Orchestration can match
486           any NIC that is known to be compatible with the
487           specified library
488
489   tosca.capabilities.nfv.network.Virtual_switches:
490     derived_from: tosca.capabilities.Root
491     properties:
492       vswitch_capability:
493         type: list
494         required: false
495         entry_schema:
496           type: string
497         constraints:
498           - min_length: 1
499         description: >
500           The VDU may have been developed, optimized or tested with a
501           particular vSwitch and may require specifying the vSwitch type, version
502           and key features such as overlay tunnel termination support.
503
504   tosca.capabilities.nfv.Storage:
505     derived_from: tosca.capabilities.Root
506     properties:
507       storage_requirement:
508         type: scalar-unit.size
509         required: false
510         constraints:
511           - greater_or_equal: 0 MB
512         description: >
513           Required storage characteristics (e.g. size), including Key Quality
514           Indicators (KQIs) for performance and reliability/availability.
515       rdma_support_bandwitdh:
516         type: integer
517         required: false
518         constraints:
519           - greater_or_equal: 0
520         description: >
521           The VDU may have been developed, optimized or tested with a
522           storage supporting RDMA over a given bandwidth.
523
524 ##########################################################################
525 # Relationship Type.
526 # A Relationship Type is a reusable entity that defines the type of one
527 # or more relationships between Node Types or Node Templates.
528 ##########################################################################
529 relationship_types:
530   tosca.relationships.nfv.VirtualBindsTo:
531     derived_from: tosca.relationships.ConnectsTo
532     valid_target_types: [ tosca.capabilities.nfv.VirtualBindable ]
533
534   tosca.relationships.nfv.HA:
535     derived_from: tosca.relationships.Root
536     valid_target_types: [ tosca.capabilities.nfv.HA ]
537
538   tosca.relationships.nfv.Monitor:
539     derived_from: tosca.relationships.ConnectsTo #???
540     valid_target_types: [ tosca.capabilities.nfv.Metric ]
541
542   tosca.relationships.nfv.ForwardsTo:
543     derived_from: tosca.relationships.root
544     valid_target_types: [ tosca.capabilities.nfv.Forwarder ]
545
546   tosca.relationships.nfv.VirtualLinksTo:
547     derived_from: tosca.relationships.ConnectsTo
548     valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable  ]
549
550 ##########################################################################
551  # groups Type.
552  # as defined within the TOSCA nfv Simple Profile specification.
553  # BWT:Not supported by tosca-parser currently, and will be added future.
554 ##########################################################################
555 #group_types:
556 #  tosca.groups.nfv.VNFFG:
557 #    derived_from: tosca.groups.Root
558 #    properties:
559 #      vendor:
560 #        type: string
561 #        required: true
562 #        description: name of the vendor who generate this VNFFG
563 #      version:
564 #        type: string
565 #        required: true
566 #        description: version of this VNFFG
567 #      number_of_endpoints:
568 #        type: integer
569 #        required: true
570 #        description: count of the external endpoints included in this VNFFG
571 #      dependent_virtual_link:
572 #        type: list
573 #        description: Reference to a VLD  used in this Forwarding Graph
574 #        required: true
575 #        entry_schema:
576 #          type: string
577 #      connection_point:
578 #        type: list
579 #        description: Reference to Connection Points forming the VNFFG
580 #        required: true
581 #        entry_schema:
582 #          type: string
583 #      constituent_vnfs:
584 #        type: list
585 #        description: Reference to a list of  VNFD used in this VNF Forwarding Graph
586 #        required: true
587 #        entry_schema:
588 #          type: string
589 #      targets:
590 #        type: list
591 #        required: false
592 #        description: list of  Network Forwarding Path within the VNFFG
593 #        entry_schema:
594 #          type: string
595 #   requirements:
596 #      - forwarder:
597 #          capability: tosca.capabilities.Forwarder
598
599 #datatype_definitions:
600 ##########################################################################
601  # Data Type. To be continue
602  # A Datatype is a complex data type declaration which contains other
603  # complex or simple data types.
604  # BWT: will be added future.
605 ##########################################################################
606
607 #tosca.datatypes.network.XX:
608 #  properties:
609 #    network_name:
610 #      type: string
611 #    network_id:
612 #      type: string
613 #    addresses:
614 #      type: list
615 #      entry_schema:
616 #       type: string
617
618 #artifact_types:
619 ##########################################################################
620  # Artifact Type.To be continue
621  # An Artifact Type is a reusable entity that defines the type of one or more
622  # files which Node Types or Node Templates can have dependent relationships
623  # and used during operations such as during installation or deployment.
624  # BWT: will be added future.
625 ##########################################################################
626 #tosca.artifacts.File.XXX:
627 #  derived_from: tosca.artifacts.Root