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