Modify items to be consistent with ONAP
[vnfrqts/requirements.git] / docs / Chapter5.rst
1 :tocdepth: 2
2 **5. VNF Modeling Requirements**
3 =====================================
4
5 a. TOSCA YAML
6 =============
7
8
9 Introduction
10 -------------
11
12 This reference document is the VNF TOSCA Template Requirements for
13 ONAP, which provides recommendations and standards for building VNF
14 TOSCA templates compatible with ONAP initial implementations of
15 Network Cloud. It has the following features:
16
17 1. VNF TOSCA template designer supports GUI and CLI.
18
19 2. VNF TOSCA template is aligned to the newest TOSCA protocol, “Working
20    Draft 04-Revision 06”.
21
22 3. VNF TOSCA template supports EPA features, such as NUMA, Hyper
23    Threading, SRIOV, etc.
24
25 Intended Audience
26 -----------------
27
28 This document is intended for persons developing VNF TOSCA templates
29 that will be orchestrated by ONAP.
30
31 Scope
32 -----
33
34 ONAP implementations of Network Cloud supports TOSCA Templates, also
35 referred to as TOSCA in this document.
36
37 ONAP requires the TOSCA Templates to follow a specific format. This
38 document provides the mandatory, recommended, and optional requirements
39 associated with this format.
40
41 Overview
42 ---------
43
44 The document includes three charters to help the VNF vendors to use the
45 VNF model design tools and understand the VNF package structure and VNF
46 TOSCA templates.
47
48 In the ONAP, VNF Package and VNFD template can be designed by manually
49 or via model designer tools. VNF model designer tools can provide the
50 GUI and CLI tools for the VNF vendor to develop the VNF Package and VNFD
51 template.
52
53 The VNF package structure is align to the NFV TOSCA protocol, and
54 supports CSAR
55
56 The VNFD and VNF package are all align to the NFV TOSCA protocol, which
57 supports multiple TOSCA template yaml files, and also supports
58 self-defined node or other extensions.
59
60 NFV TOSCA Template
61 ------------------
62
63 TOSCA templates supported by ONAP must follow the requirements
64 enumerated in this section.
65
66 TOSCA Introduction
67 ------------------
68
69 TOSCA defines a Meta model for defining IT services. This Meta model
70 defines both the structure of a service as well as how to manage it. A
71 Topology Template (also referred to as the topology model of a service)
72 defines the structure of a service. Plans define the process models that
73 are used to create and terminate a service as well as to manage a
74 service during its whole lifetime.
75
76 A Topology Template consists of a set of Node Templates and Relationship
77 Templates that together define the topology model of a service as a (not
78 necessarily connected) directed graph. A node in this graph is
79 represented by a *Node Template*. A Node Template specifies the
80 occurrence of a Node Type as a component of a service. A *Node Type*
81 defines the properties of such a component (via *Node Type Properties*)
82 and the operations (via *Interfaces*) available to manipulate the
83 component. Node Types are defined separately for reuse purposes and a
84 Node Template references a Node Type and adds usage constraints, such as
85 how many times the component can occur.
86
87 |image1|
88
89 Figure 1: Structural Elements of Service Template and their Relations
90
91 TOSCA Modeling Principles & Data Model
92 --------------------------------------
93
94 This section describing TOSCA modeling principles and data model for
95 NFV, which shall be based on [TOSCA-1.0] and [TOSCA-Simple-Profile-YAML
96 V1.0], or new type based on ETSI NFV requirements, etc.
97
98 VNF Descriptor Template
99 -----------------------
100
101 The VNF Descriptor (VNFD) describes the topology of the VNF by means of
102 ETSI NFV IFA011 [IFA011] terms such as VDUs, Connection Points, Virtual
103 Links, External Connection Points, Scaling Aspects, Instantiation Levels
104 and Deployment Flavours.
105
106 The VNFD (VNF Descriptor) is read by both the NFVO and the VNFM. It
107 represents the contract & interface of a VNF and ensures the
108 interoperability across the NFV functional blocks.
109
110 The main parts of the VNFD are the following:
111
112 -  VNF topology: it is modeled in a cloud agnostic way using virtualized
113    containers and their connectivity. Virtual Deployment Units (VDU)
114    describe the capabilities of the virtualized containers, such as
115    virtual CPU, RAM, disks; their connectivity is modeled with VDU
116    Connection Point Descriptors (VduCpd), Virtual Link Descriptors (Vld)
117    and VNF External Connection Point Descriptors (VnfExternalCpd);
118
119 -  VNF deployment aspects: they are described in one or more deployment
120    flavours, including instantiation levels, supported LCM operations,
121    VNF LCM operation configuration parameters, placement constraints
122    (affinity / antiaffinity), minimum and maximum VDU instance numbers,
123    and scaling aspect for horizontal scaling.
124
125 The following table defines the TOSCA Type “derived from” values that
126 SHALL be used when using the TOSCA Simple Profile for NFV version 1.0
127 specification [TOSCA-Simple-Profile-NFV-v1.0] for NFV VNFD.
128
129 +-----------------------------------------+---------------------------------------+-----------------------+
130 | **ETSI NFV Element**                    | **TOSCA VNFD**                        | **Derived from**      |
131 |                                         |                                       |                       |
132 | **[IFA011]**                            | **[TOSCA-Simple-Profile-NFV-v1.0]**   |                       |
133 +=========================================+=======================================+=======================+
134 | VNF                                     | tosca.nodes.nfv.VNF                   | tosca.nodes.Root      |
135 +-----------------------------------------+---------------------------------------+-----------------------+
136 | VDU                                     | tosca.nodes.nfv.VDU                   | tosca.nodes.Root      |
137 +-----------------------------------------+---------------------------------------+-----------------------+
138 | Cpd (Connection Point)                  | tosca.nodes.nfv.Cpd                   | tosca.nodes.Root      |
139 +-----------------------------------------+---------------------------------------+-----------------------+
140 | VduCpd (internal connection point)      | tosca.nodes.nfv.VduCpd                | tosca.nodes.nfv.Cpd   |
141 +-----------------------------------------+---------------------------------------+-----------------------+
142 | VnfVirtualLinkDesc (Virtual Link)       | tosca.nodes.nfv.VnfVirtualLinkDesc    | tosca.nodes.Root      |
143 +-----------------------------------------+---------------------------------------+-----------------------+
144 | VnfExtCpd (External Connection Point)   | tosca.nodes.nfv.VnfExtCpd             | tosca.nodes.Root      |
145 +-----------------------------------------+---------------------------------------+-----------------------+
146 | Virtual Storage                         |                                       |                       |
147 +-----------------------------------------+---------------------------------------+-----------------------+
148 | Virtual Compute                         |                                       |                       |
149 +-----------------------------------------+---------------------------------------+-----------------------+
150 | Software Image                          |                                       |                       |
151 +-----------------------------------------+---------------------------------------+-----------------------+
152 | Deployment Flavour                      |                                       |                       |
153 +-----------------------------------------+---------------------------------------+-----------------------+
154 | Scaling Aspect                          |                                       |                       |
155 +-----------------------------------------+---------------------------------------+-----------------------+
156 | Element Group                           |                                       |                       |
157 +-----------------------------------------+---------------------------------------+-----------------------+
158 | Instantiation Level                     |                                       |                       |
159 +-----------------------------------------+---------------------------------------+-----------------------+
160
161 +--------------------------------------------------------------------+
162 | +--------------------------------------------------------------+   |
163 | | tosca\_definitions\_version: tosca\_simple\_yaml\_1\_0       |   |
164 | |                                                              |   |
165 | | description: VNFD TOSCA file demo                            |   |
166 | |                                                              |   |
167 | | imports:                                                     |   |
168 | |                                                              |   |
169 | | - TOSCA\_definition\_nfv\_1\_0.yaml                          |   |
170 | |                                                              |   |
171 | | - TOSCA\_definition\_nfv\_ext\_1\_0.yaml                     |   |
172 | |                                                              |   |
173 | | | **node\_types:                                             |   |
174 | |   tosca.nodes.nfv.VNF.vOpenNAT:                              |   |
175 | |   derived\_from:** tosca.nodes.nfv.VNF                       |   |
176 | | | **requirements:                                            |   |
177 | |   **- **sriov\_plane:                                        |   |
178 | |   capability:** tosca.capabilities.nfv.VirtualLinkable       |   |
179 | | | **node:** tosca.nodes.nfv.VnfVirtualLinkDesc               |   |
180 | | | **relationship:** tosca.relationships.nfv.VirtualLinksTo   |   |
181 | +--------------------------------------------------------------+   |
182 +====================================================================+
183 +--------------------------------------------------------------------+
184
185 EPA Requirements
186 ----------------
187
188 1. SR-IOV Passthrought
189
190 Definitions of SRIOV\_Port are necessary if VDU supports SR-IOV. Here is
191 an example.
192
193 +------------------------------------------------+
194 | node\_templates:                               |
195 |                                                |
196 | vdu\_vNat:                                     |
197 |                                                |
198 | SRIOV\_Port:                                   |
199 |                                                |
200 | attributes:                                    |
201 |                                                |
202 | tosca\_name: SRIOV\_Port                       |
203 |                                                |
204 | properties:                                    |
205 |                                                |
206 | virtual\_network\_interface\_requirements:     |
207 |                                                |
208 | - name: sriov                                  |
209 |                                                |
210 | support\_mandatory: false                      |
211 |                                                |
212 | description: sriov                             |
213 |                                                |
214 | requirement:                                   |
215 |                                                |
216 | SRIOV: true                                    |
217 |                                                |
218 | role: root                                     |
219 |                                                |
220 | description: sriov port                        |
221 |                                                |
222 | layer\_protocol: ipv4                          |
223 |                                                |
224 | requirements:                                  |
225 |                                                |
226 | - virtual\_binding:                            |
227 |                                                |
228 | capability: virtual\_binding                   |
229 |                                                |
230 | node: vdu\_vNat                                |
231 |                                                |
232 | relationship:                                  |
233 |                                                |
234 | type: tosca.relationships.nfv.VirtualBindsTo   |
235 |                                                |
236 | - virtual\_link:                               |
237 |                                                |
238 | node: tosca.nodes.Root                         |
239 |                                                |
240 | type: tosca.nodes.nfv.VduCpd                   |
241 |                                                |
242 | substitution\_mappings:                        |
243 |                                                |
244 | requirements:                                  |
245 |                                                |
246 | sriov\_plane:                                  |
247 |                                                |
248 | - SRIOV\_Port                                  |
249 |                                                |
250 | - virtual\_link                                |
251 |                                                |
252 | node\_type: tosca.nodes.nfv.VNF.vOpenNAT       |
253 +------------------------------------------------+
254
255 2. Hugepages
256
257 Definitions of mem\_page\_size as one property shall be added to
258 Properties and set the value to large if one VDU node supports
259 huagepages. Here is an example.
260
261 +----------------------------------+
262 | node\_templates:                 |
263 |                                  |
264 | vdu\_vNat:                       |
265 |                                  |
266 | Hugepages:                       |
267 |                                  |
268 | attributes:                      |
269 |                                  |
270 | tosca\_name: Huge\_pages\_demo   |
271 |                                  |
272 | properties:                      |
273 |                                  |
274 | mem\_page\_size:large            |
275 +==================================+
276 +----------------------------------+
277
278 3. NUMA (CPU/Mem)
279
280 Likewise, we shall add definitions of numa to
281 requested\_additional\_capabilities if we wand VUD nodes to support
282 NUMA. Here is an example.
283
284 +-------------------------------------------------+
285 | topology\_template:                             |
286 |                                                 |
287 | node\_templates:                                |
288 |                                                 |
289 | vdu\_vNat:                                      |
290 |                                                 |
291 | capabilities:                                   |
292 |                                                 |
293 | virtual\_compute:                               |
294 |                                                 |
295 | properties:                                     |
296 |                                                 |
297 | virtual\_memory:                                |
298 |                                                 |
299 | numa\_enabled: true                             |
300 |                                                 |
301 | virtual\_mem\_size: 2 GB                        |
302 |                                                 |
303 | requested\_additional\_capabilities:            |
304 |                                                 |
305 | numa:                                           |
306 |                                                 |
307 | support\_mandatory: true                        |
308 |                                                 |
309 | requested\_additional\_capability\_name: numa   |
310 |                                                 |
311 | target\_performance\_parameters:                |
312 |                                                 |
313 | hw:numa\_nodes: "2"                             |
314 |                                                 |
315 | hw:numa\_cpus.0: "0,1"                          |
316 |                                                 |
317 | hw:numa\_mem.0: "1024"                          |
318 |                                                 |
319 | hw:numa\_cpus.1: "2,3,4,5"                      |
320 |                                                 |
321 | hw:numa\_mem.1: "1024"                          |
322 +-------------------------------------------------+
323
324 4. Hyper-Theading
325
326 Definitions of Hyper-Theading are necessary as one of
327 requested\_additional\_capabilities of one VUD node if that node
328 supports Hyper-Theading. Here is an example.
329
330 +-------------------------------------------------------------+
331 | topology\_template:                                         |
332 |                                                             |
333 | node\_templates:                                            |
334 |                                                             |
335 | vdu\_vNat:                                                  |
336 |                                                             |
337 | capabilities:                                               |
338 |                                                             |
339 | virtual\_compute:                                           |
340 |                                                             |
341 | properties:                                                 |
342 |                                                             |
343 | virtual\_memory:                                            |
344 |                                                             |
345 | numa\_enabled: true                                         |
346 |                                                             |
347 | virtual\_mem\_size: 2 GB                                    |
348 |                                                             |
349 | requested\_additional\_capabilities:                        |
350 |                                                             |
351 | hyper\_threading:                                           |
352 |                                                             |
353 | support\_mandatory: true                                    |
354 |                                                             |
355 | requested\_additional\_capability\_name: hyper\_threading   |
356 |                                                             |
357 | target\_performance\_parameters:                            |
358 |                                                             |
359 | hw:cpu\_sockets : "2"                                       |
360 |                                                             |
361 | hw:cpu\_threads : "2"                                       |
362 |                                                             |
363 | hw:cpu\_cores : "2"                                         |
364 |                                                             |
365 | hw:cpu\_threads\_policy: "isolate"                          |
366 +-------------------------------------------------------------+
367
368 5. OVS+DPDK
369
370 Definitions of ovs\_dpdk are necessary as one of
371 requested\_additional\_capabilities of one VUD node if that node
372 supports dpdk. Here is an example.
373
374 +------------------------------------------------------+
375 | topology\_template:                                  |
376 |                                                      |
377 | node\_templates:                                     |
378 |                                                      |
379 | vdu\_vNat:                                           |
380 |                                                      |
381 | capabilities:                                        |
382 |                                                      |
383 | virtual\_compute:                                    |
384 |                                                      |
385 | properties:                                          |
386 |                                                      |
387 | virtual\_memory:                                     |
388 |                                                      |
389 | numa\_enabled: true                                  |
390 |                                                      |
391 | virtual\_mem\_size: 2 GB                             |
392 |                                                      |
393 | requested\_additional\_capabilities:                 |
394 |                                                      |
395 | ovs\_dpdk:                                           |
396 |                                                      |
397 | support\_mandatory: true                             |
398 |                                                      |
399 | requested\_additional\_capability\_name: ovs\_dpdk   |
400 |                                                      |
401 | target\_performance\_parameters:                     |
402 |                                                      |
403 | sw:ovs\_dpdk: "true"                                 |
404 +------------------------------------------------------+
405
406 NFV TOSCA Type Definition
407 -------------------------
408
409 tosca.capabilites.nfv.VirtualCompute
410 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
411
412 +---------------------------+-----------------------------------------+
413 | **Shorthand Name**        | VirtualCompute                          |
414 +===========================+=========================================+
415 | **Type Qualified Name**   | tosca: VirtualCompute                   |
416 +---------------------------+-----------------------------------------+
417 | **Type URI**              | tosca.capabilities.nfv.VirtualCompute   |
418 +---------------------------+-----------------------------------------+
419 | **derived from**          | tosca.nodes.Root                        |
420 +---------------------------+-----------------------------------------+
421
422 Properties
423 ^^^^^^^^^^
424
425 +-------------------------------------+------------+-----------------------------------------------------+---------------+---------------------------------------------------------+
426 | Name                                | Required   | Type                                                | Constraints   | Description                                             |
427 +=====================================+============+=====================================================+===============+=========================================================+
428 | request\_additional\_capabilities   | No         | tosca.datatypes.nfv.RequestedAdditionalCapability   |               | Describes additional capability for a particular VDU.   |
429 +-------------------------------------+------------+-----------------------------------------------------+---------------+---------------------------------------------------------+
430 | virtual\_memory                     | yes        | tosca.datatypes.nfv.VirtualMemory                   |               | Describes virtual memory of the virtualized compute     |
431 +-------------------------------------+------------+-----------------------------------------------------+---------------+---------------------------------------------------------+
432 | virtual\_cpu                        | yes        | tosca.datatypes.nfv.VirtualCpu                      |               | Describes virtual CPU(s) of the virtualized compute.    |
433 +-------------------------------------+------------+-----------------------------------------------------+---------------+---------------------------------------------------------+
434 +-------------------------------------+------------+-----------------------------------------------------+---------------+---------------------------------------------------------+
435 | name                                | yes        |                                                     |               |                                                         |
436 +-------------------------------------+------------+-----------------------------------------------------+---------------+---------------------------------------------------------+
437
438 Definition
439 ^^^^^^^^^^
440
441 +-----------------------------------------------------------+
442 | tosca.capabilities.nfv.VirtualCompute:                    |
443 |                                                           |
444 | derived\_from: tosca.capabilities.Root                    |
445 |                                                           |
446 | properties:                                               |
447 |                                                           |
448 | requested\_additional\_capabilities:                      |
449 |                                                           |
450 | type: map                                                 |
451 |                                                           |
452 | entry\_schema:                                            |
453 |                                                           |
454 | type: tosca.datatypes.nfv.RequestedAdditionalCapability   |
455 |                                                           |
456 | required: false                                           |
457 |                                                           |
458 | virtual\_memory:                                          |
459 |                                                           |
460 | type: tosca.datatypes.nfv.VirtualMemory                   |
461 |                                                           |
462 | required: true                                            |
463 |                                                           |
464 | virtual\_cpu:                                             |
465 |                                                           |
466 | type: tosca.datatypes.nfv.VirtualCpu                      |
467 |                                                           |
468 | required: true                                            |
469 +-----------------------------------------------------------+
470
471 tosca.nodes.nfv.VDU.Compute
472 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
473
474 The NFV Virtualization Deployment Unit (VDU) compute node type
475 represents a VDU entity which it describes the deployment and
476 operational behavior of a VNF component (VNFC), as defined by **[ETSI
477 NFV IFA011].**
478
479 +-----------------------+-------------------------------+
480 | Shorthand Name        | VDU.Compute                   |
481 +=======================+===============================+
482 | Type Qualified Name   | tosca:VDU.Compute             |
483 +-----------------------+-------------------------------+
484 | Type URI              | tosca.nodes.nfv.VDU.Compute   |
485 +-----------------------+-------------------------------+
486 | derived\_from         | tosca.nodes.Compute           |
487 +-----------------------+-------------------------------+
488
489
490
491 Attributes
492 ^^^^^^^^^^
493
494 None
495
496
497 Capabilities
498 ^^^^^^^^^^^^
499
500 +-------------------------+-------------------------------------------------+---------------+-----------------------------------------------------------------------------------------------------+
501 | Name                    | Type                                            | Constraints   | Description                                                                                         |
502 +=========================+=================================================+===============+=====================================================================================================+
503 | virtual\_compute        | tosca.capabilities.nfv.VirtualCompute           |               | Describes virtual compute resources capabilities.                                                   |
504 +-------------------------+-------------------------------------------------+---------------+-----------------------------------------------------------------------------------------------------+
505 | monitoring\_parameter   | tosca.capabilities.nfv.Metric                   | None          | Monitoring parameter, which can be tracked for a VNFC based on this VDU                             |
506 |                         |                                                 |               |                                                                                                     |
507 |                         |                                                 |               | Examples include: memory-consumption, CPU-utilisation, bandwidth-consumption, VNFC downtime, etc.   |
508 +-------------------------+-------------------------------------------------+---------------+-----------------------------------------------------------------------------------------------------+
509 | Virtual\_binding        | tosca.capabilities.nfv.VirtualBindable          |               | Defines ability of VirtualBindable                                                                  |
510 |                         |                                                 |               |                                                                                                     |
511 |                         | editor note: need to create a capability type   |               |                                                                                                     |
512 +-------------------------+-------------------------------------------------+---------------+-----------------------------------------------------------------------------------------------------+
513
514 Definition
515 ^^^^^^^^^^
516
517 +-----------------------------------------------------------------------------------------------------+
518 | tosca.nodes.nfv.VDU.Compute:                                                                        |
519 |                                                                                                     |
520 | derived\_from: tosca.nodes.Compute                                                                  |
521 |                                                                                                     |
522 | properties:                                                                                         |
523 |                                                                                                     |
524 | name:                                                                                               |
525 |                                                                                                     |
526 | type: string                                                                                        |
527 |                                                                                                     |
528 | required: true                                                                                      |
529 |                                                                                                     |
530 | description:                                                                                        |
531 |                                                                                                     |
532 | type: string                                                                                        |
533 |                                                                                                     |
534 | required: true                                                                                      |
535 |                                                                                                     |
536 | boot\_order:                                                                                        |
537 |                                                                                                     |
538 | type: list # explicit index (boot index) not necessary, contrary to IFA011                          |
539 |                                                                                                     |
540 | entry\_schema:                                                                                      |
541 |                                                                                                     |
542 | type: string                                                                                        |
543 |                                                                                                     |
544 | required: false                                                                                     |
545 |                                                                                                     |
546 | nfvi\_constraints:                                                                                  |
547 |                                                                                                     |
548 | type: list                                                                                          |
549 |                                                                                                     |
550 | entry\_schema:                                                                                      |
551 |                                                                                                     |
552 | type: string                                                                                        |
553 |                                                                                                     |
554 | required: false                                                                                     |
555 |                                                                                                     |
556 | configurable\_properties:                                                                           |
557 |                                                                                                     |
558 | type: map                                                                                           |
559 |                                                                                                     |
560 | entry\_schema:                                                                                      |
561 |                                                                                                     |
562 | type: tosca.datatypes.nfv.VnfcConfigurableProperties                                                |
563 |                                                                                                     |
564 | required: true                                                                                      |
565 |                                                                                                     |
566 | attributes:                                                                                         |
567 |                                                                                                     |
568 | private\_address:                                                                                   |
569 |                                                                                                     |
570 | status: deprecated                                                                                  |
571 |                                                                                                     |
572 | public\_address:                                                                                    |
573 |                                                                                                     |
574 | status: deprecated                                                                                  |
575 |                                                                                                     |
576 | networks:                                                                                           |
577 |                                                                                                     |
578 | status: deprecated                                                                                  |
579 |                                                                                                     |
580 | ports:                                                                                              |
581 |                                                                                                     |
582 | status: deprecated                                                                                  |
583 |                                                                                                     |
584 | capabilities:                                                                                       |
585 |                                                                                                     |
586 | virtual\_compute:                                                                                   |
587 |                                                                                                     |
588 | type: tosca.capabilities.nfv.VirtualCompute                                                         |
589 |                                                                                                     |
590 | virtual\_binding:                                                                                   |
591 |                                                                                                     |
592 | type: tosca.capabilities.nfv.VirtualBindable                                                        |
593 |                                                                                                     |
594 | #monitoring\_parameter:                                                                             |
595 |                                                                                                     |
596 | # modeled as ad hoc (named) capabilities in VDU node template                                       |
597 |                                                                                                     |
598 | # for example:                                                                                      |
599 |                                                                                                     |
600 | #capabilities:                                                                                      |
601 |                                                                                                     |
602 | # cpu\_load: tosca.capabilities.nfv.Metric                                                          |
603 |                                                                                                     |
604 | # memory\_usage: tosca.capabilities.nfv.Metric                                                      |
605 |                                                                                                     |
606 | host: #Editor note: FFS. How this capabilities should be used in NFV Profile                        |
607 |                                                                                                     |
608 | type: `*tosca.capabilities.Container* <#DEFN_TYPE_CAPABILITIES_CONTAINER>`__                        |
609 |                                                                                                     |
610 | valid\_source\_types: [`*tosca.nodes.SoftwareComponent* <#DEFN_TYPE_NODES_SOFTWARE_COMPONENT>`__]   |
611 |                                                                                                     |
612 | occurrences: [0,UNBOUNDED]                                                                          |
613 |                                                                                                     |
614 | endpoint:                                                                                           |
615 |                                                                                                     |
616 | occurrences: [0,0]                                                                                  |
617 |                                                                                                     |
618 | os:                                                                                                 |
619 |                                                                                                     |
620 | occurrences: [0,0]                                                                                  |
621 |                                                                                                     |
622 | scalable: #Editor note: FFS. How this capabilities should be used in NFV Profile                    |
623 |                                                                                                     |
624 | type: `*tosca.capabilities.Scalable* <#DEFN_TYPE_CAPABILITIES_SCALABLE>`__                          |
625 |                                                                                                     |
626 | binding:                                                                                            |
627 |                                                                                                     |
628 | occurrences: [0,UNBOUND]                                                                            |
629 |                                                                                                     |
630 | requirements:                                                                                       |
631 |                                                                                                     |
632 | - virtual\_storage:                                                                                 |
633 |                                                                                                     |
634 | capability: tosca.capabilities.nfv.VirtualStorage                                                   |
635 |                                                                                                     |
636 | relationship: tosca.relationships.nfv.VDU.AttachedTo                                                |
637 |                                                                                                     |
638 | node: tosca.nodes.nfv.VDU.VirtualStorage                                                            |
639 |                                                                                                     |
640 | occurences: [ 0, UNBOUNDED ]                                                                        |
641 |                                                                                                     |
642 | - local\_storage: #For NFV Profile, this requirement is deprecated.                                 |
643 |                                                                                                     |
644 | occurrences: [0,0]                                                                                  |
645 |                                                                                                     |
646 | artifacts:                                                                                          |
647 |                                                                                                     |
648 | - sw\_image:                                                                                        |
649 |                                                                                                     |
650 | file:                                                                                               |
651 |                                                                                                     |
652 | type: tosca.artifacts.nfv.SwImage                                                                   |
653 +-----------------------------------------------------------------------------------------------------+
654
655 Artifact
656 ^^^^^^^^
657 +-----------+------------+-------------------------------+---------------+------------------------------------------------+
658 | Name      | Required   | Type                          | Constraints   | Description                                    |
659 +===========+============+===============================+===============+================================================+
660 | SwImage   | Yes        | tosca.artifacts.nfv.SwImage   |               | Describes the software image which is          |
661 |           |            |                               |               | directly realizing this virtual storage        |
662 +-----------+------------+-------------------------------+---------------+------------------------------------------------+
663
664
665 |image2|
666
667
668
669 tosca.nodes.nfv.Cpd
670 ~~~~~~~~~~~~~~~~~~~
671
672 The TOSCA Cpd node represents network connectivity to a compute resource
673 or a VL as defined by [ETSI GS NFV-IFA 011]. This is an abstract type
674 used as parent for the various Cpd types.
675
676 +-----------------------+-----------------------+
677 | Shorthand Name        | Cpd                   |
678 +=======================+=======================+
679 | Type Qualified Name   | tosca:Cpd             |
680 +-----------------------+-----------------------+
681 | Type URI              | tosca.nodes.nfv.Cpd   |
682 +-----------------------+-----------------------+
683
684
685 Attributes
686 ^^^^^^^^^^
687
688 +--------+------------+--------+---------------+---------------+
689 | Name   | Required   | Type   | Constraints   | Description   |
690 +========+============+========+===============+===============+
691 +--------+------------+--------+---------------+---------------+
692
693 Requirements
694 ^^^^^^^^^^^^
695
696 None
697
698 Capabilities
699 ^^^^^^^^^^^^
700
701 None
702
703 Definition
704 ^^^^^^^^^^
705
706 +----------------------------------------------------------------------+
707 | tosca.nodes.nfv.Cpd:                                                 |
708 |                                                                      |
709 | derived\_from: tosca.nodes.Root                                      |
710 |                                                                      |
711 | properties:                                                          |
712 |                                                                      |
713 | layer\_protocol:                                                     |
714 |                                                                      |
715 | type:string                                                          |
716 |                                                                      |
717 | constraints:                                                         |
718 |                                                                      |
719 | - valid\_values: [ethernet, mpls, odu2, ipv4, ipv6, pseudo\_wire ]   |
720 |                                                                      |
721 | required:true                                                        |
722 |                                                                      |
723 | role: #Name in ETSI NFV IFA011 v0.7.3 cpRole                         |
724 |                                                                      |
725 | type:string                                                          |
726 |                                                                      |
727 | constraints:                                                         |
728 |                                                                      |
729 | - valid\_values: [ root, leaf ]                                      |
730 |                                                                      |
731 | required:flase                                                       |
732 |                                                                      |
733 | description:                                                         |
734 |                                                                      |
735 | type: string                                                         |
736 |                                                                      |
737 | required: false                                                      |
738 |                                                                      |
739 | address\_data:                                                       |
740 |                                                                      |
741 | type: list                                                           |
742 |                                                                      |
743 | entry\_schema:                                                       |
744 |                                                                      |
745 | type: tosca.datatype.nfv.AddressData                                 |
746 |                                                                      |
747 | required:false                                                       |
748 +----------------------------------------------------------------------+
749
750 Additional Requirement
751 ^^^^^^^^^^^^^^^^^^^^^^
752
753 None.
754
755 tosca.nodes.nfv.VduCpd
756 ~~~~~~~~~~~~~~~~~~~~~~
757
758 The TOSCA node VduCpd represents a type of TOSCA Cpd node and describes
759 network connectivity between a VNFC instance (based on this VDU) and an
760 internal VL as defined by [ETSI GS NFV-IFA 011].
761
762 +-----------------------+--------------------------+
763 | Shorthand Name        | VduCpd                   |
764 +=======================+==========================+
765 | Type Qualified Name   | tosca: VduCpd            |
766 +-----------------------+--------------------------+
767 | Type URI              | tosca.nodes.nfv.VduCpd   |
768 +-----------------------+--------------------------+
769
770 Properties
771 ^^^^^^^^^^
772
773
774 +-------------------------------+------------+------------------------------------------+---------------+----------------------------------------------------------+
775 | Name                          | Required   | Type                                     | Constraints   | Description                                              |
776 +===============================+============+==========================================+==========================================================================+
777 | bitrate_requirement           | no         | integer                                  |               | Bitrate requirement on this connection point.            |
778 +-------------------------------+------------+------------------------------------------+---------------+----------------------------------------------------------+
779 | virtual\_network\_interface_\ | no         | VirtualNetworkInterfaceRequirements      |               | Specifies requirements on a virtual network              |
780 | requirements                  |            |                                          |               | realising the CPs instantiated from this CPD             |
781 +-------------------------------+------------+------------------------------------------+---------------+----------------------------------------------------------+
782
783 Attributes
784 ^^^^^^^^^^
785
786 None
787
788 Requirements
789 ^^^^^^^^^^^^
790
791 +--------------------+------------+------------------------------------------+---------------+----------------------------------------------------------+
792 | Name               | Required   | Type                                     | Constraints   | Description                                              |
793 +====================+============+==========================================+===============+==========================================================+
794 | virtual\_binding   | yes        | tosca.capabilities.nfv.VirtualBindable   |               | Describe the requirement for binding with VDU            |
795 +--------------------+------------+------------------------------------------+---------------+----------------------------------------------------------+
796 | virtual\_link      | no         | tosca.capabilities.nfv.VirtualLinkable   |               | Describes the requirements for linking to virtual link   |
797 +--------------------+------------+------------------------------------------+---------------+----------------------------------------------------------+
798
799 Definition
800 ^^^^^^^^^^
801
802 +----------------------------------------------------------------+
803 | tosca.nodes.nfv.VduCpd:                                        |
804 |                                                                |
805 | derived\_from: tosca.nodes.nfv.Cpd                             |
806 |                                                                |
807 | properties:                                                    |
808 |                                                                |
809 | bitrate\_requirement:                                          |
810 |                                                                |
811 | type: integer                                                  |
812 |                                                                |
813 | required:false                                                 |
814 |                                                                |
815 | virtual\_network\_interface\_requirements                      |
816 |                                                                |
817 | type: list                                                     |
818 |                                                                |
819 | entry\_schema:                                                 |
820 |                                                                |
821 | type: VirtualNetworkInterfaceRequirements                      |
822 |                                                                |
823 | required:false                                                 |
824 |                                                                |
825 | requirements:                                                  |
826 |                                                                |
827 | - virtual\_link:                                               |
828 |                                                                |
829 | capability: tosca.capabilities.nfv.VirtualLinkable             |
830 |                                                                |
831 | relationship: tosca.relationships.nfv.VirtualLinksTo           |
832 |                                                                |
833 | node: tosca.nodes.nfv.VnfVirtualLinkDesc - virtual\_binding:   |
834 |                                                                |
835 | capability: tosca.capabilities.nfv.VirtualBindable             |
836 |                                                                |
837 | relationship: tosca.relationships.nfv.VirtualBindsTo           |
838 |                                                                |
839 | node: tosca.nodes.nfv.VDU                                      |
840 +----------------------------------------------------------------+
841
842 tosca.nodes.nfv.VDU.VirtualStorage
843 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
844
845 The NFV VirtualStorage node type represents a virtual storage entity
846 which it describes the deployment and operational behavior of a virtual
847 storage resources, as defined by **[ETSI NFV IFA011].**
848
849 **[editor note]** open issue: should NFV profile use the current storage
850 model as described in YAML 1.1. Pending on Shitao proposal (see
851 NFVIFA(17)000110 discussion paper)
852
853 **[editor note]** new relationship type as suggested in Matt
854 presentation. Slide 8. With specific rules of “valid\_target\_type”
855
856 +---------------------------+--------------------------------------+
857 | **Shorthand Name**        | VirtualStorage                       |
858 +===========================+======================================+
859 | **Type Qualified Name**   | tosca: VirtualStorage                |
860 +---------------------------+--------------------------------------+
861 | **Type URI**              | tosca.nodes.nfv.VDU.VirtualStorage   |
862 +---------------------------+--------------------------------------+
863 | **derived\_from**         | tosca.nodes.Root                     |
864 +---------------------------+--------------------------------------+
865
866 tosca.artifacts.nfv.SwImage
867 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
868
869 +---------------------------+------------------------------------+
870 | **Shorthand Name**        | SwImage                            |
871 +===========================+====================================+
872 | **Type Qualified Name**   | tosca:SwImage                      |
873 +---------------------------+------------------------------------+
874 | **Type URI**              | tosca.artifacts.nfv.SwImage        |
875 +---------------------------+------------------------------------+
876 | **derived\_from**         | tosca.artifacts.Deployment.Image   |
877 +---------------------------+------------------------------------+
878
879 Properties
880 ^^^^^^^^^^
881
882 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
883 | Name                                     | Required   | Type               | Constraints   | Description                                                                                        |
884 +==========================================+============+====================+===============+====================================================================================================+
885 | name                                     | yes        | string             |               | Name of this software image                                                                        |
886 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
887 | version                                  | yes        | string             |               | Version of this software image                                                                     |
888 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
889 | checksum                                 | yes        | string             |               | Checksum of the software image file                                                                |
890 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
891 | container\_format                        | yes        | string             |               | The container format describes the container file format in which software image is provided.      |
892 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
893 | disk\_format                             | yes        | string             |               | The disk format of a software image is the format of the underlying disk image                     |
894 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
895 | min\_disk                                | yes        | scalar-unit.size   |               | The minimal disk size requirement for this software image.                                         |
896 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
897 | min\_ram                                 | no         | scalar-unit.size   |               | The minimal RAM requirement for this software image.                                               |
898 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
899 | Size                                     | yes        | scalar-unit.size   |               | The size of this software image                                                                    |
900 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
901 | sw\_image                                | yes        | string             |               | A reference to the actual software image within VNF Package, or url.                               |
902 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
903 | operating\_system                        | no         | string             |               | Identifies the operating system used in the software image.                                        |
904 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
905 | supported \_virtualization\_enviroment   | no         | list               |               | Identifies the virtualization environments (e.g. hypervisor) compatible with this software image   |
906 +------------------------------------------+------------+--------------------+---------------+----------------------------------------------------------------------------------------------------+
907
908 Definition
909 ^^^^^^^^^^
910
911 +-----------------------------------------------------+
912 | tosca.artifacts.nfv.SwImage:                        |
913 |                                                     |
914 |   derived\_from: tosca.artifacts.Deployment.Image   |
915 |                                                     |
916 |   properties or metadata:                           |
917 |                                                     |
918 |     #id:                                            |
919 |                                                     |
920 |       # node name                                   |
921 |                                                     |
922 |     name:                                           |
923 |                                                     |
924 |       type: string                                  |
925 |                                                     |
926 | required: true                                      |
927 |                                                     |
928 |     version:                                        |
929 |                                                     |
930 |       type: string                                  |
931 |                                                     |
932 | required: true                                      |
933 |                                                     |
934 |     checksum:                                       |
935 |                                                     |
936 |       type: string                                  |
937 |                                                     |
938 | required: true                                      |
939 |                                                     |
940 |     container\_format:                              |
941 |                                                     |
942 |       type: string                                  |
943 |                                                     |
944 | required: true                                      |
945 |                                                     |
946 |     disk\_format:                                   |
947 |                                                     |
948 |       type: string                                  |
949 |                                                     |
950 | required: true                                      |
951 |                                                     |
952 |     min\_disk:                                      |
953 |                                                     |
954 |       type: scalar-unit.size # Number               |
955 |                                                     |
956 | required: true                                      |
957 |                                                     |
958 |     min\_ram:                                       |
959 |                                                     |
960 |       type: scalar-unit.size # Number               |
961 |                                                     |
962 | required: false                                     |
963 |                                                     |
964 |     size:                                           |
965 |                                                     |
966 |       type: scalar-unit.size # Number               |
967 |                                                     |
968 | required: true                                      |
969 |                                                     |
970 |     sw\_image:                                      |
971 |                                                     |
972 |       type: string                                  |
973 |                                                     |
974 | required: true                                      |
975 |                                                     |
976 |     operating\_system:                              |
977 |                                                     |
978 |       type: string                                  |
979 |                                                     |
980 | required: false                                     |
981 |                                                     |
982 |     supported\_virtualisation\_environments:        |
983 |                                                     |
984 |       type: list                                    |
985 |                                                     |
986 |       entry\_schema:                                |
987 |                                                     |
988 |         type: string                                |
989 |                                                     |
990 | required: false                                     |
991 +-----------------------------------------------------+
992
993 vNAT Example
994 ------------
995
996 openovnf\_\_vOpenNAT.yaml
997 ~~~~~~~~~~~~~~~~~~~~~~~~~
998
999 +-------------------------------------------------------------+
1000 | imports:                                                    |
1001 |                                                             |
1002 | - openonfv\_\_tosca.capabilities.Scalable.yaml              |
1003 |                                                             |
1004 | - openonfv\_\_tosca.capabilities.nfv.Metric.yaml            |
1005 |                                                             |
1006 | - openonfv\_\_tosca.capabilities.network.Bindable.yaml      |
1007 |                                                             |
1008 | - openonfv\_\_tosca.capabilities.Attachment.yaml            |
1009 |                                                             |
1010 | - openonfv\_\_tosca.capabilities.nfv.VirtualBindable.yaml   |
1011 |                                                             |
1012 | - openonfv\_\_tosca.requirements.nfv.VirtualStorage.yaml    |
1013 |                                                             |
1014 | - openonfv\_\_tosca.nodes.nfv.VDU.VirtualStorage.yaml       |
1015 |                                                             |
1016 | - openonfv\_\_tosca.relationships.nfv.VirtualBindsTo.yaml   |
1017 |                                                             |
1018 | - openonfv\_\_tosca.nodes.nfv.VDU.Compute.yaml              |
1019 |                                                             |
1020 | - openonfv\_\_tosca.artifacts.nfv.SwImage.yaml              |
1021 |                                                             |
1022 | - openonfv\_\_tosca.capabilities.nfv.VirtualCompute.yaml    |
1023 |                                                             |
1024 | - openonfv\_\_tosca.capabilities.Container.yaml             |
1025 |                                                             |
1026 | - openonfv\_\_tosca.capabilities.nfv.VirtualStorage.yaml    |
1027 |                                                             |
1028 | - openonfv\_\_tosca.requirements.nfv.VirtualBinding.yaml    |
1029 |                                                             |
1030 | - openovnf\_\_tosca.nodes.nfv.VNF.vOpenNAT.yaml             |
1031 |                                                             |
1032 | - openonfv\_\_tosca.capabilities.Endpoint.Admin.yaml        |
1033 |                                                             |
1034 | - openonfv\_\_tosca.capabilities.OperatingSystem.yaml       |
1035 |                                                             |
1036 | - openonfv\_\_tosca.nodes.nfv.VduCpd.yaml                   |
1037 |                                                             |
1038 | - openonfv\_\_tosca.relationships.nfv.VDU.AttachedTo.yaml   |
1039 |                                                             |
1040 | metadata:                                                   |
1041 |                                                             |
1042 | vnfProductName: openNAT                                     |
1043 |                                                             |
1044 | vnfdVersion: 1.0.0                                          |
1045 |                                                             |
1046 | vnfProvider: intel                                          |
1047 |                                                             |
1048 | vnfmInfo: GVNFM                                             |
1049 |                                                             |
1050 | csarVersion: 1.0.0                                          |
1051 |                                                             |
1052 | vnfdId: openNAT-1.0                                         |
1053 |                                                             |
1054 | csarProvider: intel                                         |
1055 |                                                             |
1056 | vnfProductInfoDescription: openNAT                          |
1057 |                                                             |
1058 | version: 1.0.0                                              |
1059 |                                                             |
1060 | csarType: NFAR                                              |
1061 |                                                             |
1062 | vendor: intel                                               |
1063 |                                                             |
1064 | localizationLanguage: '[english, chinese]'                  |
1065 |                                                             |
1066 | id: openNAT-1.0                                             |
1067 |                                                             |
1068 | defaultLocalizationLanguage: english                        |
1069 |                                                             |
1070 | vnfProductInfoName: openNAT                                 |
1071 |                                                             |
1072 | vnfSoftwareVersion: 1.0.0                                   |
1073 |                                                             |
1074 | topology\_template:                                         |
1075 |                                                             |
1076 | node\_templates:                                            |
1077 |                                                             |
1078 | vdu\_vNat:                                                  |
1079 |                                                             |
1080 | artifacts:                                                  |
1081 |                                                             |
1082 | vNatVNFImage:                                               |
1083 |                                                             |
1084 | file: /swimages/xenial-snat.qcow2                           |
1085 |                                                             |
1086 | type: tosca.artifacts.nfv.SwImage                           |
1087 |                                                             |
1088 | properties:                                                 |
1089 |                                                             |
1090 | name: vNatVNFImage                                          |
1091 |                                                             |
1092 | version: "1.0"                                              |
1093 |                                                             |
1094 | checksum: "5000"                                            |
1095 |                                                             |
1096 | container\_format: bare                                     |
1097 |                                                             |
1098 | disk\_format: qcow2                                         |
1099 |                                                             |
1100 | min\_disk: 10 GB                                            |
1101 |                                                             |
1102 | min\_ram: 1 GB                                              |
1103 |                                                             |
1104 | size: 10 GB                                                 |
1105 |                                                             |
1106 | sw\_image: /swimages/xenial-snat.qcow2                      |
1107 |                                                             |
1108 | operating\_system: unbantu                                  |
1109 |                                                             |
1110 | attributes:                                                 |
1111 |                                                             |
1112 | tosca\_name: vdu\_vNat                                      |
1113 |                                                             |
1114 | capabilities:                                               |
1115 |                                                             |
1116 | virtual\_compute:                                           |
1117 |                                                             |
1118 | properties:                                                 |
1119 |                                                             |
1120 | virtual\_memory:                                            |
1121 |                                                             |
1122 | numa\_enabled: true                                         |
1123 |                                                             |
1124 | virtual\_mem\_size: 2 GB                                    |
1125 |                                                             |
1126 | requested\_additional\_capabilities:                        |
1127 |                                                             |
1128 | numa:                                                       |
1129 |                                                             |
1130 | support\_mandatory: true                                    |
1131 |                                                             |
1132 | requested\_additional\_capability\_name: numa               |
1133 |                                                             |
1134 | target\_performance\_parameters:                            |
1135 |                                                             |
1136 | hw:numa\_nodes: "2"                                         |
1137 |                                                             |
1138 | hw:numa\_cpus.0: "0,1"                                      |
1139 |                                                             |
1140 | hw:numa\_mem.0: "1024"                                      |
1141 |                                                             |
1142 | hw:numa\_cpus.1: "2,3,4,5"                                  |
1143 |                                                             |
1144 | hw:numa\_mem.1: "1024"                                      |
1145 |                                                             |
1146 | hyper\_threading:                                           |
1147 |                                                             |
1148 | support\_mandatory: true                                    |
1149 |                                                             |
1150 | requested\_additional\_capability\_name: hyper\_threading   |
1151 |                                                             |
1152 | target\_performance\_parameters:                            |
1153 |                                                             |
1154 | hw:cpu\_sockets : "2"                                       |
1155 |                                                             |
1156 | hw:cpu\_threads : "2"                                       |
1157 |                                                             |
1158 | hw:cpu\_cores : "2"                                         |
1159 |                                                             |
1160 | hw:cpu\_threads\_policy: "isolate"                          |
1161 |                                                             |
1162 | ovs\_dpdk:                                                  |
1163 |                                                             |
1164 | support\_mandatory: true                                    |
1165 |                                                             |
1166 | requested\_additional\_capability\_name: ovs\_dpdk          |
1167 |                                                             |
1168 | target\_performance\_parameters:                            |
1169 |                                                             |
1170 | sw:ovs\_dpdk: "true"                                        |
1171 |                                                             |
1172 | virtual\_cpu:                                               |
1173 |                                                             |
1174 | cpu\_architecture: X86                                      |
1175 |                                                             |
1176 | num\_virtual\_cpu: 2                                        |
1177 |                                                             |
1178 | properties:                                                 |
1179 |                                                             |
1180 | configurable\_properties:                                   |
1181 |                                                             |
1182 | test:                                                       |
1183 |                                                             |
1184 | additional\_vnfc\_configurable\_properties:                 |
1185 |                                                             |
1186 | aaa: 1                                                      |
1187 |                                                             |
1188 | name: vNat                                                  |
1189 |                                                             |
1190 | descrption: the virtual machine of vNat                     |
1191 |                                                             |
1192 | boot\_order:                                                |
1193 |                                                             |
1194 | - vNAT\_Storage                                             |
1195 |                                                             |
1196 | requirements:                                               |
1197 |                                                             |
1198 | - virtual\_storage:                                         |
1199 |                                                             |
1200 | capability: virtual\_storage                                |
1201 |                                                             |
1202 | node: vNAT\_Storage                                         |
1203 |                                                             |
1204 | relationship:                                               |
1205 |                                                             |
1206 | properties:                                                 |
1207 |                                                             |
1208 | location: /mnt/volume\_0                                    |
1209 |                                                             |
1210 | type: tosca.relationships.nfv.VDU.AttachedTo                |
1211 |                                                             |
1212 | - local\_storage:                                           |
1213 |                                                             |
1214 | node: tosca.nodes.Root                                      |
1215 |                                                             |
1216 | type: tosca.nodes.nfv.VDU.Compute                           |
1217 |                                                             |
1218 | SRIOV\_Port:                                                |
1219 |                                                             |
1220 | attributes:                                                 |
1221 |                                                             |
1222 | tosca\_name: SRIOV\_Port                                    |
1223 |                                                             |
1224 | properties:                                                 |
1225 |                                                             |
1226 | virtual\_network\_interface\_requirements:                  |
1227 |                                                             |
1228 | - name: sriov                                               |
1229 |                                                             |
1230 | support\_mandatory: false                                   |
1231 |                                                             |
1232 | description: sriov                                          |
1233 |                                                             |
1234 | requirement:                                                |
1235 |                                                             |
1236 | SRIOV: true                                                 |
1237 |                                                             |
1238 | role: root                                                  |
1239 |                                                             |
1240 | description: sriov port                                     |
1241 |                                                             |
1242 | layer\_protocol: ipv4                                       |
1243 |                                                             |
1244 | requirements:                                               |
1245 |                                                             |
1246 | - virtual\_binding:                                         |
1247 |                                                             |
1248 | capability: virtual\_binding                                |
1249 |                                                             |
1250 | node: vdu\_vNat                                             |
1251 |                                                             |
1252 | relationship:                                               |
1253 |                                                             |
1254 | type: tosca.relationships.nfv.VirtualBindsTo                |
1255 |                                                             |
1256 | - virtual\_link:                                            |
1257 |                                                             |
1258 | node: tosca.nodes.Root                                      |
1259 |                                                             |
1260 | type: tosca.nodes.nfv.VduCpd                                |
1261 |                                                             |
1262 | vNAT\_Storage:                                              |
1263 |                                                             |
1264 | attributes:                                                 |
1265 |                                                             |
1266 | tosca\_name: vNAT\_Storage                                  |
1267 |                                                             |
1268 | properties:                                                 |
1269 |                                                             |
1270 | id: vNAT\_Storage                                           |
1271 |                                                             |
1272 | size\_of\_storage: 10 GB                                    |
1273 |                                                             |
1274 | rdma\_enabled: false                                        |
1275 |                                                             |
1276 | type\_of\_storage: volume                                   |
1277 |                                                             |
1278 | type: tosca.nodes.nfv.VDU.VirtualStorage                    |
1279 |                                                             |
1280 | substitution\_mappings:                                     |
1281 |                                                             |
1282 | requirements:                                               |
1283 |                                                             |
1284 | sriov\_plane:                                               |
1285 |                                                             |
1286 | - SRIOV\_Port                                               |
1287 |                                                             |
1288 | - virtual\_link                                             |
1289 |                                                             |
1290 | node\_type: tosca.nodes.nfv.VNF.vOpenNAT                    |
1291 |                                                             |
1292 | tosca\_definitions\_version: tosca\_simple\_yaml\_1\_0      |
1293 +-------------------------------------------------------------+
1294
1295 openonfv\_\_tosca.nodes.nfv.VDU.VirtualStorage.yaml
1296 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1297
1298 +------------------------------------------------------------+
1299 | imports:                                                   |
1300 |                                                            |
1301 | - openonfv\_\_tosca.capabilities.nfv.VirtualStorage.yaml   |
1302 |                                                            |
1303 | node\_types:                                               |
1304 |                                                            |
1305 | tosca.nodes.nfv.VDU.VirtualStorage:                        |
1306 |                                                            |
1307 | capabilities:                                              |
1308 |                                                            |
1309 | virtual\_storage:                                          |
1310 |                                                            |
1311 | type: tosca.capabilities.nfv.VirtualStorage                |
1312 |                                                            |
1313 | derived\_from: tosca.nodes.Root                            |
1314 |                                                            |
1315 | properties:                                                |
1316 |                                                            |
1317 | id:                                                        |
1318 |                                                            |
1319 | type: string                                               |
1320 |                                                            |
1321 | size\_of\_storage:                                         |
1322 |                                                            |
1323 | type: string                                               |
1324 |                                                            |
1325 | rdma\_enabled:                                             |
1326 |                                                            |
1327 | required: false                                            |
1328 |                                                            |
1329 | type: boolean                                              |
1330 |                                                            |
1331 | type\_of\_storage:                                         |
1332 |                                                            |
1333 | type: string                                               |
1334 |                                                            |
1335 | tosca\_definitions\_version: tosca\_simple\_yaml\_1\_0     |
1336 +------------------------------------------------------------+
1337
1338 openonfv\_\_tosca.nodes.nfv.VduCpd.yaml
1339 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1340
1341 +-----------------------------------------------------------------+
1342 | data\_types:                                                    |
1343 |                                                                 |
1344 | tosca.datatypes.nfv.L3AddressData:                              |
1345 |                                                                 |
1346 | properties:                                                     |
1347 |                                                                 |
1348 | number\_of\_ip\_address:                                        |
1349 |                                                                 |
1350 | required: false                                                 |
1351 |                                                                 |
1352 | type: integer                                                   |
1353 |                                                                 |
1354 | ip\_address\_assignment:                                        |
1355 |                                                                 |
1356 | type: boolean                                                   |
1357 |                                                                 |
1358 | ip\_address\_type:                                              |
1359 |                                                                 |
1360 | constraints:                                                    |
1361 |                                                                 |
1362 | - valid\_values:                                                |
1363 |                                                                 |
1364 | - ipv4                                                          |
1365 |                                                                 |
1366 | - ipv6                                                          |
1367 |                                                                 |
1368 | required: false                                                 |
1369 |                                                                 |
1370 | type: string                                                    |
1371 |                                                                 |
1372 | floating\_ip\_activated:                                        |
1373 |                                                                 |
1374 | type: string                                                    |
1375 |                                                                 |
1376 | tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:        |
1377 |                                                                 |
1378 | properties:                                                     |
1379 |                                                                 |
1380 | name:                                                           |
1381 |                                                                 |
1382 | required: false                                                 |
1383 |                                                                 |
1384 | type: string                                                    |
1385 |                                                                 |
1386 | support\_mandatory:                                             |
1387 |                                                                 |
1388 | type: boolean                                                   |
1389 |                                                                 |
1390 | description:                                                    |
1391 |                                                                 |
1392 | required: false                                                 |
1393 |                                                                 |
1394 | type: string                                                    |
1395 |                                                                 |
1396 | requirement:                                                    |
1397 |                                                                 |
1398 | entry\_schema:                                                  |
1399 |                                                                 |
1400 | type: string                                                    |
1401 |                                                                 |
1402 | type: map                                                       |
1403 |                                                                 |
1404 | tosca.datatype.nfv.AddressData:                                 |
1405 |                                                                 |
1406 | properties:                                                     |
1407 |                                                                 |
1408 | address\_type:                                                  |
1409 |                                                                 |
1410 | constraints:                                                    |
1411 |                                                                 |
1412 | - valid\_values:                                                |
1413 |                                                                 |
1414 | - mac\_address                                                  |
1415 |                                                                 |
1416 | - ip\_address                                                   |
1417 |                                                                 |
1418 | type: string                                                    |
1419 |                                                                 |
1420 | l2\_address\_data:                                              |
1421 |                                                                 |
1422 | required: false                                                 |
1423 |                                                                 |
1424 | type: tosca.datatypes.nfv.L2AddressData                         |
1425 |                                                                 |
1426 | l3\_address\_data:                                              |
1427 |                                                                 |
1428 | required: false                                                 |
1429 |                                                                 |
1430 | type: tosca.datatypes.nfv.L3AddressData                         |
1431 |                                                                 |
1432 | tosca.datatypes.nfv.L2AddressData: {}                           |
1433 |                                                                 |
1434 | imports:                                                        |
1435 |                                                                 |
1436 | - openonfv\_\_tosca.requirements.nfv.VirtualBinding.yaml        |
1437 |                                                                 |
1438 | - openonfv\_\_tosca.requirements.nfv.VirtualBinding.yaml        |
1439 |                                                                 |
1440 | node\_types:                                                    |
1441 |                                                                 |
1442 | tosca.nodes.nfv.VduCpd:                                         |
1443 |                                                                 |
1444 | derived\_from: tosca.nodes.Root                                 |
1445 |                                                                 |
1446 | properties:                                                     |
1447 |                                                                 |
1448 | virtual\_network\_interface\_requirements:                      |
1449 |                                                                 |
1450 | entry\_schema:                                                  |
1451 |                                                                 |
1452 | type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements   |
1453 |                                                                 |
1454 | required: false                                                 |
1455 |                                                                 |
1456 | type: list                                                      |
1457 |                                                                 |
1458 | role:                                                           |
1459 |                                                                 |
1460 | constraints:                                                    |
1461 |                                                                 |
1462 | - valid\_values:                                                |
1463 |                                                                 |
1464 | - root                                                          |
1465 |                                                                 |
1466 | - leaf                                                          |
1467 |                                                                 |
1468 | required: false                                                 |
1469 |                                                                 |
1470 | type: string                                                    |
1471 |                                                                 |
1472 | bitrate\_requirement:                                           |
1473 |                                                                 |
1474 | required: false                                                 |
1475 |                                                                 |
1476 | type: integer                                                   |
1477 |                                                                 |
1478 | description:                                                    |
1479 |                                                                 |
1480 | required: false                                                 |
1481 |                                                                 |
1482 | type: string                                                    |
1483 |                                                                 |
1484 | layer\_protocol:                                                |
1485 |                                                                 |
1486 | constraints:                                                    |
1487 |                                                                 |
1488 | - valid\_values:                                                |
1489 |                                                                 |
1490 | - ethernet                                                      |
1491 |                                                                 |
1492 | - mpls                                                          |
1493 |                                                                 |
1494 | - odu2                                                          |
1495 |                                                                 |
1496 | - ipv4                                                          |
1497 |                                                                 |
1498 | - ipv6                                                          |
1499 |                                                                 |
1500 | - pseudo\_wire                                                  |
1501 |                                                                 |
1502 | type: string                                                    |
1503 |                                                                 |
1504 | address\_data:                                                  |
1505 |                                                                 |
1506 | entry\_schema:                                                  |
1507 |                                                                 |
1508 | type: tosca.datatype.nfv.AddressData                            |
1509 |                                                                 |
1510 | required: false                                                 |
1511 |                                                                 |
1512 | type: list                                                      |
1513 |                                                                 |
1514 | requirements:                                                   |
1515 |                                                                 |
1516 | - virtual\_binding:                                             |
1517 |                                                                 |
1518 | capability: tosca.capabilities.nfv.VirtualBindable              |
1519 |                                                                 |
1520 | occurrences:                                                    |
1521 |                                                                 |
1522 | - 0                                                             |
1523 |                                                                 |
1524 | - UNBOUNDED                                                     |
1525 |                                                                 |
1526 | - virtual\_link:                                                |
1527 |                                                                 |
1528 | capability: tosca.capabilities.nfv.VirtualBindable              |
1529 |                                                                 |
1530 | occurrences:                                                    |
1531 |                                                                 |
1532 | - 0                                                             |
1533 |                                                                 |
1534 | - UNBOUNDED                                                     |
1535 |                                                                 |
1536 | tosca\_definitions\_version: tosca\_simple\_yaml\_1\_0          |
1537 +-----------------------------------------------------------------+
1538
1539 .. |image1| image:: Image1.png
1540    :width: 5.76806in
1541    :height: 4.67161in
1542 .. |image2| image:: Image2.png
1543    :width: 5.40486in
1544    :height: 2.46042in
1545
1546
1547 b. Heat
1548 =======
1549
1550 General Guidelines
1551 ------------------
1552
1553 YAML Format
1554 -----------
1555
1556 Heat Orchestration Templates must use valid YAML. YAML (YAML Ain't
1557 Markup Language) is a human friendly data serialization standard for all
1558 programming languages. See http://www.yaml.org/.
1559
1560 Heat Orchestration Template Format
1561 ----------------------------------
1562
1563 Heat Orchestration templates must be defined in YAML.
1564
1565 YAML rules include:
1566
1567 -  Tabs are NOT allowed, use spaces ONLY.
1568
1569 -  You MUST indent your properties and lists with 1 or more spaces.
1570
1571 -  All Resource IDs and resource property parameters are case-sensitive.
1572    (e.g., "ThIs", is not the same as "thiS")
1573
1574 Heat Orchestration Template Structure
1575 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1576
1577 Heat Orchestration template structure follows the following format, as
1578 defined by OpenStack at
1579 https://docs.openstack.org/developer/heat/template_guide/hot_spec.html.
1580
1581 .. code-block:: yaml
1582
1583  heat_template_version: <date>
1584
1585  description:
1586    # a description of the template
1587
1588  parameter_groups:
1589    # a declaration of input parameter groups and order
1590
1591  parameters:
1592    # declaration of input parameters
1593
1594  resources:
1595    # declaration of template resources
1596
1597  outputs:
1598    # declaration of output parameters
1599
1600  conditions:
1601    # declaration of conditions
1602
1603
1604 Heat Orchestration templates for ONAP must contain the following
1605 sections:
1606
1607 -  heat\_template\_version:
1608
1609 -  description:
1610
1611 -  parameters:
1612
1613 -  resources:
1614
1615 Heat Orchestration templates for ONAP may contain the following
1616 sections:
1617
1618 -  parameter\_groups:
1619
1620 -  outputs:
1621
1622 heat\_template\_version
1623 ^^^^^^^^^^^^^^^^^^^^^^^
1624
1625 This section is ONAP mandatory. The heat\_template\_version must be set
1626 to a date that is supported by the OpenStack environment.
1627
1628 description
1629 ^^^^^^^^^^^
1630
1631 This ONAP mandatory section allows for a description of the template.
1632
1633 parameter\_groups
1634 ^^^^^^^^^^^^^^^^^
1635
1636 This ONAP optional section allows for specifying how the input
1637 parameters should be grouped and the order to provide the parameters in.
1638
1639 parameters
1640 ^^^^^^^^^^
1641
1642 The parameter section is ONAP mandatory. This section allows for
1643 specifying input parameters that have to be provided when instantiating
1644 the template. Each parameter is specified in a separated nested block
1645 with the name of the parameters defined in the first line and additional
1646 attributes (e.g., type, label) defined as nested elements.
1647
1648 The Pre-Amsterdam VNF Validation Program (i.e., ICE Project) process
1649 requires all parameters declared in a template to be used in a resource
1650 with the exception of the parameters for the OS::Nova::Server property
1651 availability\_zone. See `Property: availability\_zone`_. for more details on
1652 availability\_zone.
1653
1654 .. code-block:: yaml
1655
1656  parameters:
1657    <param name>:
1658      type: <string | number | json | comma_delimited_list | boolean>
1659      label: <human-readable name of the parameter>
1660      description: <description of the parameter>
1661      default: <default value for parameter>
1662      hidden: <true | false>
1663      constraints:
1664        <parameter constraints>
1665      immutable: <true | false>
1666
1667 -  param name:
1668
1669    -  The name of the parameter.
1670
1671    -  ONAP requires that the param name must contain only alphanumeric
1672       characters and “\_” underscores. Special characters must not be
1673       used.
1674
1675 -  type:
1676
1677    -  The type of the parameter. Supported types are string, number,
1678       comma\_delimited\_list, json and boolean.
1679
1680    -  This attribute must be provided per the OpenStack Heat
1681       Orchestration Template standard.
1682
1683 -  label:
1684
1685    -  A human readable name for the parameter.
1686
1687    -  This attribute is optional.
1688
1689 -  description:
1690
1691    -  A human readable description for the parameter.
1692
1693    -  This attribute is ONAP mandatory; it must be provided. (Note that
1694       this attribute is OpenStack optional.)
1695
1696 -  default:
1697
1698    -  A default value for the parameter.
1699
1700    -  ONAP does not support this attribute; it *must not* be provided in
1701       the Heat Orchestration Template. If a parameter has a default
1702       value, it must be provided in the environment file. (Note that
1703       this attribute is OpenStack optional.)
1704
1705 -  hidden:
1706
1707    -  Defines whether the parameters should be hidden when a user
1708       requests information about a stack created from the template. This
1709       attribute can be used to hide passwords specified as parameters.
1710
1711    -  This attribute is optional and defaults to false.
1712
1713 -  constraints:
1714
1715    -  A list of constraints to apply. The constraints block of a
1716       parameter definition defines additional validation constraints
1717       that apply to the value of the parameter. The parameter values
1718       provided in the Heat Orchestration Template are validated against
1719       the constraints at instantiation time. The constraints are defined
1720       as a list with the following syntax
1721
1722     constraints:
1723
1724     - <constraint type>: <constraint definition>
1725
1726     description: <constraint description>
1727
1728 -  constraint type: Type of constraint to apply.
1729
1730 -  constraint definition: The actual constraint, depending on the
1731    constraint type.
1732
1733 -  description: A description of the constraint. The text is presented
1734    to the user when the value the user defines violates the constraint.
1735    If omitted, a default validation message is presented to the user.
1736    This attribute is optional.
1737
1738 -  When the parameter type is set to number, the Heat Orchestration
1739    Template uploaded into ONAP must have constraints for range or
1740    allowed\_values.
1741
1742    -  range: The range constraint applies to parameters of type number.
1743       It defines a lower and upper limit for the numeric value of the
1744       parameter. The syntax of the range constraint is
1745
1746     range: { min: <lower limit>, max: <upper limit> }
1747
1748     It is possible to define a range constraint with only a lower limit
1749     or an upper limit.
1750
1751 -  allowed\_values: The allowed\_values constraint applies to parameters
1752    of type string or number. It specifies a set of possible values for a
1753    parameter. At deployment time, the user-provided value for the
1754    respective parameter must match one of the elements of the list. The
1755    syntax of the allowed\_values constraint is
1756
1757     allowed\_values: [ <value>, <value>, ... ]
1758
1759     Alternatively, the following YAML list notation can be used
1760
1761     allowed\_values:
1762
1763     - <value>
1764
1765     - <value>
1766
1767     - ...
1768
1769 -  Other <constraint type> are optional, they may be used (e.g., length,
1770    modulo, allowed\_pattern, custom\_constraint, allowed\_values (for
1771    string types))
1772
1773 -  Note that constrains must not be defined for any parameter enumerated
1774    in a nested heat template.
1775
1776 -  Some ONAP parameters must never have constraints defined. See `ONAP Resource ID and Parameter Naming Convention`_ for the use cases where these exceptions exist.
1777
1778 -  immutable:
1779
1780    -  Defines whether the parameter is updatable. Stack update fails, if
1781       this is set to true and the parameter value is changed.
1782
1783    -  This attribute is optional and defaults to false.
1784
1785 resources
1786 ^^^^^^^^^
1787
1788 This section is ONAP mandatory; it must be provided. This section
1789 contains the declaration of the single resources of the template. This
1790 section with at least one resource must be defined in the Heat
1791 Orchestration Template, or the template would not create any resources
1792 when being instantiated.
1793
1794 Each resource is defined as a separate block in the resources section
1795 with the following syntax.
1796
1797 .. code-block:: yaml
1798
1799  resources:
1800    <resource ID>:
1801      type: <resource type>
1802      properties:
1803        <property name>: <property value>
1804      metadata:
1805        <resource specific metadata>
1806      depends\_on: <resource ID or list of ID>
1807      update\_policy: <update policy>
1808      deletion\_policy: <deletion policy>
1809      external\_id: <external resource ID>
1810      condition: <condition name or expression or boolean>
1811
1812 -  resource ID
1813
1814    -  A resource ID that must be unique within the resources section of
1815       the Heat Orchestration Template.
1816
1817    -  ONAP requires that the resource ID must be unique across all Heat
1818       Orchestration Templates that compose the VNF. This requirement
1819       also applies when a VNF is composed of more than one Heat
1820       Orchestration Template (see ONAP VNF Modularity Overview).
1821
1822    -  The naming convention for a resource ID is provided in `Resource IDs`_.
1823
1824 -  type
1825
1826    -  The resource type, such as OS::Nova::Server or OS::Neutron::Port.
1827       Note that the type may specify a nested heat file. This attribute
1828       is required.
1829
1830 -  properties
1831
1832    -  A list of resource-specific properties. The property value can be
1833       provided in place, or via a function (e.g., Intrinsic functions). This section is optional.
1834
1835    -  The naming convention for property parameters is provided in `ONAP Resource ID and Parameter Naming Convention`_.
1836
1837 -  metadata
1838
1839    -  Resource-specific metadata. This section is optional, except for
1840       the resource OS::Nova::Server. See `Resource:  OS::Nova::Server - Parameters`_.
1841
1842 -  depends\_on
1843
1844    -  Dependencies of the resource on one or more resources of the
1845       template. This attribute is optional. See `Resource Data Synchronization`_ for additional details.
1846
1847 -  update\_policy
1848
1849    -  Update policy for the resource, in the form of a nested
1850       dictionary. Whether update policies are supported and what the
1851       exact semantics are depends on the type of the current resource.
1852       This attribute is optional.
1853
1854 -  deletion\_policy
1855
1856    -  Deletion policy for the resource. The allowed deletion policies
1857       are Delete, Retain, and Snapshot. Beginning with
1858       heat\_template\_version 2016-10-14, the lowercase equivalents
1859       delete, retain, and snapshot are also allowed. This attribute is
1860       optional; the default policy is to delete the physical resource
1861       when deleting a resource from the stack.
1862
1863 -  external\_id
1864
1865    -  Allows for specifying the resource\_id for an existing external
1866       (to the stack) resource. External resources cannot depend on other
1867       resources, but we allow other resources to depend on external
1868       resource. This attribute is optional. Note: when this is
1869       specified, properties will not be used for building the resource
1870       and the resource is not managed by Heat. This is not possible to
1871       update that attribute. Also, resource won’t be deleted by heat
1872       when stack is deleted.
1873
1874 -  condition
1875
1876    -  Condition for the resource. The condition decides whether to
1877       create the resource or not. This attribute is optional.
1878
1879 outputs
1880 ^^^^^^^
1881
1882 This ONAP optional section allows for specifying output parameters
1883 available to users once the template has been instantiated. If the
1884 section is specified, it will need to adhere to specific requirements.
1885 See `ONAP Parameter Classifications Overview`_ and `ONAP Output Parameter Names`_ for additional details.
1886
1887 Environment File Format
1888 -----------------------
1889
1890 The environment file is a yaml text file.
1891 (https://docs.openstack.org/developer/heat/template_guide/environment.html)
1892
1893 The environment file can contain the following sections:
1894
1895 -  parameters: A list of key/value pairs.
1896
1897 -  resource\_registry: Definition of custom resources.
1898
1899 -  parameter\_defaults: Default parameters passed to all template
1900    resources.
1901
1902 -  encrypted\_parameters: List of encrypted parameters.
1903
1904 -  event\_sinks: List of endpoints that would receive stack events.
1905
1906 -  parameter\_merge\_strategies: Merge strategies for merging parameters
1907    and parameter defaults from the environment file.
1908
1909 Environment files for ONAP must contain the following sections:
1910
1911 -  parameters:
1912
1913 Environment files for ONAP may contain the following sections:
1914
1915 -  resource\_registry:
1916
1917 -  parameter\_defaults:
1918
1919 -  encrypted\_parameters:
1920
1921 -  event\_sinks:
1922
1923 -  parameter\_merge\_strategies:
1924
1925 The use of an environment file in OpenStack is optional. In ONAP, it is
1926 mandatory. A Heat Orchestration Template uploaded to ONAP must have a
1927 corresponding environment file, even if no parameters are enumerated in
1928 the mandatory parameter section.
1929
1930 (Note that ONAP, the open source version of ONAP, does not
1931 programmatically enforce the use of an environment file.)
1932
1933 SDC Treatment of Environment Files
1934 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1935
1936 Parameter values enumerated in the environment file are used by SDC as
1937 the default value. However, the SDC user may use the SDC GUI to
1938 overwrite the default values in the environment file.
1939
1940 SDC generates a new environment file for distribution to MSO based on
1941 the uploaded environment file and the user provided GUI updates. The
1942 user uploaded environment file is discarded when the new file is
1943 created.
1944
1945 ONAP has requirements for what parameters must be enumerated in the
1946 environment file and what parameter must not be enumerated in the
1947 environment file. See `ONAP Parameter Classifications Overview`_ and `ONAP Resource ID and Parameter Naming Convention`_ for more details.
1948
1949 Nested Heat Orchestration Templates Overview
1950 --------------------------------------------
1951
1952 ONAP supports nested Heat Orchestration Templates per OpenStack
1953 specifications.
1954
1955 A Base Module may utilize nested templates.
1956
1957 An Incremental Module may utilize nested templates.
1958
1959 A Cinder Volume Module may utilize nested templates.
1960
1961 A nested template must not define parameter constraints in the parameter
1962 definition section.
1963
1964 Nested templates may be suitable for larger VNFs that contain many
1965 repeated instances of the same VM type(s). A common usage pattern is to
1966 create a nested template for each VM type along with its supporting
1967 resources. The Heat Orchestration Template may then reference these
1968 nested templates either statically (by repeated definition) or
1969 dynamically (via OS::Heat::ResourceGroup).
1970
1971 See `Nested Heat Templates`_ for additional details.
1972
1973 ONAP Heat Orchestration Template Filenames
1974 ------------------------------------------
1975
1976 In order to enable ONAP to understand the relationship between Heat
1977 files, the following Heat file naming convention must be utilized.
1978
1979 In the examples below, <text> represents any alphanumeric string that
1980 must not contain any special characters and must not contain the word
1981 “base”.
1982
1983 Base Modules
1984 ~~~~~~~~~~~~
1985
1986 The file name for the base module must include “base” in the filename
1987 and must match one of the following options:
1988
1989 -  base\_<text>.y[a]ml
1990
1991 -  <text>\_base.y[a]ml
1992
1993 -  base.y[a]ml
1994
1995 -  <text>\_base\_<text>.y[a]ml
1996
1997 The base module’s corresponding environment file must be named identical
1998 to the base module with “.y[a]ml” replaced with “.env”.
1999
2000 Incremental Modules
2001 ~~~~~~~~~~~~~~~~~~~
2002
2003 There is no explicit naming convention for the incremental modules. As
2004 noted above, <text> represents any alphanumeric string that must not
2005 contain any special characters and must not contain the word “base”.
2006
2007 -  <text>.y[a]ml
2008
2009 The incremental module’s corresponding environment file must be named
2010 identical to the incremental module with “.y[a]ml” replaced with “.env”.
2011
2012 To clearly identify the incremental module, it is recommended to use the
2013 following naming options for modules:
2014
2015 -  module\_<text>.y[a]ml
2016
2017 -  <text>\_module.y[a]ml
2018
2019 -  module.y[a]ml
2020
2021 Cinder Volume Modules
2022 ~~~~~~~~~~~~~~~~~~~~~
2023
2024 The file name for the Cinder volume module must be named the same as the
2025 corresponding module it is supporting (base module or incremental
2026 module) with “\_volume” appended
2027
2028 -  <base module name>\_volume.y[a]ml
2029
2030 -  <incremental module name>\_volume.y[a]ml
2031
2032 The volume module’s corresponding environment file must be named
2033 identical to the volume module with “.y[a]ml” replaced with “.env”.
2034
2035 Nested Heat file
2036 ~~~~~~~~~~~~~~~~
2037
2038 There is no explicit naming convention for nested Heat files with the
2039 following exceptions; the name should contain “nest”. As noted above,
2040 <text> represents any alphanumeric string that must not contain any
2041 special characters and must not contain the word “base”.
2042
2043 -  <text>.y[a]m
2044
2045 Nested Heat files do not have corresponding environment files, per
2046 OpenStack specifications. All parameter values associated with the
2047 nested heat file must be passed in as properties in the resource
2048 definition defined in the parent heat template.
2049
2050 ONAP Parameter Classifications Overview
2051 ---------------------------------------
2052
2053 In order for ONAP to support workflow automation, Heat Orchestration
2054 Template resource property parameters must adhere to specific naming
2055 conventions and requirements.
2056
2057 Broadly, ONAP categorizes parameters into four categories:
2058
2059 1. ONAP metadata parameters
2060
2061 2. Instance specific parameters
2062
2063 3. Constant parameters
2064
2065 4. Output parameters.
2066
2067 ONAP Metadata Parameters
2068 ~~~~~~~~~~~~~~~~~~~~~~~~
2069
2070 There are both mandatory and optional ONAP metadata parameters
2071 associated with the resource OS::Nova::Server.
2072
2073 -  ONAP metadata parameters must not have parameter constraints defined.
2074
2075 -  Both mandatory and optional (if specified) ONAP metadata parameter
2076    names must follow the ONAP metadata parameter naming convention.
2077
2078 `Resource:  OS::Nova::Server – Metadata Parameters`_ provides more details on the metadata parameters.
2079
2080 Instance specific parameters
2081 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2082
2083 The instance specific parameters are VNF instance specific. The value of
2084 the parameter will be different for every instance of a VNF (e.g., IP
2085 address). The instance specific parameters are subdivided into two
2086 categories: **ONAP Orchestration Parameters** and **VNF Orchestration
2087 Parameters**
2088
2089 ONAP Orchestration Parameters
2090 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2091
2092 ONAP Orchestration Parameters are per instance parameters where the
2093 value is assigned via ONAP automation. (Note that in some cases,
2094 automation is currently not available and the value is loaded into ONAP
2095 prior to instantiation.)
2096
2097 -  ONAP orchestration parameters must not be enumerated in the
2098    environment file.
2099
2100 -  When the ONAP orchestration parameter type is set to number, the
2101    parameter must have constraints for range and/or allowed\_values.
2102
2103 -  Parameter constraints for ONAP orchestration parameters are optional
2104    for all parameter types other than number. If constraints are
2105    specified, they must adhere to the OpenStack specifications.
2106
2107 -  The ONAP orchestration parameter names must follow the ONAP
2108    orchestration parameter naming convention. `ONAP Resource ID and Parameter Naming Convention`_ provides
2109    additional details.
2110
2111 VNF Orchestration Parameters
2112 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2113
2114 VNF Orchestration Parameters are per instance parameters where the
2115 values are assigned manually. They are not supported by ONAP automation.
2116 The per instance values are loaded into ONAP prior to VNF instantiation.
2117
2118 -  VNF orchestration parameters must not be enumerated in the
2119    environment file.
2120
2121 -  When the VNF orchestration parameter type is set to number, the
2122    parameter must have constraints for range or allowed\_values.
2123
2124 -  Parameter constraints for VNF orchestration parameters are optional
2125    for all parameter types other than number. If constraints are
2126    specified, they must adhere to the OpenStack specifications.
2127
2128 -  The VNF orchestration parameter names should follow the VNF
2129    orchestration parameter naming convention. `ONAP Resource ID and Parameter Naming Convention`_ provides
2130    additional details.
2131
2132 Constant Parameters
2133 ~~~~~~~~~~~~~~~~~~~
2134
2135 The constant parameters are parameters that remain constant across many
2136 VNF instances (e.g., image, flavor). The constant parameters are
2137 subdivided into two categories: **ONAP Constant Parameters** and **VNF Constant Parameters.**
2138
2139 ONAP Constant Parameters
2140 ^^^^^^^^^^^^^^^^^^^^^^^^
2141
2142 -  ONAP Constant Parameters must be enumerated in the environment file.
2143    These parameter values are not assigned by ONAP.
2144
2145 -  When the ONAP Constant Parameter type is set to number, the parameter
2146    must have constraints for range and/or allowed\_values.
2147
2148 -  Parameter constraints for ONAP constant parameters are optional for
2149    all parameter types other than number. If constraints are specified,
2150    they must adhere to the OpenStack specifications.
2151
2152 -  The ONAP Constant Parameter names must follow the ONAP orchestration
2153    parameter naming convention. `ONAP Resource ID and Parameter Naming Convention`_ provides additional details.
2154
2155 VNF Constant Parameters
2156 ^^^^^^^^^^^^^^^^^^^^^^^
2157
2158 -  VNF Constant Parameters must be enumerated in the environment file.
2159    These parameter values are not assigned by ONAP.
2160
2161 -  When the VNF Constant Parameters type is set to number, the parameter
2162    must have constraints for range and/or allowed\_values.
2163
2164 -  Parameter constraints for ONAP constant parameters are optional for
2165    all parameter types other than number. If constraints are specified,
2166    they must adhere to the OpenStack specifications.
2167
2168 -  The VNF Constant Parameters names should follow the ONAP
2169    orchestration parameter naming convention. `ONAP Resource ID and Parameter Naming Convention`_ provides
2170    additional details.
2171
2172 Output Parameters
2173 ~~~~~~~~~~~~~~~~~
2174
2175 The output parameters are parameters defined in the output section of a
2176 Heat Orchestration Template. The ONAP output parameters are subdivided
2177 into three categories:
2178
2179 1. ONAP Base Module Output Parameters
2180
2181 2. ONAP Volume Module Output Parameters
2182
2183 3. ONAP Predefined Output Parameters.
2184
2185 ONAP Base Module Output Parameters
2186 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2187
2188 ONAP Base Module Output Parameters are declared in the outputs: section
2189 of the base module Heat Orchestration Template. A Base Module Output
2190 Parameter is available as an input parameter (i.e., declared in the
2191 “parameters:” section) to all incremental modules in the VNF.
2192
2193 -  A Base Module Output Parameter may be used as an input parameter in
2194    an incremental module.
2195
2196 -  The Output parameter name and type must match the input parameter
2197    name and type unless the Output parameter is of the type
2198    comma\_delimited\_list.
2199
2200    -  If the Output parameter has a comma\_delimited\_list value (e.g.,
2201       a collection of UUIDs from a Resource Group), then the
2202       corresponding input parameter must be declared as type json and
2203       not a comma\_delimited\_list, which is actually a string value
2204       with embedded commas.
2205
2206 -  When a Base Module Output Parameter is declared as an input parameter
2207    in an incremental module Heat Orchestration Template, parameter
2208    constraints must not be declared.
2209
2210 Additional details on ONAP Base Module Output Parameters are provided in
2211 `ONAP Output Parameter Names`_ and ONAP VNF Modularity.
2212
2213 ONAP Volume Module Output Parameters
2214 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2215
2216 The volume template output parameters are only available for the module
2217 (base or add on) that the volume is associated with.
2218
2219 -  ONAP Volume Module Output Parameters are declared in the “outputs:”
2220    section of the Cinder volume module Heat Orchestration Template
2221
2222 -  An ONAP Volume Module Output Parameter is available as an input
2223    parameter (i.e., declared in the parameters: section) only for the
2224    module (base or incremental) that the Cinder volume module is
2225    associated with. The Output parameter name and type must match the
2226    input parameter name and type unless the Output parameter is of the
2227    type comma\_delimited\_list.
2228
2229 -  If the Output parameter has a comma\_delimited\_list value (e.g., a
2230    collection of UUIDs from a Resource Group), then the corresponding
2231    input parameter must be declared as type json and not a
2232    comma\_delimited\_list, which is actually a string value with
2233    embedded commas.
2234
2235 -  When an ONAP Volume Module Output Parameter is declared as an input
2236    parameter in a base module or incremental module, parameter
2237    constraints must not be declared.
2238
2239 Additional details on ONAP Base Module Output Parameters are provided in
2240 `ONAP Output Parameter Names`_ and `Cinder Volume Templates`_.
2241
2242 ONAP Predefined Output Parameters
2243 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2244
2245 ONAP will look for a small set of pre-defined Heat output parameters to
2246 capture resource attributes for inventory in ONAP. These output
2247 parameters are optional and are specified in `OAM Management IP Addresses`_.
2248
2249 Support of heat stack update
2250 ----------------------------
2251
2252 VNF Heat Orchestration Templates must not be designed to utilize the
2253 OpenStack heat stack-update command for scaling (growth/de-growth). ONAP
2254 does not support the use of heat stack-update command for scaling.
2255
2256 It is important to note that ONAP only supports heat stack-update for
2257 image upgrades.
2258
2259 Networking
2260 ----------
2261
2262 ONAP defines two types of networks: External Networks and Internal
2263 Networks.
2264
2265 ONAP defines an external network in relation to the VNF and not with
2266 regard to the Network Cloud site. External networks may also be referred
2267 to as “inter-VNF” networks. An external network connects VMs in a VNF to
2268
2269 -  VMs in another VNF or
2270
2271 -  an external gateway or router
2272
2273 ONAP defines an internal network in relation to the VNF and not with
2274 regard to the Network Cloud site. Internal networks may also be referred
2275 to as “intra-VNF” networks or “private” networks. An internal network
2276 only connects VMs in a single VNF. It must not connect to other VNFs or
2277 an external gateway or router.
2278
2279 External Networks
2280 -----------------
2281
2282 VNF Heat Orchestration Templates must not include any resources for
2283 external networks connected to the VNF. External networks must be
2284 orchestrated separately, as independent, stand-alone VNF Heat
2285 Orchestration Templates, so they can be shared by multiple VNFs and
2286 managed independently.
2287
2288 When the external network is created, it must be assigned a unique
2289 {network-role}. The {network-role} should describe the network (e.g.,
2290 oam). The {network-role} while unique to the LCP, can repeat across
2291 LCPs.
2292
2293 An External Network may be a Neutron Network or a Contrail Network
2294
2295 External networks must be passed into the VNF Heat Orchestration
2296 Templates as parameters.
2297
2298 -  Neutron Network-id (UUID)
2299
2300 -  Neutron Network subnet ID (UUID)
2301
2302 -  Contrail Network Fully Qualified Domain Name (FQDN)
2303
2304 ONAP enforces a naming convention for parameters associated with
2305 external networks. `ONAP Resource ID and Parameter Naming Convention`_ provides additional details.
2306
2307 Parameter values associated with an external network will be generated
2308 and/or assigned by ONAP at orchestration time. Parameter values
2309 associated with an external network must not be enumerated in the
2310 environment file. `ONAP Resource ID and Parameter Naming Convention`_ provides additional details.
2311
2312 VNFs may use **Cloud assigned IP addresses** or **ONAP SDN-C assigned IP addresses**
2313 when attaching VMs to an external network
2314
2315 -  A Cloud assigned IP address is assigned by OpenStack’s DHCP Service.
2316
2317 -  An ONAP SDN-C assigned IP address is assigned by the ONAP SDN-C
2318    controller
2319
2320 -  Note that Neutron Floating IPs must not be used. ONAP does not
2321    support Neutron Floating IPs (e.g., OS::Neutron::FloatingIP)
2322
2323 -  ONAP supports the property allowed\_address\_pairs in the resource
2324    OS::Neutron:Port and the property
2325    virtual\_machine\_interface\_allowed\_address\_pairs in
2326    OS::ContrailV2::VirtualMachineInterfaces. This allows the assignment
2327    of a virtual IP (VIP) address to a set of VMs.
2328
2329 VNF Heat Orchestration Templates must pass the appropriate external
2330 network IDs into nested VM templates when nested Heat is used.
2331
2332 Internal Networks
2333 -----------------
2334
2335 The VNF Heat Orchestration Templates must include the resource(s) to
2336 create the internal network. The internal network must be either a
2337 Neutron Network or a Contrail Network.
2338
2339 In the modular approach, internal networks must be created in the Base
2340 Module, with their resource IDs exposed as outputs (i.e., ONAP Base
2341 Module Output Parameters) for use by all incremental modules. If the
2342 Network resource ID is required in the base template, then a
2343 get\_resource must be used.
2344
2345 When the internal network is created, it should be assigned a unique
2346 {network-role} in the context of the VNF. `ONAP Resource ID and Parameter Naming Convention`_ provides additional
2347 details.
2348
2349 VNFs may use **Cloud assigned IP addresses** or
2350 **predetermined static IPs** when attaching VMs to an internal network.
2351
2352 -  A Cloud assigned IP address is assigned by OpenStack’s DHCP Service.
2353
2354 -  A predetermined static IP address is enumerated in the Heat
2355    environment file. Since an internal network is local to the VNF, IP
2356    addresses can be re-used at every VNF instance.
2357
2358 -  Note that Neutron Floating IPs must not be used. ONAP does not
2359    support Neutron Floating IPs (e.g., OS::Neutron::FloatingIP)
2360
2361 -  ONAP supports the property allowed\_address\_pairs in the resource
2362    OS::Neutron:Port and the property
2363    virtual\_machine\_interface\_allowed\_address\_pairs in
2364    OS::ContrailV2::VirtualMachineInterfaces. This allows the assignment
2365    of a virtual IP (VIP) address to a set of VMs.
2366
2367 ONAP does not programmatically enforce a naming convention for
2368 parameters for internal network. However, a naming convention is
2369 provided that must be followed. `ONAP Resource ID and Parameter Naming Convention`_ provides additional details.
2370
2371 ONAP Resource ID and Parameter Naming Convention
2372 ------------------------------------------------
2373
2374 This section provides the ONAP naming requirements for
2375
2376 1. Resource IDs
2377
2378 2. Resource Property Parameters
2379
2380 {vm-type}
2381 ---------
2382
2383 The Heat Orchestration Templates for a VNF must assign a VNF unique
2384 {vm-type} for each Virtual Machine type (i.e., OS::Nova::Server)
2385 instantiated in the VNF. While the {vm-type} must be unique to the VNF,
2386 it does not have to be globally unique across all VNFs that ONAP
2387 supports.
2388
2389 Any parameter that is associated with a unique Virtual Machine type in
2390 the VNF must include {vm-type} as part of the parameter name.
2391
2392 Any resource ID that is associated with a unique Virtual Machine type in
2393 the VNF must include {vm-type} as part of the resource ID.
2394
2395 Note that {vm-type} must not be a substring of {network-role}. A
2396 substring of a string is another string that occurs "in". For example,
2397 "oam" is a substring of "oam\_protected". It will cause the
2398 Pre-Amsterdam VNF Validation Program (i.e., ICE Project) process to
2399 produce erroneous error messages.
2400
2401 The {vm-type} should not contain the string “\_int” or “int\_” or
2402 “\_int\_”. It may cause the Pre-Amsterdam VNF Validation Program (i.e.,
2403 ICE Project) process to produce erroneous error messages.
2404
2405 The {vm-type} must be the same case in all parameter names in the VNF.
2406
2407 The {vm-type} must be the same case in all Resource IDs in the VNF.
2408
2409 It is recommended that the {vm-type} case in the parameter names matches
2410 the {vm-type} case in the Resource IDs.
2411
2412 There are two exceptions to the above rules:
2413
2414 1. The six ONAP Metadata parameters must not be prefixed with a common
2415    {vm-type} identifier. They are *vnf\_name*, *vnf\_id*,
2416    *vf\_module\_id*, *vf\_module\_name, vm\_role*. The ONAP Metadata
2417    parameters are described in `Resource:  OS::Nova::Server – Metadata Parameters`_.
2418
2419 2. The parameter referring to the OS::Nova::Server property
2420    availability\_zone must not be prefixed with a common {vm-type}
2421    identifier. availability\_zone is described in `Property: availability_zone`_.
2422
2423 {network-role}
2424 --------------
2425
2426 The assignment of a {network-role} is discussed in `Networking`_.
2427
2428 Any parameter that is associated with an external network must include
2429 the {network-role} as part of the parameter name.
2430
2431 Any resource ID that is associated with an external network must include
2432 the {network-role} as part of the resource ID.
2433
2434 Any parameter that is associated with an internal network must include
2435 int\_{network-role} as part of the parameter name.
2436
2437 Any resource ID that is associated with an internal network must include
2438 int\_{network-role} as part of the resource ID.
2439
2440 Note that {network-role} must not be a substring of {vm-type}. A
2441 substring of a string is another string that occurs "in". For example,
2442 "oam" is a substring of "oam\_protected". It will cause the
2443 Pre-Amsterdam VNF Validation Program (i.e., ICE Project) process to
2444 produce erroneous error messages.
2445
2446 The {network-role} should not contain the string “\_int” or “int\_” or
2447 “\_int\_”. It may cause the Pre-Amsterdam VNF Validation Program (i.e.,
2448 ICE Project) process to produce erroneous error messages.
2449
2450 The {network-role} must be the same case in all parameter names in the
2451 VNF.
2452
2453 The {network-role} must be the same case in all Resource IDs in the VNF.
2454
2455 It is recommended that the {network-role} case in the parameter names
2456 matches the {network-role} case in the Resource IDs.
2457
2458 Resource IDs
2459 ------------
2460
2461 Heat Orchestration Template resources are described in `resources`_
2462
2463 A resource ID that must be unique within the resources section of a Heat
2464 Orchestration Template. This is an OpenStack Requirement.
2465
2466 When a VNF is composed of more than one Heat Orchestration Template
2467 (i.e., modules), ONAP requires that the resource ID must be unique
2468 across all modules that compose the VNF.
2469
2470 When a resource is associated with a single {vm-type}, the resource ID
2471 must contain {vm-type}.
2472
2473 When a resource is associated with a single external network, the
2474 resource ID must contain {network-role}.
2475
2476 When a resource is associated with a single internal network, the
2477 resource ID must contain int\_{network-role}.
2478
2479 When a resource is associated with a single {vm-type} and a single
2480 external network, the resource ID must contain both the {vm-type} and
2481 {network-role}.
2482
2483 -  The {vm-type} must appear before the {network-role} and must be
2484    separated by an underscore (i.e., {vm-type}\_{network-role}).
2485
2486 -  Note that an {index} value may separate the {vm-type} and the
2487    {network-role}. An underscore will separate the three values (i.e.,
2488    {vm-type}\_{index}\_{network-role}).
2489
2490 When a resource is associated with a single {vm-type} and a single
2491 internal network, the resource ID must contain both the {vm-type} and
2492 int\_{network-role}.
2493
2494 -  The {vm-type} must appear before the int\_{network-role} and must be
2495    separated by an underscore (i.e., {vm-type}\_int\_{network-role}).
2496
2497 -  Note that an {index} value may separate the {vm-type} and the
2498    int\_{network-role}. An underscore will separate the three values
2499    (i.e., {vm-type}\_{index}\_int\_{network-role}).
2500
2501 When a resource is associated with more than one {vm-type} and/or more
2502 than one network, the resource ID
2503
2504 -  must not contain the {vm-type} and/or
2505    {network-role}/int\_{network-role}
2506
2507 -  should contain the term “shared” and/or contain text that identifies
2508    the VNF.
2509
2510 Only alphanumeric characters and “\_” underscores must be used in the
2511 resource ID. Special characters must not be used.
2512
2513 All {index} values must be zero based. That is, the {index} must start
2514 at zero and increment by one.
2515
2516 The table below provides example OpenStack Heat resource ID for
2517 resources only associated with one {vm-type} and/or one network.
2518
2519 +--------------------------------+------------------------------------------------------------+
2520 | Resource Type                  | Resource ID Format                                         |
2521 +================================+============================================================+
2522 | OS::Cinder::Volume             | {vm\_type}\_volume\_{index}                                |
2523 +--------------------------------+------------------------------------------------------------+
2524 | OS::Cinder::VolumeAttachment   | {vm\_type}\_volumeattachment\_{index}                      |
2525 +--------------------------------+------------------------------------------------------------+
2526 | OS::Heat::CloudConfig          | {vm\_type}\_RCC                                            |
2527 +--------------------------------+------------------------------------------------------------+
2528 | OS::Heat::MultipartMime        | {vm\_type}\_RMM                                            |
2529 +--------------------------------+------------------------------------------------------------+
2530 | OS::Heat::ResourceGroup        | {vm\_type}\_RRG                                            |
2531 +--------------------------------+------------------------------------------------------------+
2532 | OS::Heat::SoftwareConfig       | {vm\_type}\_RSC                                            |
2533 +--------------------------------+------------------------------------------------------------+
2534 | OS::Neutron::Port              | {vm\_type}\_{index}\_{network\_role}\_{index}\_port        |
2535 +--------------------------------+------------------------------------------------------------+
2536 |                                | {vm\_type}\_{index}\_int\_{network\_role}\_{index}\_port   |
2537 +--------------------------------+------------------------------------------------------------+
2538 | OS::Neutron::SecurityGroup     | {vm\_type}\_RSG                                            |
2539 +--------------------------------+------------------------------------------------------------+
2540 | OS::Neutron::Subnet            | {network\_role}\_subnet\_{index}                           |
2541 +--------------------------------+------------------------------------------------------------+
2542 | OS::Nova::Server               | {vm\_type}\_{index}                                        |
2543 +--------------------------------+------------------------------------------------------------+
2544 | OS::Nova::ServerGroup          | {vm\_type}\_RSG                                            |
2545 +--------------------------------+------------------------------------------------------------+
2546 | OS::Swift::Container           | {vm\_type}\_RSwiftC                                        |
2547 +--------------------------------+------------------------------------------------------------+
2548
2549     Table 1: Example OpenStack Heat Resource ID
2550
2551 The table below provides example Contrail Heat resource ID for resources
2552 only associated with one {vm-type} and/or one network.
2553
2554 +-------------------------------------------+---------------------------------------------+
2555 | Resource Type                             | Resource ID Format                          |
2556 +===========================================+=============================================+
2557 | OS::ContrailV2::InstanceIp                | {vm\_type}\_{index}\_{network\_role}\_RII   |
2558 +-------------------------------------------+---------------------------------------------+
2559 | OS::ContrailV2::InterfaceRouteTable       | {network\_role}\_RIRT                       |
2560 +-------------------------------------------+---------------------------------------------+
2561 | OS::ContrailV2::NetworkIpam               | {network\_role}\_RNI                        |
2562 +-------------------------------------------+---------------------------------------------+
2563 | OS::ContrailV2::PortTuple                 | {vm\_type}\_RPT                             |
2564 +-------------------------------------------+---------------------------------------------+
2565 | OS::ContrailV2::ServiceHealthCheck        | {vm\_type}\_RSHC\_{LEFT\|RIGHT}             |
2566 +-------------------------------------------+---------------------------------------------+
2567 | OS::ContrailV2::ServiceTemplate           | {vm\_type}\_RST\_{index}                    |
2568 +-------------------------------------------+---------------------------------------------+
2569 | OS::ContrailV2::VirtualMachineInterface   | int\_{network\_role}\_RVMI                  |
2570 +-------------------------------------------+---------------------------------------------+
2571 | OS::ContrailV2::VirtualNetwork            | int\_{network\_role}\_RVN                   |
2572 +-------------------------------------------+---------------------------------------------+
2573
2574     Table 2: Example Contrail Heat resource ID
2575
2576 Resource: OS::Nova::Server - Parameters
2577 ---------------------------------------
2578
2579 The resource OS::Nova::Server manages the running virtual machine (VM)
2580 instance within an OpenStack cloud. (See
2581 https://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Nova::Server.)
2582
2583 Four properties of this resource must follow the ONAP parameter naming
2584 convention. The four properties are:
2585
2586 1. image
2587
2588 2. flavor
2589
2590 3. name
2591
2592 4. availability\_zone
2593
2594 The table below provides a summary. The sections that follow provides
2595 additional details.
2596
2597 Note that the {vm\_type} must be identical across all four property
2598 parameter for a given OS::Nova::Server resource.
2599
2600 +-----------------------------+-------------------------------+------------------+------------------------------+---------------------------------+
2601 | Resource OS::Nova::Server                                                                                                                       |
2602 +=============================+===============================+==================+==============================+=================================+
2603 | Property Name               | ONAP Parameter Name           | Parameter Type   | Parameter Value Generation   | ONAP Parameter Classification   |
2604 +-----------------------------+-------------------------------+------------------+------------------------------+---------------------------------+
2605 | image                       | {vm-type}\_image\_name        | string           | Environment File             | ONAP Constant                   |
2606 +-----------------------------+-------------------------------+------------------+------------------------------+---------------------------------+
2607 | flavor                      | {vm-type}\_flavor\_name       | string           | Environment File             | ONAP Constant                   |
2608 +-----------------------------+-------------------------------+------------------+------------------------------+---------------------------------+
2609 | name                        | {vm-type}\_name\_{index}      | string           | ONAP                         | ONAP Orchestration              |
2610 +-----------------------------+-------------------------------+------------------+------------------------------+---------------------------------+
2611 |                             | {vm-type}\_names              | CDL              | ONAP                         | ONAP Orchestration              |
2612 +-----------------------------+-------------------------------+------------------+------------------------------+---------------------------------+
2613 | availability\_zone          | availability\_zone\_{index}   | string           | ONAP                         | ONAP Orchestration              |
2614 +-----------------------------+-------------------------------+------------------+------------------------------+---------------------------------+
2615
2616 Table 3 Resource Property Parameter Names
2617
2618 Property: image
2619 ~~~~~~~~~~~~~~~
2620
2621 The parameter associated with the property image is an ONAP Constant
2622 parameter.
2623
2624 The parameters must be named {vm-type}\_image\_name in the Heat
2625 Orchestration Template.
2626
2627 The parameter must be declared as type: string
2628
2629 The parameter must be enumerated in the Heat Orchestration Template
2630 environment file.
2631
2632 Each VM type (i.e., {vm-type}) must have a separate parameter for image,
2633 even if more than one {vm-type} shares the same image. This provides
2634 maximum clarity and flexibility.
2635
2636 *Example Parameter Definition*
2637
2638 .. code-block:: yaml
2639
2640  parameters:
2641      {vm-type}_image_name:
2642          type: string
2643          description: {vm-type} server image
2644
2645 Property: flavor
2646 ~~~~~~~~~~~~~~~~
2647
2648 The parameter associated with the property flavor is an ONAP Constant
2649 parameter.
2650
2651 The parameters must be named {vm-type}\_flavor\_name in the Heat
2652 Orchestration Template.
2653
2654 The parameter must be declared as type: string
2655
2656 The parameter must be enumerated in the Heat Orchestration Template
2657 environment file.
2658
2659 Each VM type (i.e., {vm-type}) must have a separate parameter for
2660 flavors, even if more than one {vm-type} shares the same flavor. This
2661 provides maximum clarity and flexibility.
2662
2663 *Example Parameter Definition*
2664
2665 .. code-block:: yaml
2666
2667  parameters:
2668      {vm-type}_flavor_name:
2669          type: string
2670          description: {vm-type} flavor
2671
2672 Property: Name
2673 ~~~~~~~~~~~~~~
2674
2675 The parameter associated with the property name is an ONAP Orchestration
2676 parameter.
2677
2678 The parameter value is provided to the Heat template by ONAP. The
2679 parameter must not be enumerated in the environment file.
2680
2681 The parameter must be declared as type: string or type:
2682 comma\_delimited\_list
2683
2684 If the parameter is declared as type:string, the parameter must be named
2685 {vm-type}\_name\_{index}, where {index} is a numeric value that starts
2686 at zero and increments by one.
2687
2688 If the parameter is declared as type:comma\_delimited\_list, the
2689 parameter must be named as {vm-type}\_names
2690
2691 Each element in the VM Name list should be assigned to successive
2692 instances of that VM type.
2693
2694 If a VNF contains more than three instances of a given {vm-type}, the
2695 comma\_delimited\_list form of the parameter name (i.e.,
2696 {vm-type}\_names) should be used to minimize the number of unique
2697 parameters defined in the Heat.
2698
2699 *Example: Parameter Definition*
2700
2701 .. code-block:: yaml
2702
2703  parameters:
2704      {vm-type}_names:
2705          type: comma_delimited_list
2706          description: VM Names for {vm-type} VMs
2707      {vm-type}_name_{index}:
2708          type: string
2709          description: VM Name for {vm-type} VM {index}
2710
2711 *Example: comma\_delimited\_list*
2712
2713 In this example, the {vm-type} has been defined as “lb” for load
2714 balancer.
2715
2716 .. code-block:: yaml
2717
2718  parameters:
2719      lb_names:
2720          type: comma_delimited_list
2721          description: VM Names for lb VMs
2722
2723  resources:
2724      lb_0:
2725          type: OS::Nova::Server
2726          properties:
2727              name: { get_param: [lb_names, 0] }
2728              ...
2729
2730      lb_1:
2731          type: OS::Nova::Server
2732          properties:
2733              name: { get_param: [lb_names, 1] }
2734              ...
2735
2736 *Example: fixed-index*
2737
2738 In this example, the {vm-type} has been defined as “lb” for load
2739 balancer.
2740
2741 .. code-block:: yaml
2742
2743  parameters:
2744      lb_name_0:
2745          type: string
2746          description: VM Name for lb VM 0
2747
2748      lb_name_1:
2749          type: string
2750          description: VM Name for lb VM 1
2751
2752  resources:
2753      lb_0:
2754          type: OS::Nova::Server
2755          properties:
2756              name: { get_param: lb_name_0 }
2757              ...
2758
2759      lb_1:
2760          type: OS::Nova::Server
2761          properties:
2762              name: { get_param: lb_name_1 }
2763              ...
2764
2765 Contrail Issue with Values for OS::Nova::Server Property Name
2766 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2767
2768 The Contrail GUI has a limitation displaying special characters. The
2769 issue is documented in
2770 https://bugs.launchpad.net/juniperopenstack/+bug/1590710. It is
2771 recommended that special characters be avoided. However, if special
2772 characters must be used, the only special characters supported are:
2773
2774 - “ ! $ ‘ ( ) = ~ ^ \| @ \` { } [ ] > , . \_
2775
2776 Property: availability\_zone
2777 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2778
2779 The parameter associated with the property availability\_zone is an ONAP
2780 Orchestration parameter.
2781
2782 The parameter value is provided to the Heat template by ONAP. The
2783 parameter must not be enumerated in the environment file.
2784
2785 The parameter must be named availability\_zone\_{index} in the Heat
2786 Orchestration Template. The {index} must start at zero. The {index} must
2787 increment by one. The parameter name must not include the {vm-type}.
2788
2789 The parameter must be declared as type: string
2790
2791 The parameter must not be declared as type: comma\_delimited\_list
2792
2793 Example
2794 ~~~~~~~
2795
2796 The example below depicts part of a Heat Orchestration Template that
2797 uses the four OS::Nova::Server properties discussed in this section.
2798
2799 In the Heat Orchestration Template below, four Virtual Machines
2800 (OS::Nova::Server) are created: two dns servers with {vm-type} set to
2801 “dns” and two oam servers with {vm-type} set to “oam”. Note that the
2802 parameter associated with the property name is a comma\_delimited\_list
2803 for dns and a string for oam.
2804
2805 .. code-block:: yaml
2806
2807  parameters:
2808    dns_image_name:
2809      type: string
2810      description: dns server image
2811    dns_flavor_name:
2812      type: string
2813      description: dns server flavor
2814    dns_names:
2815      type: comma_delimited_list
2816      description: dns server names
2817    oam_image_name:
2818      type: string
2819      description: oam server image
2820    oam_flavor_name:
2821      type: string
2822      description: oam server flavor
2823    oam_name_0:
2824      type: string
2825      description: oam server name 0
2826    oam_name_1:
2827      type: string
2828      description: oam server name 1
2829    availability_zone_0:
2830      type: string
2831      description: availability zone ID or Name
2832    availability_zone_1:
2833      type: string
2834      description: availability zone ID or Name
2835
2836  resources:
2837    dns_server_0:
2838      type: OS::Nova::Server
2839      properties:
2840        name: { get_param: [ dns_names, 0 ] }
2841        image: { get_param: dns_image_name }
2842        flavor: { get_param: dns_flavor_name }
2843        availability_zone: { get_param: availability_zone_0 }
2844        . . .
2845
2846    dns_server_1:
2847      type: OS::Nova::Server
2848      properties:
2849        name: { get_param: [ dns_names, 1 ] }
2850        image: { get_param: dns_image_name }
2851        flavor: { get_param: dns_flavor_name }
2852        availability_zone: { get_param: availability_zone_1 }
2853        . . .
2854
2855    oam_server_0:
2856      type: OS::Nova::Server
2857      properties:
2858        name: { get_param: oam_name_0 }
2859        image: { get_param: oam_image_name }
2860        flavor: { get_param: oam_flavor_name }
2861        availability_zone: { get_param: availability_zone_0 }
2862        . . .
2863
2864    oam_server_1:
2865      type: OS::Nova::Server
2866      properties:
2867        name: { get_param: oam_name_1 }
2868        image: { get_param: oam_image_name }
2869        flavor: { get_param: oam_flavor_name }
2870        availability_zone: { get_param: availability_zone_1 }
2871        . . .
2872
2873 Resource: OS::Nova::Server – Metadata Parameters
2874 ------------------------------------------------
2875
2876 The resource OS::Nova::Server has an OpenStack optional property
2877 metadata. The metadata property is mandatory for ONAP Heat Orchestration
2878 Templates; it must be included.
2879
2880 ONAP requires the following three mandatory metadata parameters for an
2881 OS::Nova::Server resource:
2882
2883 -  vnf\_id
2884
2885 -  vf\_module\_id
2886
2887 -  vnf\_name
2888
2889 ONAP allows the following three optional metadata parameters for an
2890 OS::Nova::Server resource. They may be included
2891
2892 -  vm\_role
2893
2894 -  vf\_module\_name
2895
2896 Note that the metadata parameters do not and must not contain {vm-type}
2897 in their name.
2898
2899 When Metadata parameters are past into a nested heat template, the
2900 parameter names must not change.
2901
2902 The table below provides a summary. The sections that follow provides
2903 additional details.
2904
2905 +---------------------------+------------------+----------------------+------------------------------+
2906 | Metadata Parameter Name   | Parameter Type   | Mandatory/Optional   | Parameter Value Generation   |
2907 +===========================+==================+======================+==============================+
2908 | vnf\_id                   | string           | Mandatory            | ONAP                         |
2909 +---------------------------+------------------+----------------------+------------------------------+
2910 | vf\_module\_id            | string           | Mandatory            | ONAP                         |
2911 +---------------------------+------------------+----------------------+------------------------------+
2912 | vnf\_name                 | string           | Mandatory            | ONAP                         |
2913 +---------------------------+------------------+----------------------+------------------------------+
2914 | vf\_module\_name          | string           | Optional             | ONAP                         |
2915 +---------------------------+------------------+----------------------+------------------------------+
2916 | vm\_role                  | string           | Optional             | YAML or Environment File     |
2917 +---------------------------+------------------+----------------------+------------------------------+
2918 +---------------------------+------------------+----------------------+------------------------------+
2919
2920     Table 4: ONAP Metadata
2921
2922 vnf\_id
2923 ~~~~~~~
2924
2925 The vnf\_id parameter is mandatory; it must be included in the Heat
2926 Orchestration Template.
2927
2928 The vnf\_id parameter value will be supplied by ONAP. ONAP generates the
2929 UUID that is the vnf\_id and supplies it to the Heat Orchestration
2930 Template at orchestration time.
2931
2932 The parameter must be declared as type: string
2933
2934 Parameter constraints must not be defined.
2935
2936 The parameter must not be enumerated in the Heat environment file.
2937
2938 *Example Parameter Definition*
2939
2940 .. code-block:: yaml
2941
2942  parameters:
2943      vnf_id:
2944          type: string
2945          description: Unique ID for this VNF instance
2946
2947 vf\_module\_id
2948 ~~~~~~~~~~~~~~
2949
2950 The vf\_module\_id parameter is mandatory; it must be included in the
2951 Heat Orchestration Template.
2952
2953 The vf\_module\_id parameter value will be supplied by ONAP. ONAP
2954 generates the UUID that is the vf\_module\_id and supplies it to the
2955 Heat Orchestration Template at orchestration time.
2956
2957 The parameter must be declared as type: string
2958
2959 Parameter constraints must not be defined.
2960
2961 The parameter must not be enumerated in the Heat environment file.
2962
2963 *Example Parameter Definition*
2964
2965 .. code-block:: yaml
2966
2967  parameters:
2968      vnf_module_id:
2969          type: string
2970          description: Unique ID for this VNF module instance
2971
2972 vnf\_name
2973 ~~~~~~~~~
2974
2975 The vnf\_name parameter is mandatory; it must be included in the Heat
2976 Orchestration Template.
2977
2978 The vnf\_name parameter value will be generated and/or assigned by ONAP
2979 and supplied to the Heat Orchestration Template by ONAP at orchestration
2980 time.
2981
2982 The parameter must be declared as type: string
2983
2984 Parameter constraints must not be defined.
2985
2986 The parameter must not be enumerated in the Heat environment file.
2987
2988 *Example Parameter Definition*
2989
2990 .. code-block:: yaml
2991
2992  parameters:
2993      vnf_name:
2994          type: string
2995          description: Unique name for this VNF instance
2996
2997 vf\_module\_name
2998 ~~~~~~~~~~~~~~~~
2999
3000 The vf\_module\_name parameter is optional; it may be included in the
3001 Heat Orchestration Template.
3002
3003 The vf\_module\_name parameter is the name of the name of the Heat stack
3004 (e.g., <STACK\_NAME>) in the command “Heat stack-create” (e.g., Heat
3005 stack-create [-f <FILE>] [-e <FILE>] <STACK\_NAME>). The <STACK\_NAME>
3006 needs to be specified as part of the orchestration process.
3007
3008 The parameter must be declared as type: string
3009
3010 Parameter constraints must not be defined.
3011
3012 The parameter must not be enumerated in the Heat environment file.
3013
3014 *Example Parameter Definition*
3015
3016 .. code-block:: yaml
3017
3018  parameters:
3019      vf_module_name:
3020          type: string
3021          description: Unique name for this VNF Module instance
3022
3023 vm\_role
3024 ~~~~~~~~
3025
3026 The vm\_role parameter is optional; it may be included in the Heat
3027 Orchestration Template.
3028
3029 Any roles tagged to the VMs via metadata will be stored in ONAP’s A&AI
3030 system and available for use by other ONAP components and/or north bound
3031 systems.
3032
3033 The vm\_role values must be either
3034
3035 -  hard-coded into the Heat Orchestration Template or
3036
3037 -  enumerated in the environment file.
3038
3039 Defining the vm\_role as the {vm-type} is a recommended convention
3040
3041 The parameter must be declared as type: string
3042
3043 Parameter constraints must not be defined.
3044
3045 *Example Parameter Definition*
3046
3047 .. code-block:: yaml
3048
3049  parameters:
3050      vm_role:
3051          type: string
3052          description: Unique role for this VM
3053
3054 *Example Resource Definition: Hard Coded*
3055
3056 In this example, the {vm-role} is hard coded in the Heat Orchestration
3057 Template.
3058
3059 .. code-block:: yaml
3060
3061  resources:
3062    dns_servers:
3063      type: OS::Nova::Server
3064      properties:
3065        . . . .
3066        metadata:
3067          vm_role: lb
3068
3069 *Example Resource Definition: get\_param*
3070
3071 In this example, the {vm-role} is enumerated in the environment file.
3072
3073 .. code-block:: yaml
3074
3075  resources:
3076    dns_servers:
3077      type: OS::Nova::Server
3078      properties:
3079        . . . .
3080        metadata:
3081          vm_role: { get_param: vm_role }
3082
3083 Example
3084 ~~~~~~~
3085
3086 The example below depicts part of a Heat Orchestration Template that
3087 uses the five of the OS::Nova::Server metadata parameter discussed in
3088 this section. The {vm-type} has been defined as lb for load balancer.
3089
3090 .. code-block:: yaml
3091
3092  parameters:
3093     lb_name_0
3094        type: string
3095        description: VM Name for lb VM 0
3096     vnf_name:
3097        type: string
3098        description: Unique name for this VNF instance
3099     vnf_id:
3100        type: string
3101        description: Unique ID for this VNF instance
3102     vf_module_name:
3103        type: string
3104        description: Unique name for this VNF Module instance
3105     vf_module_id:
3106        type: string
3107        description: Unique ID for this VNF Module instance
3108     vm_role:
3109        type: string
3110        description: Unique role for this VM
3111
3112  resources:
3113
3114     lb_vm_0:
3115        type: OS::Nova::Server
3116        properties:
3117        name: { get_param: lb_name_0 }
3118        ...
3119        metadata:
3120           vnf_name: { get_param: vnf_name }
3121           vnf_id: { get_param: vnf_id }
3122           vf_module_name: { get_param: vf_module_name }
3123           vf_module_id: { get_param: vf_module_id }
3124           vm_role: lb
3125
3126 Resource: OS::Neutron::Port - Parameters
3127 ----------------------------------------
3128
3129 The resource OS::Neutron::Port is for managing Neutron ports (See
3130 https://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Neutron::Port.)
3131
3132 Introduction
3133 ~~~~~~~~~~~~
3134
3135 Four properties of the resource OS::Neutron::Port that must follow the
3136 ONAP parameter naming convention. The four properties are:
3137
3138 1. network
3139
3140 2. fixed\_ips, ip\_address
3141
3142 3. fixed\_ips, subnet\_id
3143
3144 4. allowed\_address\_pairs, ip\_address
3145
3146 The parameters associated with these properties may reference an
3147 external network or internal network. External networks and internal
3148 networks are defined in `Networking`_.
3149
3150 External Networks
3151 ^^^^^^^^^^^^^^^^^
3152
3153 When the parameter references an external network
3154
3155 -  the parameter name must contain {network-role}
3156
3157 -  the parameter must not be enumerated in the Heat environment file
3158
3159 -  the parameter is classified as an ONAP Orchestration Parameter
3160
3161 +----------------------------------------+-----------------------------------------------+--------------------------+
3162 | Property Name                          | ONAP Parameter Name                           | Parameter Type           |
3163 +========================================+===============================================+==========================+
3164 | network                                | {network-role}\_net\_id                       | string                   |
3165 +----------------------------------------+-----------------------------------------------+--------------------------+
3166 |                                        | {network-role}\_net\_name                     | string                   |
3167 +----------------------------------------+-----------------------------------------------+--------------------------+
3168 | fixed\_ips, ip\_address                | {vm-type}\_{network-role}\_ip\_{index}        | string                   |
3169 +----------------------------------------+-----------------------------------------------+--------------------------+
3170 |                                        | {vm-type}\_{network-role}\_ips                | comma\_delimited\_list   |
3171 +----------------------------------------+-----------------------------------------------+--------------------------+
3172 |                                        | {vm-type}\_{network-role}\_v6\_ip\_{index}    | string                   |
3173 +----------------------------------------+-----------------------------------------------+--------------------------+
3174 |                                        | {vm-type}\_{network-role}\_v6\_ips            | comma\_delimited\_list   |
3175 +----------------------------------------+-----------------------------------------------+--------------------------+
3176 | fixed\_ips, subnet                     | {network-role}\_subnet\_id                    | string                   |
3177 +----------------------------------------+-----------------------------------------------+--------------------------+
3178 |                                        | {network-role}\_v6\_subnet\_id                | string                   |
3179 +----------------------------------------+-----------------------------------------------+--------------------------+
3180 | allowed\_address\_pairs, ip\_address   | {vm-type}\_{network-role}\_floating\_ip       | string                   |
3181 +----------------------------------------+-----------------------------------------------+--------------------------+
3182 |                                        | {vm-type}\_{network-role}\_floating\_v6\_ip   | string                   |
3183 +----------------------------------------+-----------------------------------------------+--------------------------+
3184 |                                        | {vm-type}\_{network-role}\_ip\_{index}        | string                   |
3185 +----------------------------------------+-----------------------------------------------+--------------------------+
3186 |                                        | {vm-type}\_{network-role}\_ips                | comma\_delimited\_list   |
3187 +----------------------------------------+-----------------------------------------------+--------------------------+
3188 |                                        | {vm-type}\_{network-role}\_v6\_ip\_{index}    | string                   |
3189 +----------------------------------------+-----------------------------------------------+--------------------------+
3190 |                                        | {vm-type}\_{network-role}\_v6\_ips            | comma\_delimited\_list   |
3191 +----------------------------------------+-----------------------------------------------+--------------------------+
3192
3193 Table 5: OS::Neutron::Port Resource Property Parameters (External
3194 Networks)
3195
3196 Internal Networks
3197 ^^^^^^^^^^^^^^^^^
3198
3199 When the parameter references an internal network
3200
3201 -  the parameter name must contain int\_{network-role}
3202
3203 -  the parameter may be enumerated in the environment file.
3204
3205 +----------------------------------------+----------------------------------------------------+--------------------------+
3206 | Property                               | Parameter Name for Internal Networks               | Parameter Type           |
3207 +========================================+====================================================+==========================+
3208 | network                                | int\_{network-role}\_net\_id                       | string                   |
3209 +----------------------------------------+----------------------------------------------------+--------------------------+
3210 |                                        | int\_{network-role}\_net\_name                     | string                   |
3211 +----------------------------------------+----------------------------------------------------+--------------------------+
3212 | fixed\_ips, ip\_address                | {vm-type}\_int\_{network-role}\_ip\_{index}        | string                   |
3213 +----------------------------------------+----------------------------------------------------+--------------------------+
3214 |                                        | {vm-type}\_int\_{network-role}\_ips                | comma\_delimited\_list   |
3215 +----------------------------------------+----------------------------------------------------+--------------------------+
3216 |                                        | {vm-type}\_int\_{network-role}\_v6\_ip\_{index}    | string                   |
3217 +----------------------------------------+----------------------------------------------------+--------------------------+
3218 |                                        | {vm-type}\_int\_{network-role}\_v6\_ips            | comma\_delimited\_list   |
3219 +----------------------------------------+----------------------------------------------------+--------------------------+
3220 | fixed\_ips, subnet                     | int\_{network-role}\_subnet\_id                    | string                   |
3221 +----------------------------------------+----------------------------------------------------+--------------------------+
3222 |                                        | int\_{network-role}\_v6\_subnet\_id                | string                   |
3223 +----------------------------------------+----------------------------------------------------+--------------------------+
3224 | allowed\_address\_pairs, ip\_address   | {vm-type}\_int\_{network-role}\_floating\_ip       | string                   |
3225 +----------------------------------------+----------------------------------------------------+--------------------------+
3226 |                                        | {vm-type}\_int\_{network-role}\_floating\_v6\_ip   | string                   |
3227 +----------------------------------------+----------------------------------------------------+--------------------------+
3228 |                                        | {vm-type}\_int\_{network-role}\_ip\_{index}        | string                   |
3229 +----------------------------------------+----------------------------------------------------+--------------------------+
3230 |                                        | {vm-type}\_int\_{network-role}\_ips                | comma\_delimited\_list   |
3231 +----------------------------------------+----------------------------------------------------+--------------------------+
3232 |                                        | {vm-type}\_int\_{network-role}\_v6\_ip\_{index}    | string                   |
3233 +----------------------------------------+----------------------------------------------------+--------------------------+
3234 |                                        | {vm-type}\_int\_{network-role}\_v6\_ips            | comma\_delimited\_list   |
3235 +----------------------------------------+----------------------------------------------------+--------------------------+
3236
3237 Table 6: Port Resource Property Parameters (Internal Networks)
3238
3239 Property: network
3240 ~~~~~~~~~~~~~~~~~
3241
3242 The property networks in the resource OS::Neutron::Port must be
3243 referenced by Neutron Network ID, a UUID value, or by the network name
3244 defined in OpenStack.
3245
3246 External Networks
3247 ^^^^^^^^^^^^^^^^^
3248
3249 When the parameter associated with the property network is referencing
3250 an “external” network, the parameter must adhere to the following naming
3251 convention in the Heat Orchestration Template
3252
3253 -  {network-role}\_net\_id for the Neutron network ID
3254
3255 -  {network-role}\_net\_name for the network name in OpenStack
3256
3257 The parameter must be declared as type: string
3258
3259 The parameter must not be enumerated in the Heat environment file.
3260
3261 *Example Parameter Definition*
3262
3263 .. code-block:: yaml
3264
3265  parameters:
3266      {network-role}_net_id:
3267          type: string
3268          description: Neutron UUID for the {network-role} network
3269      {network-role}_net_name:
3270          type: string
3271          description: Neutron name for the {network-role} network
3272
3273 *Example: One Cloud Assigned IP Address (DHCP) assigned to a network
3274 that has only one subnet*
3275
3276 In this example, the {network-role} has been defined as oam to represent
3277 an oam network and the {vm-type} has been defined as lb for load
3278 balancer. The Cloud Assigned IP Address uses the OpenStack DHCP service
3279 to assign IP addresses.
3280
3281 .. code-block:: yaml
3282
3283  parameters:
3284     oam_net_id:
3285        type: string
3286        description: Neutron UUID for the oam network
3287
3288  resources:
3289     lb_port_1:
3290        type: OS::Neutron::Port
3291        network: { get_param: oam_net_id }
3292
3293 Internal Networks
3294 ^^^^^^^^^^^^^^^^^
3295
3296 When the parameter associated with the property network is referencing
3297 an “internal” network, the parameter must adhere to the following naming
3298 convention.
3299
3300 -  int\_{network-role}\_net\_id for the Neutron network ID
3301
3302 -  int\_{network-role}\_net\_name for the network name in OpenStack
3303
3304 The parameter must be declared as type: string
3305
3306 The assumption is that internal networks are created in the base module.
3307 The Neutron Network ID will be passed as an output parameter (e.g., ONAP
3308 Base Module Output Parameter) to the incremental modules. In the
3309 incremental modules, it will be defined as input parameter.
3310
3311 *Example Parameter Definition*
3312
3313 .. code-block:: yaml
3314
3315  parameters:
3316      int_{network-role}_net_id:
3317          type: string
3318          description: Neutron UUID for the {network-role} network
3319      int_{network-role}_net_name:
3320          type: string
3321          description: Neutron name for the {network-role} network
3322
3323 Property: fixed\_ips, Map Property: subnet\_id
3324 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3325
3326 The property fixed\_ips is used to assign IPs to a port. The Map
3327 Property subnet\_id specifies the subnet the IP is assigned from.
3328
3329 The property fixed\_ips and Map Property subnet\_id must be used if a
3330 Cloud (i.e., DHCP) IP address assignment is being requested and the
3331 Cloud IP address assignment is targeted at a specific subnet when two or
3332 more subnets exist.
3333
3334 The property fixed\_ips and Map Property subnet\_id should not be used
3335 if all IP assignments are fixed, or if the Cloud IP address assignment
3336 does not target a specific subnet or there is only one subnet.
3337
3338 Note that DHCP assignment of IP addresses is also referred to as cloud
3339 assigned IP addresses.
3340
3341 Subnet of an External Networks
3342 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3343
3344 When the parameter is referencing a subnet of an “external” network, the
3345 property fixed\_ips and Map Property subnet\_id parameter must adhere to
3346 the following naming convention.
3347
3348 -  {network-role}\_subnet\_id if the subnet is an IPv4 subnet
3349
3350 -  {network-role}\_v6\_subnet\_id if the subnet is an IPv6 subnet
3351
3352 The parameter must be declared as type: string
3353
3354 The parameter must not be enumerated in the Heat environment file.
3355
3356 *Example Parameter Definition*
3357
3358 .. code-block:: yaml
3359
3360  parameters:
3361      {network-role}_subnet_id:
3362          type: string
3363          description: Neutron subnet UUID for the {network-role} network
3364
3365      {network-role}_v6_subnet_id:
3366          type: string
3367          description: Neutron subnet UUID for the {network-role} network
3368
3369 *Example: One Cloud Assigned IPv4 Address (DHCP) assigned to a network
3370 that has two or more subnets subnet:*
3371
3372 In this example, the {network-role} has been defined as oam to represent
3373 an oam network and the {vm-type} has been defined as lb for load
3374 balancer. The Cloud Assigned IP Address uses the OpenStack DHCP service
3375 to assign IP addresses.
3376
3377 .. code-block:: yaml
3378
3379  parameters:
3380     oam_net_id:
3381        type: string
3382        description: Neutron UUID for the oam network
3383
3384     oam_subnet_id:
3385        type: string
3386        description: Neutron subnet UUID for the oam network
3387
3388  resources:
3389     lb_port_1:
3390        type: OS::Neutron::Port
3391        network: { get_param: oam_net_id }
3392     fixed_ips:
3393       - subnet_id: { get_param: oam_subnet_id }
3394
3395 *Example: One Cloud Assigned IPv4 address and one Cloud Assigned IPv6
3396 address assigned to a network that has at least one IPv4 subnet and one
3397 IPv6 subnet*
3398
3399 In this example, the {network-role} has been defined as oam to represent
3400 an oam network and the {vm-type} has been defined as lb for load
3401 balancer.
3402
3403 .. code-block:: yaml
3404
3405  parameters:
3406     oam_net_id:
3407        type: string
3408        description: Neutron UUID for the oam network
3409
3410     oam_subnet_id:
3411        type: string
3412        description: Neutron subnet UUID for the oam network
3413
3414     oam_v6_subnet_id:
3415        type: string
3416        description: Neutron subnet UUID for the oam network
3417
3418  resources:
3419     lb_port_1:
3420        type: OS::Neutron::Port
3421        properties:
3422           network: { get_param: oam_net_id }
3423           fixed_ips:
3424            - subnet_id: { get_param: oam_subnet_id }
3425            - subnet_id: { get_param: oam_v6_subnet_id }
3426
3427 Internal Networks
3428 ^^^^^^^^^^^^^^^^^
3429
3430 When the parameter is referencing the subnet of an “internal” network,
3431 the property fixed\_ips and Map Property subnet\_id parameter must
3432 adhere to the following naming convention.
3433
3434 -  int\_{network-role}\_subnet\_id if the subnet is an IPv4 subnet
3435
3436 -  int\_{network-role}\_v6\_subnet\_id if the subnet is an IPv6 subnet
3437
3438 The parameter must be declared as type: string
3439
3440 The assumption is that internal networks are created in the base module.
3441 The Neutron subnet network ID will be passed as an output parameter
3442 (e.g., ONAP Base Module Output Parameter) to the incremental modules. In
3443 the incremental modules, it will be defined as input parameter.
3444
3445 *Example Parameter Definition*
3446
3447 .. code-block:: yaml
3448
3449  parameters:
3450      int_{network-role}_subnet_id:
3451         type: string
3452          description: Neutron subnet UUID for the {network-role} network
3453
3454      int_{network-role}_v6_subnet_id:
3455          type: string
3456          description: Neutron subnet UUID for the {network-role} network
3457
3458 Property: fixed\_ips, Map Property: ip\_address
3459 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3460
3461 The property fixed\_ips is used to assign IPs to a port. The Map
3462 Property ip\_address specifies the IP address to be assigned to the
3463 port.
3464
3465 The property fixed\_ips and Map Property ip\_address must be used when
3466 statically assigning one or more IP addresses to a port. This is also
3467 referred to as ONAP SDN-C IP address assignment. ONAP’s SDN-C provides
3468 the IP address assignment.
3469
3470 An IP address is assigned to a port on a VM (referenced by {vm-type})
3471 that is connected to an external network (referenced by {network-role})
3472 or internal network (referenced by int\_{network-role}).
3473
3474 When a SDN-C IP assignment is made to a port connected to an external
3475 network, the parameter name must contain {vm-type} and {network-role}.
3476
3477 When a SDN-C IP assignment is made to a port connected to an internal
3478 network, the parameter name must contain {vm-type} and
3479 int\_{network-role}.
3480
3481 IP Address Assignments on External Networks
3482 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3483
3484 When the property fixed\_ips and Map Property ip\_address is used to
3485 assign IP addresses to an external network, the parameter name is
3486 dependent on the parameter type (comma\_delimited\_list or string) and
3487 IP address type (IPv4 or IPv6).
3488
3489 When the parameter for property fixed\_ips and Map Property ip\_address
3490 is declared type: comma\_delimited\_list, the parameter must adhere to
3491 the following naming convention
3492
3493 -  {vm-type}\_{network-role}\_ips for IPv4 address
3494
3495 -  {vm-type}\_{network-role}\_v6\_ips for IPv6 address
3496
3497 Each element in the IP list should be assigned to successive instances
3498 of {vm-type} on {network-role}.
3499
3500 The parameter must not be enumerated in the Heat environment file.
3501
3502 *Example Parameter Definition*
3503
3504 .. code-block:: yaml
3505
3506  parameters:
3507
3508     {vm-type}_{network-role}_ips:
3509        type: comma_delimited_list
3510        description: Fixed IPv4 assignments for {vm-type} VMs on the {Network-role} network
3511
3512     {vm-type}_{network-role}_v6_ips:
3513        type: comma_delimited_list
3514        description: Fixed IPv6 assignments for {vm-type} VMs on the {network-role} network
3515
3516 *Example: comma\_delimited\_list parameters for IPv4 and IPv6 Address
3517 Assignments to an external network*
3518
3519 In this example, the {network-role} has been defined as oam to represent
3520 an oam network and the {vm-type} has been defined as db for database.
3521
3522 .. code-block:: yaml
3523
3524  parameters:
3525     oam_net_id:
3526        type: string
3527        description: Neutron UUID for a oam network
3528
3529     db_oam_ips:
3530        type: comma_delimited_list
3531        description: Fixed IPv4 assignments for db VMs on the oam network
3532
3533     db_oam_v6_ips:
3534        type: comma_delimited_list
3535        description: Fixed IPv6 assignments for db VMs on the oam network
3536
3537  resources:
3538     db_0_port_1:
3539        type: OS::Neutron::Port
3540        network: { get_param: oam_net_id }
3541        fixed_ips: [ { “ip_address”: {get_param: [ db_oam_ips, 0 ]}}, {“ip_address”: {get_param: [ db_oam_v6_ips, 0 ]}}]
3542
3543     db_1_port_1:
3544        type: OS::Neutron::Port
3545        properties:
3546        network: { get_param: oam_net_id }
3547        fixed_ips:
3548           - “ip_address”: {get_param: [ db_oam_ips, 1 ]}
3549           - “ip_address”: {get_param: [ db_oam_v6_ips, 1 ]}
3550
3551 When the parameter for property fixed\_ips and Map Property ip\_address
3552 is declared type: string, the parameter must adhere to the following
3553 naming convention.
3554
3555 -  {vm-type}\_{network-role}\_ip\_{index} for an IPv4 address
3556
3557 -  {vm-type}\_{network-role}\_v6\_ip\_{index} for an IPv6 address
3558
3559 The value for {index} must start at zero (0) and increment by one.
3560
3561 The parameter must not be enumerated in the Heat environment file.
3562
3563 *Example Parameter Definition*
3564
3565 .. code-block:: yaml
3566
3567  parameters:
3568     {vm-type}_{network-role}_ip_{index}:
3569        type: string
3570        description: Fixed IPv4 assignment for {vm-type} VM {index} on the{network-role} network
3571
3572     {vm-type}_{network-role}_v6_ip_{index}:
3573        type: string
3574        description: Fixed IPv6 assignment for {vm-type} VM {index} on the{network-role} network
3575
3576 *Example: string parameters for IPv4 and IPv6 Address Assignments to an external network*
3577
3578 In this example, the {network-role} has been defined as “oam” to
3579 represent an oam network and the {vm-type} has been defined as “db” for
3580 database.
3581
3582 .. code-block:: yaml
3583
3584  parameters:
3585     oam_net_id:
3586     type: string
3587     description: Neutron UUID for an OAM network
3588
3589  db_oam_ip_0:
3590     type: string
3591     description: Fixed IPv4 assignment for db VM 0 on the OAM network
3592
3593  db_oam_ip_1:
3594     type: string
3595     description: Fixed IPv4 assignment for db VM 1 on the OAM network
3596
3597  db_oam_v6_ip_0:
3598     type: string
3599     description: Fixed IPv6 assignment for db VM 0 on the OAM network
3600
3601  db_oam_v6_ip_1:
3602     type: string
3603     description: Fixed IPv6 assignment for db VM 1 on the OAM network
3604
3605  resources:
3606     db_0_port_1:
3607        type: OS::Neutron::Port
3608        properties:
3609           network: { get_param: oam_net_id }
3610           fixed_ips: [ { “ip_address”: {get_param: db_oam_ip_0}}, {“ip_address”: {get_param: db_oam_v6_ip_0 ]}}]
3611
3612     db_1_port_1:
3613        type: OS::Neutron::Port
3614        properties:
3615           network: { get_param: oam_net_id }
3616           fixed_ips:
3617              - “ip_address”: {get_param: db_oam_ip_1}}]
3618              - “ip_address”: {get_param: db_oam_v6_ip_1}}]
3619
3620 IP Address Assignment on Internal Networks
3621 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3622
3623 When the property fixed\_ips and Map Property ip\_address is used to
3624 assign IP addresses to an internal network, the parameter name is
3625 dependent on the parameter type (comma\_delimited\_list or string) and
3626 IP address type (IPv4 or IPv6).
3627
3628 When the parameter for property fixed\_ips and Map Property ip\_address
3629 is declared type: comma\_delimited\_list, the parameter must adhere to
3630 the following naming convention
3631
3632 -  {vm-type}\_int\_{network-role}\_ips for IPv4 address
3633
3634 -  {vm-type}\_int\_{network-role}\_v6\_ips for IPv6 address
3635
3636 Each element in the IP list should be assigned to successive instances
3637 of {vm-type} on {network-role}.
3638
3639 The parameter must be enumerated in the Heat environment file. Since an
3640 internal network is local to the VNF, IP addresses can be re-used at
3641 every VNF instance.
3642
3643 *Example Parameter Definition*
3644
3645 .. code-block:: yaml
3646
3647  parameters:
3648
3649     {vm-type}_int_{network-role}_ips:
3650        type: comma_delimited_list
3651        description: Fixed IPv4 assignments for {vm-type} VMs on the int_{network-role} network
3652
3653     {vm-type}_int_{network-role}_v6_ips:
3654        type: comma_delimited_list
3655        description: Fixed IPv6 assignments for {vm-type} VMs on the int_{network-role} network
3656
3657 *Example: comma\_delimited\_list parameters for IPv4 and IPv6 Address
3658 Assignments to an internal network*
3659
3660 In this example, the {network-role} has been defined as oam\_int to
3661 represent an oam network internal to the vnf. The role oam\_int was
3662 picked to differentiate from an external oam network with a
3663 {network-role} of oam. The {vm-type} has been defined as db for
3664 database.
3665
3666 .. code-block:: yaml
3667
3668  parameters:
3669     int_oam_int_net_id:
3670        type: string
3671        description: Neutron UUID for the oam internal network
3672
3673     db_int_oam_int_ips:
3674        type: comma_delimited_list
3675        description: Fixed IPv4 assignments for db VMs on the oam internal network
3676
3677     db_int_oam_int_v6_ips:
3678        type: comma_delimited_list
3679        description: Fixed IPv6 assignments for db VMs on the oam internal network
3680
3681  resources:
3682     db_0_port_1:
3683        type: OS::Neutron::Port
3684        properties:
3685        network: { get_param: int_oam_int_net_id }
3686        fixed_ips: [ { “ip_address”: {get_param: [ db_int_oam_int_ips, 0]}}, { “ip_address”: {get_param: [ db_int_oam_int_v6_ips, 0 ]}}]
3687
3688     db_1_port_1:
3689        type: OS::Neutron::Port
3690        properties:
3691        network: { get_param: int_oam_int_net_id }
3692        fixed_ips:
3693           - “ip_address”: {get_param: [ db_int_oam_int_ips, 1 ]}
3694           - “ip_address”: {get_param: [ db_int_oam_int_v6_ips, 1 ]}
3695
3696 When the parameter for property fixed\_ips and Map Property ip\_address
3697 is declared type: string, the parameter must adhere to the following
3698 naming convention.
3699
3700 -  {vm-type}\_int\_{network-role}\_ip\_{index} for an IPv4 address
3701
3702 -  {vm-type}\_int\_{network-role}\_v6\_ip\_{index} for an IPv6 address
3703
3704 The value for {index} must start at zero (0) and increment by one.
3705
3706 The parameter must be enumerated in the Heat environment file. Since an
3707 internal network is local to the VNF, IP addresses can be re-used at
3708 every VNF instance.
3709
3710 *Example Parameter Definition*
3711
3712 .. code-block:: yaml
3713
3714  parameters:
3715
3716     {vm-type}_int_{network-role}_ip_{index}:
3717        type: string
3718        description: Fixed IPv4 assignment for {vm-type} VM {index} on the{network-role} network
3719
3720     {vm-type}_int_{network-role}_v6_ip_{index}:
3721        type: string
3722        description: Fixed IPv6 assignment for {vm-type} VM {index} on the{network-role} network
3723
3724 *Example: string parameters for IPv4 and IPv6 Address Assignments to an internal network*
3725
3726 In this example, the {network-role} has been defined as oam\_int to
3727 represent an oam network internal to the vnf. The role oam\_int was
3728 picked to differentiate from an external oam network with a
3729 {network-role} of oam. The {vm-type} has been defined as db for
3730 database.
3731
3732 .. code-block:: yaml
3733
3734  parameters:
3735     int_oam_int_net_id:
3736        type: string
3737        description: Neutron UUID for an OAM internal network
3738
3739     db_oam_int_ip_0:
3740        type: string
3741        description: Fixed IPv4 assignment for db VM on the oam_int network
3742
3743     db_oam_int_ip_1:
3744        type: string
3745        description: Fixed IPv4 assignment for db VM 1 on the oam_int network
3746
3747     db_oam_int_v6_ip_0:
3748        type: string
3749        description: Fixed IPv6 assignment for db VM 0 on the oam_int network
3750
3751     db_oam_int_v6_ip_1:
3752        type: string
3753        description: Fixed IPv6 assignment for db VM 1 on the oam_int network
3754
3755  resources:
3756     db_0_port_0:
3757        type: OS::Neutron::Port
3758        properties:
3759           network: { get_param: int_oam_int_net_id }
3760           fixed_ips: [ { “ip_address”: {get_param: db_oam_int_ip_0}}, {“ip_address”: {get_param: db_oam_int_v6_ip_0 ]}}]
3761
3762     db_1_port_0:
3763        type: OS::Neutron::Port
3764        properties:
3765           network: { get_param: int_oam_int_net_id }
3766           fixed_ips:
3767              - “ip_address”: {get_param: db_oam_int_ip_1}}]
3768              - “ip_address”: {get_param: db_oam_int_v6_ip_1}}]
3769
3770 Property: allowed\_address\_pairs, Map Property: ip\_address
3771 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3772
3773 The property allowed\_address\_pairs in the resource OS::Neutron::Port
3774 allows the user to specify a mac\_address and/or ip\_address that will
3775 pass through a port regardless of subnet. This enables the use of
3776 protocols such as VRRP, which floats an IP address between two instances
3777 to enable fast data plane failover. The map property ip\_address
3778 specifies the IP address.
3779
3780 The allowed\_address\_pairs is an optional property. It is not required.
3781
3782 An ONAP Heat Orchestration Template allows the assignment of one IPv4
3783 address allowed\_address\_pairs and/or one IPv6 address to a {vm-type}
3784 and {network-role}/int\_{network-role} combination.
3785
3786 An ONAP Heat Orchestration Template allows the assignment of one IPv6
3787 address allowed\_address\_pairs and/or one IPv6 address to a {vm-type}
3788 and {network-role}/int\_{network-role} combination.
3789
3790 Note that the management of these IP addresses (i.e. transferring
3791 ownership between active and standby VMs) is the responsibility of the
3792 application itself.
3793
3794 Note that these parameters are **not** intended to represent Neutron
3795 “Floating IP” resources, for which OpenStack manages a pool of public IP
3796 addresses that are mapped to specific VM ports. In that case, the
3797 individual VMs are not even aware of the public IPs, and all assignment
3798 of public IPs to VMs is via OpenStack commands. ONAP does not support
3799 Neutron-style Floating IPs.
3800
3801 External Networks
3802 ^^^^^^^^^^^^^^^^^
3803
3804 When the parameter is referencing an “external” network, the property
3805 allowed\_address\_pairs and Map Property ip\_address parameter must
3806 adhere to the following naming convention.
3807
3808 -  {vm-type}\_{network-role}\_floating\_ip for an IPv4 address
3809
3810 -  {vm-type}\_{network-role}\_floating\_v6\_ip for an IPv6 address
3811
3812 The parameter must be declared as type: string
3813
3814 The parameter must not be enumerated in the Heat environment file.
3815
3816 *Example Parameter Definition*
3817
3818 .. code-block:: yaml
3819
3820  parameters:
3821
3822     {vm-type}_{network-role}_floating_ip:
3823        type: string
3824        description: VIP for {vm-type} VMs on the {network-role} network
3825
3826     {vm-type}_{network-role}_floating_v6_ip:
3827        type: string
3828        description: VIP for {vm-type} VMs on the {network-role} network
3829
3830 *Example:*
3831
3832 In this example, the {network-role} has been defined as oam to represent
3833 an oam network and the {vm-type} has been defined as db for database.
3834
3835 .. code-block:: yaml
3836
3837  parameters:
3838     oam_net_id:
3839        type: string
3840        description: Neutron UUID for the oam network
3841
3842     db_oam_ips:
3843        type: comma_delimited_list
3844        description: Fixed IPs for db VMs on the oam network
3845
3846     db_oam_floating_ip:
3847        type: string
3848        description: VIP IP for db VMs on the oam network
3849
3850  resources:
3851     db_0_port_0:
3852        type: OS::Neutron::Port
3853        properties:
3854           network: { get_param: oam_net_id }
3855           fixed_ips: [ { “ip_address”: {get_param: [db_oam_ips,0] }}]
3856           allowed_address_pairs: [ { “ip_address”: {get_param: db_oam_floating_ip}}]
3857
3858     db_1_port_0:
3859        type: OS::Neutron::Port
3860        properties:
3861           network: { get_param: oam_net_id }
3862           fixed_ips: [ { “ip_address”: {get_param: [db_oam_ips,1] }}]
3863           allowed_address_pairs: [ { “ip_address”: {get_param: db_oam_floating_ip}}]
3864
3865 Internal Networks
3866 ^^^^^^^^^^^^^^^^^
3867
3868 When the parameter is referencing an “internal” network, the property
3869 allowed\_address\_pairs and Map Property ip\_address parameter must
3870 adhere to the following naming convention.
3871
3872 -  {vm-type}\_int\_{network-role}\_floating\_ip for an IPv4 address
3873
3874 -  {vm-type}\_int\_{network-role}\_floating\_v6\_ip for an IPv6 address
3875
3876 The parameter must be declared as type: string
3877
3878 The parameter must be enumerated in the Heat environment file.
3879
3880 *Example Parameter Definition*
3881
3882 .. code-block:: yaml
3883
3884  parameters:
3885
3886     {vm-type}_int_{network-role}_floating_ip:
3887        type: string
3888        description: VIP for {vm-type} VMs on the int_{network-role} network
3889
3890     {vm-type}_int_{network-role}_floating_v6_ip:
3891        type: string
3892        description: VIP for {vm-type} VMs on the int_{network-role} network
3893
3894 Multiple allowed\_address\_pairs for a {vm-type} / {network-role} combination
3895 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3896
3897 The parameter {vm-type}\_{network-role}\_floating\_ip provides only one
3898 allowed address pair IPv4 address per {vm-type} and {network-role} pair.
3899
3900 The parameter {vm-type}\_{network-role}\_floating\_v6\_ip provides only
3901 one allowed address pair IPv6 address per {vm-type} and {network-role}
3902 pair.
3903
3904 If there is a need for multiple allowed address pair IPs for a given
3905 {vm-type} and {network-role} combination within a VNF, then the
3906 parameter names defined for the property fixed\_ips and Map Property
3907 ip\_address should be used with the allowed\_address\_pairs property.
3908 The examples below illustrate this.
3909
3910 *Example: A VNF has four load balancers. Each pair has a unique VIP.*
3911
3912 In this example, there are two administrative VM pairs. Each pair has
3913 one VIP. The {network-role} has been defined as oam to represent an oam
3914 network and the {vm-type} has been defined as admin for an
3915 administrative VM.
3916
3917 Pair 1: Resources admin\_0\_port\_0 and admin\_1\_port\_0 share a unique
3918 VIP, [admin\_oam\_ips,2]
3919
3920 Pair 2: Resources admin\_2\_port\_0 and admin\_3\_port\_0 share a unique
3921 VIP, [admin\_oam\_ips,5]
3922
3923 .. code-block:: yaml
3924
3925  parameters:
3926     oam_net_id:
3927        type: string
3928        description: Neutron UUID for the oam network
3929     admin_oam_ips:
3930        type: comma_delimited_list
3931        description: Fixed IP assignments for admin VMs on the oam network
3932
3933  resources:
3934
3935     admin_0_port_0:
3936        type: OS::Neutron::Port
3937        properties:
3938           network: { get_param: oam_net_id }
3939           fixed_ips: [ { “ip_address”: {get_param: [admin_oam_ips,0] }}]
3940           allowed_address_pairs: [{ “ip_address”: {get_param: [admin_oam_ips,2] }}]
3941
3942     admin_1_port_0:
3943        type: OS::Neutron::Port
3944        properties:
3945           network: { get_param: oam_net_id }
3946           fixed_ips: [ { “ip_address”: {get_param: [admin_oam_ips,1] }}]
3947           allowed_address_pairs: [{ “ip_address”: {get_param:  [admin_oam_ips,2] }}]
3948
3949     admin_2_port_0:
3950        type: OS::Neutron::Port
3951        properties:
3952           network: { get_param: oam_net_id }
3953           fixed_ips: [ { “ip_address”: {get_param: [admin_oam_ips,3] }}]
3954           allowed_address_pairs: [{ “ip_address”: {get_param: [admin_oam_ips,5] }}]
3955
3956     admin_3_port_0:
3957        type: OS::Neutron::Port
3958        properties:
3959           network: { get_param: oam_net_id }
3960           fixed_ips: [ { “ip_address”: {get_param: [admin_oam_ips,4] }}]
3961           allowed_address_pairs: [{ “ip_address”: {get_param:  [admin_oam_ips,5] }}]
3962
3963 *Example: A VNF has two load balancers. The pair of load balancers share
3964 two VIPs.*
3965
3966 In this example, there is one load balancer pairs. The pair has two
3967 VIPs. The {network-role} has been defined as oam to represent an oam
3968 network and the {vm-type} has been defined as lb for a load balancer VM.
3969
3970 .. code-block:: yaml
3971
3972  resources:
3973     lb_0_port_0:
3974        type: OS::Neutron::Port
3975        properties:
3976           network: { get_param: oam_net_id }
3977           fixed_ips: [ { “ip_address”: {get_param: [lb_oam_ips,0] }}]
3978           allowed_address_pairs: [{ "ip_address": {get_param: [lb_oam_ips,2]}, {get_param: [lb_oam_ips,3] }}]
3979
3980     lb_1_port_0:
3981        type: OS::Neutron::Port
3982        properties:
3983           network: { get_param: oam_net_id }
3984           fixed_ips: [ { “ip_address”: {get_param: [lb_oam_ips,1] }}]
3985           allowed_address_pairs: [{ "ip_address": {get_param: [lb_oam_ips,2]}, {get_param: [lb_oam_ips,3] }}]
3986
3987 As a general rule, provide the fixed IPs for the VMs indexed first in
3988 the CDL and then the VIPs as shown in the examples above.
3989
3990 ONAP SDN-C Assignment of allowed\_address\_pair IP Addresses
3991 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3992
3993 The following items must be taken into consideration when designing Heat
3994 Orchestration Templates that expect ONAP’s SDN-C to assign
3995 allowed\_address\_pair IP addresses via automation.
3996
3997 The VMs must be of the same {vm-type}.
3998
3999 The VMs must be created in the same module (base or incremental).
4000
4001 Resource Property “name”
4002 ------------------------
4003
4004 The parameter naming convention of the property name for the resource
4005 OS::Nova::Server has been defined in `Resource:  OS::Nova::Server – Metadata Parameters`_.
4006
4007 This section provides the requirements how the property name for non
4008 OS::Nova::Server resources must be defined when the property is used.
4009 Not all resources require the property name (e.g., it is optional) and
4010 some resources do not support the property.
4011
4012 When the property name for a non OS::Nova::Server resources is defined
4013 in a Heat Orchestration Template, the intrinsic function str\_replace
4014 must be used in conjunction with the ONAP supplied metadata parameter
4015 vnf\_name to generate a unique value. This prevents the enumeration of a
4016 unique value for the property name in a per instance environment file.
4017
4018 Note that
4019
4020 -  In most cases, only the use of the metadata value vnf\_name is
4021    required to create a unique property name
4022
4023 -  the Heat Orchestration Template pseudo parameter 'OS::stack\_name’
4024    may also be used in the str\_replace construct to generate a unique
4025    name when the vnf\_name does not provide uniqueness
4026
4027 *Example: Property* name *for resource* OS::Neutron::SecurityGroup
4028
4029 .. code-block:: yaml
4030
4031  resources:
4032    DNS_SECURITY_GROUP:
4033      type: OS::Neutron::SecurityGroup
4034      properties:
4035        description: vDNS security group
4036        name:
4037          str_replace:
4038            template: VNF_NAME_sec_grp_DNS
4039            params:
4040              VNF_NAME: {get_param: vnf_name}
4041        rules: [. . . . .
4042               ]
4043
4044 *Example: Property name for resource* OS::Cinder::Volume
4045
4046 .. code-block:: yaml
4047
4048  resources:
4049    DNS_Cinder_Volume:
4050      type: OS::Cinder::Volume
4051      properties:
4052        description: Cinder Volume
4053        name:
4054          str_replace:
4055            template: VNF_NAME_STACK_NAME_dns_volume
4056            params:
4057              VNF_NAME: {get_param: vnf_name}
4058              STACK_NAME: { get_param: 'OS::stack_name' }
4059        . . . .
4060
4061 Contrail Issue with Values for the Property Name
4062 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4063
4064 The Contrail GUI has a limitation displaying special characters. The
4065 issue is documented in
4066 https://bugs.launchpad.net/juniperopenstack/+bug/1590710. It is
4067 recommended that special characters be avoided. However, if special
4068 characters must be used, note that for the following resources:
4069
4070 -  Virtual Machine
4071
4072 -  Virtual Network
4073
4074 -  Port
4075
4076 -  Security Group
4077
4078 -  Policies
4079
4080 -  IPAM Creation
4081
4082 the only special characters supported are:
4083
4084 - “ ! $ ‘ ( ) = ~ ^ \| @ \` { } [ ] > , . \_
4085
4086 ONAP Output Parameter Names
4087 ---------------------------
4088
4089 ONAP defines three types of Output Parameters as detailed in `Output Parameters`_.
4090
4091 ONAP Base Module Output Parameters:
4092 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4093
4094 ONAP Base Module Output Parameters do not have an explicit naming
4095 convention. The parameter name must contain {vm-type} and {network-role}
4096 when appropriate.
4097
4098 ONAP Volume Template Output Parameters:
4099 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4100
4101 ONAP Base Module Output Parameters do not have an explicit naming
4102 convention. The parameter name must contain {vm-type} when appropriate.
4103
4104 Predefined Output Parameters
4105 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4106
4107 ONAP currently defines one predefined output parameter the OAM
4108 Management IP Addresses.
4109
4110 OAM Management IP Addresses
4111 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
4112
4113 A VNF may have a management interface for application controllers to
4114 interact with and configure the VNF. Typically, this will be via a
4115 specific VM that performs a VNF administration function. The IP address
4116 of this interface must be captured and inventoried by ONAP. The IP
4117 address might be a VIP if the VNF contains an HA pair of management VMs,
4118 or may be a single IP address assigned to one VM.
4119
4120 The Heat template may define either (or both) of the following Output
4121 parameters to identify the management IP address.
4122
4123 -  oam\_management\_v4\_address
4124
4125 -  oam\_management\_v6\_address
4126
4127 *Notes*:
4128
4129 -  The use of this output parameters are optional.
4130
4131 -  The Management IP Address should be defined only once per VNF, so it
4132    must only appear in one Module template
4133
4134 -  If a fixed IP for the admin VM is passed as an input parameter, it
4135    may be echoed in the output parameters. In this case, a IPv4 and/or
4136    IPv6 parameter must be defined in the parameter section of the YAML
4137    Heat template. The parameter maybe named oam\_management\_v4\_address
4138    and/or oam\_management\_v6\_address or may be named differently.
4139
4140 -  If the IP for the admin VM is obtained via DHCP, it may be obtained
4141    from the resource attributes. In this case,
4142    oam\_management\_v4\_address and/or oam\_management\_v6\_address must
4143    not be defined in the parameter section of the YAML Heat template.
4144
4145 *Example: SDN-C Assigned IP Address echoed as*
4146 oam\_management\_v4\_address
4147
4148 .. code-block:: yaml
4149
4150  parameters:
4151     admin_oam_ip_0:
4152        type: string
4153        description: Fixed IPv4 assignment for admin VM 0 on the OAM network
4154     . . .
4155
4156  resources:
4157     admin_oam_net_0_port:
4158        type: OS::Neutron::Port
4159        properties:
4160           name:
4161              str_replace:
4162                 template: VNF_NAME_admin_oam_net_0_port
4163                 params:
4164                    VNF_NAME: {get_param: vnf_name}
4165           network: { get_param: oam_net_id }
4166           fixed_ips: [{ "ip_address": { get_param: admin_oam_ip_0 }}]
4167           security_groups: [{ get_param: security_group }]
4168
4169     admin_server:
4170        type: OS::Nova::Server
4171        properties:
4172           name: { get_param: admin_names }
4173           image: { get_param: admin_image_name }
4174           flavor: { get_param: admin_flavor_name }
4175           availability_zone: { get_param: availability_zone_0 }
4176           networks:
4177              - port: { get_resource: admin_oam_net_0_port }
4178           metadata:
4179              vnf_id: { get_param: vnf_id }
4180              vf_module_id: { get_param: vf_module_id }
4181              vnf_name: {get_param: vnf_name }
4182     Outputs:
4183        oam_management_v4_address:
4184        value: {get_param: admin_oam_ip_0 }
4185
4186 *Example: Cloud Assigned IP Address output as*
4187 oam\_management\_v4\_address
4188
4189 .. code-block:: yaml
4190
4191  parameters:
4192     . . .
4193  resources:
4194    admin_oam_net_0_port:
4195      type: OS::Neutron::Port
4196      properties:
4197        name:
4198          str_replace:
4199            template: VNF_NAME_admin_oam_net_0_port
4200            params:
4201              VNF_NAME: {get_param: vnf_name}
4202        network: { get_param: oam_net_id }
4203        security_groups: [{ get_param: security_group }]
4204
4205    admin_server:
4206      type: OS::Nova::Server
4207      properties:
4208        name: { get_param: admin_names }
4209        image: { get_param: admin_image_name }
4210        flavor: { get_param: admin_flavor_name }
4211        availability_zone: { get_param: availability_zone_0 }
4212        networks:
4213          - port: { get_resource: admin_oam_net_0_port }
4214        metadata:
4215          vnf_id: { get_param: vnf_id }
4216          vf_module_id: { get_param: vf_module_id }
4217          vnf_name: {get_param: vnf_name }
4218
4219  Outputs:
4220    oam_management_v4_address:
4221    value: {get_attr: [admin_server, networks, {get_param: oam_net_id}, 0] }
4222
4223 Contrail Resource Parameters
4224 ----------------------------
4225
4226 ONAP requires the parameter names of certain Contrail Resources to
4227 follow specific naming conventions. This section provides these
4228 requirements.
4229
4230 Contrail Network Parameters
4231 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4232
4233 Contrail based resources may require references to a Contrail network
4234 using the network FQDN.
4235
4236 External Networks
4237 ^^^^^^^^^^^^^^^^^
4238
4239 When the parameter associated with the Contrail Network is referencing
4240 an “external” network, the parameter must adhere to the following naming
4241 convention in the Heat Orchestration Template
4242
4243 -  {network-role}\_net\_fqdn
4244
4245 The parameter must be declared as type: string
4246
4247 The parameter must not be enumerated in the Heat environment file.
4248
4249 *Example: Parameter declaration*
4250
4251 .. code-block:: yaml
4252
4253  parameters:
4254     {network-role}_net_fqdn:
4255        type: string
4256        description: Contrail FQDN for the {network-role} network
4257
4258 *Example: Contrail Resource OS::ContrailV2::VirtualMachineInterface
4259 Reference to a Network FQDN.*
4260
4261 In this example, the {network-role} has been defined as oam to represent
4262 an oam network and the {vm-type} has been defined as fw for firewall.
4263 The Contrail resource OS::ContrailV2::VirtualMachineInterface property
4264 virtual\_network\_refs references a contrail network FQDN.
4265
4266 .. code-block:: yaml
4267
4268  FW_OAM_VMI:
4269    type: OS::ContrailV2::VirtualMachineInterface
4270    properties:
4271      name:
4272        str_replace:
4273          template: VM_NAME_virtual_machine_interface_1
4274          params:
4275            VM_NAME: { get_param: fw_name_0 }
4276      virtual_machine_interface_properties:
4277        virtual_machine_interface_properties_service_interface_type: { get_param: oam_protected_interface_type }
4278      virtual_network_refs:
4279        - get_param: oam_net_fqdn
4280      security_group_refs:
4281        - get_param: fw_sec_grp_id
4282
4283 Interface Route Table Prefixes for Contrail InterfaceRoute Table
4284 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4285
4286 The parameter associated with the resource
4287 OS::ContrailV2::InterfaceRouteTable property
4288 interface\_route\_table\_routes, map property
4289 interface\_route\_table\_routes\_route\_prefix is an ONAP Orchestration
4290 Parameter.
4291
4292 The parameters must be named {vm-type}\_{network-role}\_route\_prefixes
4293 in the Heat Orchestration Template.
4294
4295 The parameter must be declared as type: json
4296
4297 The parameter supports IP addresses in the format:
4298
4299 1. Host IP Address (e.g., 10.10.10.10)
4300
4301 2. CIDR Notation format (e.g., 10.0.0.0/28)
4302
4303 The parameter must not be enumerated in the Heat environment file.
4304
4305 *Example Parameter Definition*
4306
4307 .. code-block:: yaml
4308
4309  parameters:
4310     {vm-type}_{network-role}_route_prefixes:
4311        type: json
4312        description: JSON list of Contrail Interface Route Table route prefixes
4313
4314 *Example:*
4315
4316 .. code-block:: yaml
4317
4318  parameters:
4319    vnf_name:
4320      type: string
4321      description: Unique name for this VF instance
4322    fw_int_fw_route_prefixes:
4323      type: json
4324      description: prefix for the ServiceInstance InterfaceRouteTable
4325    int_fw_dns_trusted_interface_type:
4326      type: string
4327      description: service_interface_type for ServiceInstance
4328
4329  <resource name>:
4330    type: OS::ContrailV2::InterfaceRouteTable
4331    depends_on: [*resource name of* *OS::ContrailV2::ServiceInstance*]
4332    properties:
4333      name:
4334        str_replace:
4335          template: VNF_NAME_interface_route_table
4336          params:
4337            VNF_NAME: { get_param: vnf_name }
4338      interface_route_table_routes:
4339        interface_route_table_routes_route: { get_param: fw_int_fw_route_prefixes }
4340      service_instance_refs:
4341        - get_resource: < *resource name of* *OS::ContrailV2::ServiceInstance* >
4342      service_instance_refs_data:
4343        - service_instance_refs_data_interface_type: { get_param: int_fw_interface_type }
4344
4345 Parameter Names in Contrail Resources
4346 -------------------------------------
4347
4348 Contrail Heat resource properties will use, when appropriate, the same
4349 naming convention as OpenStack Heat resources. For example, the resource
4350 OS::ContrailV2::InstanceIp has two properties that the parameter naming
4351 convention is identical to properties in OS::Neutron::Port.
4352
4353 *Example: Contrail Resource OS::ContrailV2::InstanceIp, Property
4354 instance\_ip\_address*
4355
4356 The property instance\_ip\_address uses the same parameter naming
4357 convention as the property fixed\_ips and Map Property ip\_address in
4358 OS::Neutron::Port. The resource is assigning an ONAP SDN-C Assigned IP
4359 Address. The {network-role} has been defined as oam\_protected to
4360 represent an oam protected network and the {vm-type} has been defined as
4361 fw for firewall.
4362
4363 .. code-block:: yaml
4364
4365  CMD_FW_OAM_PROTECTED_RII:
4366    type: OS::ContrailV2::InstanceIp
4367    depends_on:
4368      - FW_OAM_PROTECTED_RVMI
4369    properties:
4370      virtual_machine_interface_refs:
4371        - get_resource: FW_OAM_PROTECTED_RVMI
4372      virtual_network_refs:
4373        - get_param: oam_protected_net_fqdn
4374      instance_ip_address: { get_param: [fw_oam_protected_ips, get_param: index ] }
4375
4376 *Example: Contrail Resource OS::ContrailV2::InstanceIp, Property
4377 subnet\_uuid*
4378
4379 The property instance\_ip\_address uses the same parameter naming
4380 convention as the property fixed\_ips and Map Property subnet\_id in
4381 OS::Neutron::Port. The resource is assigning a Cloud Assigned IP
4382 Address. The {network-role} has been defined as “oam\_protected” to
4383 represent an oam protected network and the {vm-type} has been defined as
4384 “fw” for firewall.
4385
4386 .. code-block:: yaml
4387
4388  CMD_FW_SGI_PROTECTED_RII:
4389    type: OS::ContrailV2::InstanceIp
4390    depends_on:
4391      - FW_OAM_PROTECTED_RVMI
4392    properties:
4393      virtual_machine_interface_refs:
4394        - get_resource: FW_OAM_PROTECTED_RVMI
4395      virtual_network_refs:
4396        - get_param: oam_protected_net_fqdn
4397      subnet_uuid: { get_param: oam_protected_subnet_id }
4398
4399 Cinder Volume Templates
4400 -----------------------
4401
4402 ONAP supports the independent deployment of a Cinder volume via separate
4403 Heat Orchestration Templates, the Cinder Volume module. This allows the
4404 volume to persist after VNF deletion so that they can be reused on
4405 another instance (e.g., during a failover activity).
4406
4407 A Base Module or Incremental Module may have a corresponding volume
4408 module. Use of separate volume modules is optional. A Cinder volume may
4409 be embedded within the Base Module or Incremental Module if persistence
4410 is not required.
4411
4412 If a VNF Base Module or Incremental Module has an independent volume
4413 module, the scope of volume templates must be 1:1 with Base module or
4414 Incremental module. A single volume module must create only the volumes
4415 required by a single Incremental module or Base module.
4416
4417 The following rules apply to independent volume Heat templates:
4418
4419 -  Cinder volumes must be created in a separate Heat Orchestration
4420    Template from the Base Module or Incremental Module.
4421
4422    -  A single Cinder volume module must include all Cinder volumes
4423       needed by the Base/Incremental module.
4424
4425    -  The volume template must define “outputs” for each Cinder volume
4426       resource universally unique identifier (UUID) (i.e. ONAP Volume
4427       Template Output Parameters).
4428
4429 -  The VNF Incremental Module or Base Module must define input
4430    parameters that match each Volume output parameter (i.e., ONAP Volume
4431    Template Output Parameters).
4432
4433    -  ONAP will supply the volume template outputs automatically to the
4434       bases/incremental template input parameters.
4435
4436 -  Volume modules may utilize nested Heat templates.
4437
4438 *Examples: Volume Template*
4439
4440 A VNF has a Cinder volume module, named incremental\_volume.yaml, that
4441 creates an independent Cinder volume for a VM in the module
4442 incremental.yaml. The incremental\_volume.yaml defines a parameter in
4443 the output section, lb\_volume\_id\_0 which is the UUID of the cinder
4444 volume. lb\_volume\_id\_0 is defined as a parameter in incremental.yaml.
4445 ONAP captures the UUID value of lb\_volume\_id\_0 from the volume module
4446 output statement and provides the value to the incremental module.
4447
4448 Note that the example below is not a complete Heat Orchestration
4449 Template. The {vm-type} has been defined as “lb” for load balancer
4450
4451 incremental\_volume.yaml
4452
4453 .. code-block:: yaml
4454
4455  parameters:
4456     vnf_name:
4457        type: string
4458     lb_volume_size_0:
4459        type: number
4460     ...
4461
4462  resources:
4463     dns_volume_0:
4464        type: OS::Cinder::Volume
4465        properties:
4466           name:
4467              str_replace:
4468                 template: VNF_NAME_volume_0
4469                 params:
4470                    VNF_NAME: { get_param: vnf_name }
4471           size: {get_param: dns_volume_size_0}
4472     ...
4473
4474  outputs:
4475     lb_volume_id_0:
4476        value: {get_resource: dns_volume_0}
4477     ...
4478
4479
4480 incremental.yaml
4481
4482 .. code-block:: yaml
4483
4484  parameters:
4485     lb_name_0:
4486        type: string
4487     lb_volume_id_0:
4488        type: string
4489     ...
4490
4491  resources:
4492     lb_0:
4493        type: OS::Nova::Server
4494        properties:
4495           name: {get_param: dns_name_0}
4496           networks:
4497           ...
4498
4499     lb_0_volume_attach:
4500        type: OS::Cinder::VolumeAttachment
4501        properties:
4502           instance_uuid: { get_resource: lb_0 }
4503           volume_id: { get_param: lb_volume_id_0 }
4504
4505 ONAP Support of Environment Files
4506 ---------------------------------
4507
4508 The use of an environment file in OpenStack is optional. In ONAP, it is
4509 mandatory. A Heat Orchestration Template uploaded to ONAP must have a
4510 corresponding environment file, even if no parameters are required to be
4511 enumerated.
4512
4513 (Note that ONAP, the open source version of ONAP, does not
4514 programmatically enforce the use of an environment file.)
4515
4516 A Base Module Heat Orchestration Template must have a corresponding
4517 environment file.
4518
4519 An Incremental Module Heat Orchestration Template must have a
4520 corresponding environment file.
4521
4522 A Cinder Volume Module Heat Orchestration Template must have a
4523 corresponding environment file.
4524
4525 A nested heat template must not have an environment file; OpenStack does
4526 not support it.
4527
4528 The environment file must contain parameter values for the ONAP
4529 Orchestration Constants and VNF Orchestration Constants. These
4530 parameters are identical across all instances of a VNF type, and
4531 expected to change infrequently. The ONAP Orchestration Constants are
4532 associated with OS::Nova::Server image and flavor properties (See
4533 `Property: image`_ and `Property: flavor`_). Examples of VNF Orchestration Constants are the networking
4534 parameters associated with an internal network (e.g., private IP ranges)
4535 and Cinder volume sizes.
4536
4537 The environment file must not contain parameter values for parameters
4538 that are instance specific (ONAP Orchestration Parameters, VNF
4539 Orchestration Parameters). These parameters are supplied to the Heat by
4540 ONAP at orchestration time.
4541
4542 SDC Treatment of Environment Files
4543 ----------------------------------
4544
4545 Parameter values enumerated in the environment file are used by SDC as
4546 the default value. However, the SDC user may use the SDC GUI to
4547 overwrite the default values in the environment file.
4548
4549 SDC generates a new environment file for distribution to MSO based on
4550 the uploaded environment file and the user provided GUI updates. The
4551 user uploaded environment file is discarded when the new file is
4552 created. Note that if the user did not change any values via GUI
4553 updates, the SDC generated environment file will contain the same values
4554 as the uploaded file.
4555
4556 Use of Environment Files when using OpenStack “heat stack-create” CLI
4557 ---------------------------------------------------------------------
4558
4559 When ONAP is instantiating the Heat Orchestration Template, certain
4560 parameter must not be enumerated in the environment file. This document
4561 provides the details of what parameters should not be enumerated.
4562
4563 If the Heat Orchestration Template is to be instantiated from the
4564 OpenStack Command Line Interface (CLI) using the command “heat
4565 stack-create”, all parameters must be enumerated in the environment
4566 file.
4567
4568 Heat Template Constructs
4569 ------------------------
4570
4571 Nested Heat Templates
4572 ---------------------
4573
4574 ONAP supports nested Heat templates per the OpenStack specifications.
4575 Nested templates may be suitable for larger VNFs that contain many
4576 repeated instances of the same VM type(s). A common usage pattern is to
4577 create a nested template for each {vm-type} along with its supporting
4578 resources. The VNF module may then reference these component templates
4579 either statically by repeated definition or dynamically by using the
4580 resource OS::Heat::ResourceGroup.
4581
4582 Nested Heat Template Requirements
4583 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4584
4585 ONAP supports nested Heat Orchestration Templates. A Base Module,
4586 Incremental Module, and Cinder Volume Module may use nested heat.
4587
4588 A Heat Orchestration Template may reference the nested heat statically
4589 by repeated definition.
4590
4591 A Heat Orchestration Template may reference the nested heat dynamically
4592 using the resource OS::Heat::ResourceGroup.
4593
4594 A Heat Orchestration template must have no more than three levels of
4595 nesting. ONAP supports a maximum of three levels.
4596
4597 Nested heat templates must be referenced by file name. The use of
4598 resource\_registry in the environment file is not supported and must not
4599 be used.
4600
4601 A nested heat yaml file must have a unique file names within the scope
4602 of the VNF
4603
4604 ONAP does not support a directory hierarchy for nested templates. All
4605 templates must be in a single, flat directory (per VNF)
4606
4607 A nested heat template may be used by any module within a given VNF.
4608
4609 Note that:
4610
4611 -  Constrains must not be defined for any parameter enumerated in a
4612    nested heat template.
4613
4614 -  All parameters defined in nested heat must be passed in as properties
4615    of the resource calling the nested yaml file.
4616
4617 -  When OS::Nova::Server metadata parameters are past into a nested heat
4618    template, the parameter names must not change
4619
4620 -  With nested templates, outputs are required to expose any resource
4621    properties of the child templates to the parent template. Those would
4622    not explicitly be declared as parameters but simply referenced as
4623    get\_attribute targets against the “parent” resource.
4624
4625 Nested Heat Template Example: Static
4626 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4627
4628 incremental.yaml
4629
4630 .. code-block:: yaml
4631
4632  Resources:
4633    dns_server_0:
4634      type: nested.yaml
4635      properties:
4636        dns_image_name: { get_param: dns_image_name }
4637        dns_flavor_name: { get_param: dns_flavor_name }
4638        availability_zone: { get_param: availability_zone_0 }
4639        security_group: { get_param: DNS_shared_sec_grp_id }
4640        oam_net_id: { get_param: oam_protected_net_id }
4641        dns_oam_ip: { get_param: dns_oam_ip_0 }
4642        dns_name: { get_param: dns_name_0 }
4643        vnf_name: { get_param: vnf_name }
4644        vnf_id: { get_param: vnf_id }
4645        vf_module_id: {get_param: vf_module_id}
4646
4647  dns_server_1:
4648    type: nested.yaml
4649    properties:
4650      dns_image_name: { get_param: dns_image_name }
4651      dns_flavor_name: { get_param: dns_flavor_name }
4652      availability_zone: { get_param: availability_zone_1 }
4653      security_group: { get_param: DNS_shared_sec_grp_id }
4654      oam_net_id: { get_param: oam_protected_net_id }
4655      dns_oam_ip: { get_param: dns_oam_ip_1 }
4656      dns_name: { get_param: dns_name_1 }
4657      vnf_name: { get_param: vnf_name }
4658      vnf_id: { get_param: vnf_id }
4659      vf_module_id: {get_param: vf_module_id}
4660
4661 nested.yaml
4662
4663 .. code-block:: yaml
4664
4665  dns_oam_0_port:
4666    type: OS::Neutron::Port
4667    properties:
4668      name:
4669        str_replace:
4670          template: VNF_NAME_dns_oam_port
4671          params:
4672            VNF_NAME: {get_param: vnf_name}
4673      network: { get_param: oam_net_id }
4674      fixed_ips: [{ "ip_address": { get_param: dns_oam_ip }}]
4675      security_groups: [{ get_param: security_group }]
4676
4677  dns_servers:
4678    type: OS::Nova::Server
4679    properties:
4680      name: { get_param: dns_names }
4681      image: { get_param: dns_image_name }
4682      flavor: { get_param: dns_flavor_name }
4683      availability_zone: { get_param: availability_zone }
4684      networks:
4685        - port: { get_resource: dns_oam_0_port }
4686      metadata:
4687        vnf_id: { get_param: vnf_id }
4688        vf_module_id: { get_param: vf_module_id }
4689        vnf_name {get_param: vnf_name }
4690
4691 Use of Heat ResourceGroup
4692 ~~~~~~~~~~~~~~~~~~~~~~~~~
4693
4694 The OS::Heat::ResourceGroup is a useful Heat element for creating
4695 multiple instances of a given resource or collection of resources.
4696 Typically it is used with a nested Heat template, to create, for
4697 example, a set of identical OS::Nova::Server resources plus their
4698 related OS::Neutron::Port resources via a single resource in a master
4699 template.
4700
4701 ResourceGroup may be used in ONAP to simplify the structure of a Heat
4702 template that creates multiple instances of the same VM type.
4703
4704 However, there are important caveats to be aware of:
4705
4706 ResourceGroup does not deal with structured parameters
4707 (comma-delimited-list and json) as one might typically expect. In
4708 particular, when using a list-based parameter, where each list element
4709 corresponds to one instance of the ResourceGroup, it is not possible to
4710 use the intrinsic “loop variable” %index% in the ResourceGroup
4711 definition.
4712
4713 For instance, the following is **not** valid Heat for ResourceGroup:
4714
4715 .. code-block:: yaml
4716
4717  type: OS::Heat::ResourceGroup
4718    resource_def:
4719      type: my_nested_vm_template.yaml
4720      properties:
4721        name: {get_param: [vm_name_list, %index%]}
4722
4723 Although this appears to use the nth entry of the vm\_name\_list list
4724 for the nth element of the ResourceGroup, it will in fact result in a
4725 Heat exception. When parameters are provided as a list (one for each
4726 element of a ResourceGroup), you must pass the complete parameter to the
4727 nested template along with the current index as separate parameters.
4728
4729 Below is an example of an **acceptable** Heat Syntax for a
4730 ResourceGroup:
4731
4732 .. code-block:: yaml
4733
4734  type: OS::Heat::ResourceGroup
4735    resource_def:
4736      type: my_nested_vm_template.yaml
4737      properties:
4738        names: {get_param: vm_name_list}
4739        index: %index%
4740
4741 You can then reference within the nested template as:
4742
4743 { get\_param: [names, {get\_param: index} ] }
4744
4745 ResourceGroup Property count
4746 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4747
4748 ONAP requires that the OS::Heat::ResourceGroup property count be defined
4749 (even if the value is one) and that the value must be enumerated in the
4750 environment file. This is required for ONAP to build the TOSCA model for
4751 the VNF.
4752
4753 .. code-block:: yaml
4754
4755  type: OS::Heat::ResourceGroup
4756    properties:
4757    count: { get_param: count }
4758    index_var: index
4759      resource_def:
4760        type: my_nested_vm_template.yaml
4761        properties:
4762          names: {get_param: vm_name_list}
4763      index: index
4764
4765 Availability Zone and ResourceGroups
4766 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4767
4768 The resource OS::Heat::ResourceGroup and the property availability\_zone
4769 has been an “issue” with a few VNFs since ONAP only supports
4770 availability\_zone as a string parameter and not a
4771 comma\_delimited\_list. This makes it difficult to use a ResourceGroup
4772 to create Virtual Machines in more than one availability zone.
4773
4774 There are numerous solutions to this issue. Below are two suggested
4775 usage patterns.
4776
4777 **Option 1:** create a CDL in the OS::Heat::ResourceGroup. In the
4778 resource type: OS::Heat::ResourceGroup, create a comma\_delimited\_list
4779 availability\_zones by using the intrinsic function list\_join.
4780
4781 .. code-block:: yaml
4782
4783  <resource name>:
4784   type: OS::Heat::ResourceGroup
4785      properties:
4786        count: { get_param: node_count }
4787        index_var: index
4788        resource_def:
4789          type: nested.yaml
4790          properties:
4791            index: index
4792            avaialability_zones: { list_join: [',', [ { get_param: availability_zone_0 }, { get_param: availability_zone_1 } ] ] }
4793
4794 In the nested heat
4795
4796 .. code-block:: yaml
4797
4798  parameters:
4799    avaialability_zones:
4800      type: comma_delimited_list
4801      description:
4802
4803  resources:
4804    servers:
4805      type: OS::Nova::Server
4806      properties:
4807        name: { get_param: [ dns_names, get_param: index ] }
4808        image: { get_param: dns_image_name }
4809        flavor: { get_param: dns_flavor_name }
4810        availability_zone: { get_param: [ avaialability_zones, get_param: index ] }
4811
4812
4813 **Option 2:** Create a resource group per availability zone. A separate
4814 OS::Heat::ResourceGroup is created for each availability zone.
4815
4816 External References
4817 -------------------
4818
4819 Heat templates *should not* reference any HTTP-based resource
4820 definitions, any HTTP-based nested configurations, or any HTTP-based
4821 environment files.
4822
4823 -  During orchestration, ONAP *should not* retrieve any such resources
4824    from external/untrusted/unknown sources.
4825
4826 -  VNF images should not contain such references in user-data or other
4827    configuration/operational scripts that are specified via Heat or
4828    encoded into the VNF image itself.
4829
4830 *Note:* HTTP-based references are acceptable if the HTTP-based reference
4831 is accessing information with the VM private/internal network.
4832
4833 Heat Files Support (get\_file)
4834 ------------------------------
4835
4836 Heat Templates may contain the inclusion of text files into Heat
4837 templates via the Heat get\_file directive. This may be used, for
4838 example, to define a common “user-data” script, or to inject files into
4839 a VM on startup via the “personality” property.
4840
4841 Support for Heat Files is subject to the following limitations:
4842
4843 -  The get\_files targets must be referenced in Heat templates by file
4844    name, and the corresponding files should be delivered to ONAP along
4845    with the Heat templates.
4846
4847    -  URL-based file retrieval must not be used; it is not supported.
4848
4849 -  The included files must have unique file names within the scope of
4850    the VNF.
4851
4852 -  ONAP does not support a directory hierarchy for included files.
4853
4854    -  All files must be in a single, flat directory per VNF.
4855
4856 -  Included files may be used by all Modules within a given VNF.
4857
4858 -  get\_file directives may be used in both non-nested and nested
4859    templates
4860
4861 Key Pairs
4862 ---------
4863
4864 When Nova Servers are created via Heat templates, they may be passed a
4865 “keypair” which provides an ssh key to the ‘root’ login on the newly
4866 created VM. This is often done so that an initial root key/password does
4867 not need to be hard-coded into the image.
4868
4869 Key pairs are unusual in OpenStack, because they are the one resource
4870 that is owned by an OpenStack User as opposed to being owned by an
4871 OpenStack Tenant. As a result, they are usable only by the User that
4872 created the keypair. This causes a problem when a Heat template attempts
4873 to reference a keypair by name, because it assumes that the keypair was
4874 previously created by a specific ONAP user ID.
4875
4876 When a keypair is assigned to a server, the SSH public-key is
4877 provisioned on the VMs at instantiation time. They keypair itself is not
4878 referenced further by the VM (i.e. if the keypair is updated with a new
4879 public key, it would only apply to subsequent VMs created with that
4880 keypair).
4881
4882 Due to this behavior, the recommended usage of keypairs is in a more
4883 generic manner which does not require the pre-requisite creation of a
4884 keypair. The Heat should be structured in such a way as to:
4885
4886 -  Pass a public key as a parameter value instead of a keypair name
4887
4888 -  Create a new keypair within the VNF Heat templates (in the base
4889    module) for use within that VNF
4890
4891 By following this approach, the end result is the same as pre-creating
4892 the keypair using the public key – i.e., that public key will be
4893 provisioned in the new VM. However, this recommended approach also makes
4894 sure that a known public key is supplied (instead of having OpenStack
4895 generate a public/private pair to be saved and tracked outside of ONAP).
4896 It also removes any access/ownership issues over the created keypair.
4897
4898 The public keys may be enumerated as a VNF Orchestration Constant in the
4899 environment file (since it is public, it is not a secret key), or passed
4900 at run-time as instance-specific parameters. ONAP will never
4901 automatically assign a public/private key pair.
4902
4903 *Example (create keypair with an existing ssh public-key for {vm-type}
4904 of lb (for load balancer)):*
4905
4906 .. code-block:: yaml
4907
4908  parameters:
4909     vnf_name:
4910        type: string
4911     lb_ssh_public_key:
4912        type: string
4913
4914  resources:
4915     my_keypair:
4916        type: OS::Nova::Keypair
4917        properties:
4918           name:
4919              str_replace:
4920                 template: VNF_NAME_key_pair
4921                 params:
4922                 VNF_NAME: { get_param: vnf_name }
4923           public_key: {get_param: lb_ssh_public_key}
4924           save_private_key: false
4925
4926 Security Groups
4927 ---------------
4928
4929 OpenStack allows a tenant to create Security groups and define rules
4930 within the security groups.
4931
4932 Security groups, with their rules, may either be created in the Heat
4933 Orchestration Template or they can be pre-created in OpenStack and
4934 referenced within the Heat template via parameter(s). There can be a
4935 different approach for security groups assigned to ports on internal
4936 (intra-VNF) networks or external networks (inter-VNF). Furthermore,
4937 there can be a common security group across all VMs for a specific
4938 network or it can vary by VM (i.e., {vm-type}) and network type (i.e.,
4939 {network-role}).
4940
4941 Anti-Affinity and Affinity Rules
4942 --------------------------------
4943
4944 Anti-affinity or affinity rules are supported using normal OpenStack
4945 OS::Nova::ServerGroup resources. Separate ServerGroups are typically
4946 created for each VM type to prevent them from residing on the same host,
4947 but they can be applied to multiple VM types to extend the
4948 affinity/anti-affinity across related VM types as well.
4949
4950 *Example:*
4951
4952 In this example, the {network-role} has been defined as oam to represent
4953 an oam network and the {vm-type} have been defined as lb for load
4954 balancer and db for database.
4955
4956 .. code-block:: yaml
4957
4958  resources:
4959  db_server_group:
4960     type: OS::Nova::ServerGroup
4961     properties:
4962        name:
4963           str_replace:
4964              params:
4965                 $vnf_name: {get_param: vnf_name}
4966              template: $vnf_name-server_group1
4967        policies:
4968           - anti-affinity
4969
4970  lb_server_group:
4971     type: OS::Nova::ServerGroup
4972     properties:
4973        name:
4974           str_replace:
4975              params:
4976                 $vnf_name: {get_param: vnf_name}
4977              template: $vnf_name-server_group2
4978        policies:
4979           - affinity
4980
4981  db_0:
4982     type: OS::Nova::Server
4983     properties:
4984     ...
4985     scheduler_hints:
4986        group: {get_resource: db_server_group}
4987
4988  db_1:
4989     type: OS::Nova::Server
4990     properties:
4991     ...
4992     scheduler_hints:
4993        group: {get_resource: db_server_group}
4994
4995  lb_0:
4996     type: OS::Nova::Server
4997     properties:
4998     ...
4999     scheduler_hints:
5000        group: {get_resource: lb_server_group} 
5001
5002 Resource Data Synchronization
5003 -----------------------------
5004
5005 For cases where synchronization is required in the orchestration of Heat
5006 resources, two approaches are recommended:
5007
5008 -  Standard Heat depends\_on property for resources
5009
5010    -  Assures that one resource completes before the dependent resource
5011       is orchestrated.
5012
5013    -  Definition of completeness to OpenStack may not be sufficient
5014       (e.g., a VM is considered complete by OpenStack when it is ready
5015       to be booted, not when the application is up and running).
5016
5017 -  Use of Heat Notifications
5018
5019    -  Create OS::Heat::WaitCondition and OS::Heat::WaitConditionHandle
5020       resources.
5021
5022    -  Pre-requisite resources issue *wc\_notify* commands in user\_data.
5023
5024    -  Dependent resource define depends\_on in the
5025       OS::Heat::WaitCondition resource.
5026
5027 *Example: “depends\_on” case*
5028
5029 In this example, the {network-role} has been defined as oam to represent
5030 an oam network and the {vm-type} has been defined as oam to represent an
5031 oam server.
5032
5033 .. code-block:: yaml
5034
5035  resources:
5036    oam_server_01:
5037      type: OS::Nova::Server
5038      properties:
5039        name: {get_param: [oam_ names, 0]}
5040        image: {get_param: oam_image_name}
5041        flavor: {get_param: oam_flavor_name}
5042        availability_zone: {get_param: availability_zone_0}
5043        networks:
5044          - port: {get_resource: oam01_port_0}
5045          - port: {get_resource: oam01_port_1}
5046        user_data:
5047        scheduler_hints: {group: {get_resource: oam_servergroup}}
5048        user_data_format: RAW
5049
5050  oam_01_port_0:
5051    type: OS::Neutron::Port
5052    properties:
5053      network: {get_resource: oam_net_name}
5054      fixed_ips: [{"ip_address": {get_param: [oam_oam_net_ips, 1]}}]
5055      security_groups: [{get_resource: oam_security_group}]
5056
5057  oam_01_port_1:
5058    type: OS::Neutron::Port
5059    properties:
5060      network: {get_param: oam_net_name}
5061      fixed_ips: [{"ip_address": {get_param: [oam_oam_net_ips, 2]}}]
5062      security_groups: [{get_resource: oam_security_group}]
5063
5064  oam_01_vol_attachment:
5065    type: OS::Cinder::VolumeAttachment
5066    depends_on: oam_server_01
5067    properties:
5068      volume_id: {get_param: oam_vol_1}
5069      mountpoint: /dev/vdb
5070      instance_uuid: {get_resource: oam_server_01}
5071
5072 High Availability
5073 -----------------
5074
5075 VNF/VM parameters may include availability zone IDs for VNFs that
5076 require high availability.
5077
5078 The Heat must comply with the following requirements to specific
5079 availability zone IDs:
5080
5081 -  The Heat template should spread Nova and Cinder resources across the
5082    availability zones as desired
5083
5084 Post Orchestration & VNF Configuration
5085 --------------------------------------
5086
5087 Heat templates should contain a minimum amount of post-orchestration
5088 configuration data. For instance, *do not* embed complex user-data
5089 scripts in the template with large numbers of configuration parameters
5090 to the Heat template.
5091
5092 -  VNFs may provide configuration APIs for use after VNF creation. Such
5093    APIs will be invoked via application and/or SDN controllers.
5094
5095 *Note:* It is important to follow this convention to the extent possible
5096 even in the short-term as of the long-term direction.
5097
5098 c. VNFM Driver Develop Steps
5099 ==============================
5100
5101 Aid to help the VNF vendors to fasten the integration with VF-C via
5102 special VNFM, ONAP provides the documents. In this chapter, the
5103 develop steps for VNF vendors will be introduced.
5104
5105 First, using the VNF SDK tools to design the VNF with TOSCA model and
5106 output the VNF TOSCA package. The VNF package can be validated, and
5107 tested.
5108
5109 Second, the VNF vendor should provide special VNFM driver in ONAP, which
5110 is a micro service and in duty of translation interface from VF-C to
5111 special VNFM. The interfaces of special VNFM are provided by
5112 the VNF vendors themselves.
5113
5114 d. Create Special VNFM Adaptor Mircoservice
5115 ============================================
5116
5117 Some vnfs are managed by special VNFM. Before adding special VNFM to ONAP, a
5118 special VNFM adaptor must be added to ONAP implementing the interface of the special VNFM.
5119
5120 A special VNFM adaptor is a micro service with unique name and an appointed
5121 port, when started up, it must be automatically registered to MSB(Micro server
5122 bus),following describes an example RESTful of registering to MSB:
5123
5124 POST /api/microservices/v1/services
5125
5126     {
5127
5128     "serviceName": "catalog",
5129
5130     "version": "v1",
5131
5132     "url": "/api/catalog/v1",
5133
5134     "protocol": "REST",
5135
5136     "visualRange": "1",
5137
5138     "nodes": [
5139
5140     {
5141
5142     "ip": "10.74.56.36",
5143
5144     "port": "8988",
5145
5146     "ttl": 0
5147
5148     }
5149
5150     ]
5151
5152     }