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