Merge "VNFRQTS - Refreshing requirements in Appendix"
[vnfrqts/requirements.git] / docs / Chapter7.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 **ONAP Management Requirements**
7 =====================================
8
9 The ONAP platform is the part of the larger Network Function
10 Virtualization/Software Defined Network (NFV/SDN) ecosystem that
11 is responsible for the efficient control, operation and management
12 of Virtual Network Function (VNF) capabilities and functions. It
13 specifies standardized abstractions and interfaces that enable
14 efficient interoperation of the NVF/SDN ecosystem components. It
15 enables product/service independent capabilities for design, creation
16 and runtime lifecycle management (includes all aspects of installation,
17 change management, assurance, and retirement) of resources in NFV/SDN
18 environment (see ECOMP white paper ). These capabilities are provided
19 using two major architectural frameworks: (1) a Design Time Framework
20 to design, define and program the platform (uniform onboarding), and
21 (2) a Runtime Execution Framework to execute the logic programmed in
22 the design environment (uniform delivery and runtime lifecycle
23 management). The platform delivers an integrated information model
24 based on the VNF package to express the characteristics and behavior
25 of these resources in the Design Time Framework. The information model
26 is utilized by Runtime Execution Framework to manage the runtime
27 lifecycle of the VNFs. The management processes are orchestrated
28 across various modules of ONAP to instantiate, configure, scale,
29 monitor, and reconfigure the VNFs using a set of standard APIs
30 provided by the VNF developers.
31
32 Although the guidelines and requirements specified in this document
33 were originally driven by the need to standardize and automate the
34 management of the virtualized environments (with VNFs) operated by
35 Service Providers, we believe that most of the requirements are equally
36 applicable to the operation of the physical network functions (PNFs),
37 those network functions provided by traditional physical network
38 elements (e.g. whitebox switches) or customized peripherals (e.g. a
39 video rendering engine for augmented reality). The primary area of
40 difference will be in how the network function is orchestrated into
41 place – VNFs can be much more dynamically created & placed by ONAP
42 to support varying geographic, availability and scalability needs,
43 whereas the PNFs have to be deployed a priori in specific locations
44 based on planning and engineering – their availability and scalability
45 will be determined by the capabilities offered by the PNFs.
46
47 **PNF** is a vendor-provided Network Function(s) implemented using a
48 bundled set of hardware and software while VNFs utilize cloud resources
49 to provide Network Functions through virtualized software modules.  PNF
50 can be supplied by a vendor as a Black BOX (provides no knowledge of its
51 internal characteristics, logic, and software design/architecture) or as
52 a White Box (provides detailed knowledge and access of its internal
53 components and logic) or as a Grey Box (provides limited knowledge and
54 access to its internal components).
55
56 * Requirements that equally apply to both VNFs and PNFs are defined as
57   "The xNF MUST/SHOULD/..."
58 * Requirements that only apply to VNFs are defined as "The VNF MUST/SHOULD/..."
59 * Requirements that only apply to PNFs are defined as "The PNF MUST/SHOULD/..."
60
61
62 Service Design
63 ------------------------------------
64
65 This section, Service Design, has been left intentionally blank. It
66 is out-of-scope for the VNF Requirements project for the Amsterdam
67 release and no numbered requirements are expected. Content may be
68 added in future updates of this document.
69
70 VNF On-boarding and package management
71 -----------------------------------------------------------------------------
72
73 Design Definition
74 ^^^^^^^^^^^^^^^^^^
75
76 The ONAP Design Time Framework provides the ability to design NFV
77 resources including VNFs, Services, and products. The VNF provider must
78 provide VNF packages that include a rich set of recipes, management and
79 functional interfaces, policies, configuration parameters, and
80 infrastructure requirements that can be utilized by the ONAP Design
81 module to onboard and catalog these resources. Initially this
82 information may be provided in documents, but in the near future a
83 method will be developed to automate as much of the transfer of data as
84 possible to satisfy its long term requirements.
85
86 The current VNF Package Requirement is based on a subset of the
87 Requirements contained in the ETSI Document: ETSI GS NFV-MAN 001 v1.1.1
88 and GS NFV IFA011 V0.3.0 (2015-10) - Network Functions Virtualization
89 (NFV), Management and Orchestration, VNF Packaging Specification.
90
91 Resource Description
92 ^^^^^^^^^^^^^^^^^^^^^^
93
94 * R-77707 The VNF provider **MUST** include a Manifest File that
95   contains a list of all the components in the VNF package.
96 * R-66070 The xNF Package **MUST** include xNF Identification Data to
97   uniquely identify the resource for a given xNF provider. The identification
98   data must include: an identifier for the xNF, the name of the xNF as was
99   given by the xNF provider, xNF description, xNF provider, and version.
100 * R-69565 The xNF Package **MUST** include documentation describing
101   xNF Management APIs. The document must include information and
102   tools for:
103
104   - ONAP to deploy and configure (initially and ongoing) the xNF
105     application(s) (e.g., NETCONF APIs). Includes description of
106     configurable parameters for the xNF and whether the parameters
107     can be configured after xNF instantiation.
108   - ONAP to monitor the health of the xNF (conditions that require
109     healing and/or scaling responses). Includes a description of:
110
111     - Parameters that can be monitored for the xNF and event records
112       (status, fault, flow, session, call, control plane, etc.) generated
113       by the xNF after instantiation.
114     - Runtime lifecycle events and related actions (e.g., control
115       responses, tests) which can be performed for the xNF.
116
117 * R-84366 The xNF Package **MUST** include documentation describing
118   xNF Functional APIs that are utilized to build network and
119   application services. This document describes the externally exposed
120   functional inputs and outputs for the xNF, including interface
121   format and protocols supported.
122 * R-36280 The xNF provider **MUST** provide documentation describing
123   xNF Functional Capabilities that are utilized to operationalize the
124   xNF and compose complex services.
125 * R-98617 The xNF provider **MUST** provide information regarding any
126   dependency (e.g., affinity, anti-affinity) with other xNFs and resources.
127
128 Resource Configuration
129 ^^^^^^^^^^^^^^^^^^^^^^^
130
131 * R-89571 The xNF **MUST** support and provide artifacts for
132   configuration management using at least one of the following
133   technologies:
134
135   - NETCONF/YANG
136   - Chef
137   - Ansible
138
139  Note: The requirements for NETCONF/YANG, Chef, and Ansible protocols
140  are provided separately and must be supported only if the corresponding
141  protocol option is provided by the xNF providor.
142
143 Configuration Management via NETCONF/YANG
144 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145
146 * R-30278 The xNF provider **MUST** provide a Resource/Device YANG model
147   as a foundation for creating the YANG model for configuration. This will
148   include xNF attributes/parameters and valid values/attributes configurable
149   by policy.
150
151 Configuration Management via Chef
152 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153
154 * R-13390 The xNF provider **MUST** provide cookbooks to be loaded
155   on the appropriate Chef Server.
156 * R-18525 The xNF provider **MUST** provide a JSON file for each
157   supported action for the xNF.  The JSON file must contain key value
158   pairs with all relevant values populated with sample data that illustrates
159   its usage. The fields and their description are defined in Appendix A.
160
161  Note: Chef support in ONAP is not currently available and planned for 4Q 2017.
162
163 Configuration Management via Ansible
164 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165
166 * R-75608 The xNF provider **MUST** provide playbooks to be loaded
167   on the appropriate Ansible Server.
168 * R-16777 The xNF provider **MUST** provide a JSON file for each
169   supported action for the xNF.  The JSON file must contain key value
170   pairs with all relevant values populated with sample data that illustrates
171   its usage. The fields and their description are defined in Appendix B.
172
173 * R-46567 The xNF Package **MUST** include configuration scripts
174   for boot sequence and configuration.
175 * R-16065 The xNF provider **MUST** provide configurable parameters
176   (if unable to conform to YANG model) including xNF attributes/parameters
177   and valid values, dynamic attributes and cross parameter dependencies
178   (e.g., customer provisioning data).
179
180 Resource Control Loop
181 ^^^^^^^^^^^^^^^^^^^^^^^
182
183 * R-22888 The xNF provider **MUST** provide documentation for the xNF
184   Policy Description to manage the xNF runtime lifecycle. The document
185   must include a description of how the policies (conditions and actions)
186   are implemented in the xNF.
187 * R-01556 The xNF Package **MUST** include documentation describing the
188   fault, performance, capacity events/alarms and other event records that
189   are made available by the xNF. The document must include:
190
191   - A unique identification string for the specific xNF, a description
192     of the problem that caused the error, and steps or procedures to
193     perform Root Cause Analysis and resolve the issue.
194   - All events, severity level (e.g., informational, warning, error)
195     and descriptions including causes/fixes if applicable for the event.
196   - All events (fault, measurement for xNF Scaling, Syslogs, State Change and Mobile Flow), that need to be collected at each VM, VNFC (defined in `VNF Guidelines <http://onap.readthedocs.io/en/latest/submodules/vnfrqts/guidelines.git/docs/vnf_guidelines/vnf_guidelines.html#a-glossary>`__ ) and for the overall xNF.
197
198 * R-27711 The xNF provider **MUST** provide an XML file that contains a
199   list of xNF error codes, descriptions of the error, and possible
200   causes/corrective action.
201 * R-01478 The xNF Package **MUST** include documentation describing all
202   parameters that are available to monitor the xNF after instantiation
203   (includes all counters, OIDs, PM data, KPIs, etc.) that must be collected
204   for reporting purposes. The documentation must include a list of:
205
206   - Monitoring parameters/counters exposed for virtual resource
207     management and xNF application management.
208   - KPIs and metrics that need to be collected at each VM for capacity
209     planning and performance management purposes.
210   - The monitoring parameters must include latencies, success rates,
211     retry rates, load and quality (e.g., DPM) for the key
212     transactions/functions supported by the xNF and those that must
213     be exercised by the xNF in order to perform its function.
214   - For each KPI, provide lower and upper limits.
215   - When relevant, provide a threshold crossing alert point for
216     each KPI and describe the significance of the threshold crossing.
217   - For each KPI, identify the suggested actions that need to be
218     performed when a threshold crossing alert event is recorded.
219   - Describe any requirements for the monitoring component of tools
220     for Network Cloud automation and management to provide these records
221     to components of the xNF.
222   - When applicable, provide calculators needed to convert raw data
223     into appropriate reporting artifacts.
224
225 * R-56815 The xNF Package **MUST** include documentation describing
226   supported xNF scaling capabilities and capacity limits (e.g., number
227   of users, bandwidth, throughput, concurrent calls).
228 * R-48596 The xNF Package **MUST** include documentation describing
229   the characteristics for the xNF reliability and high availability.
230 * R-74763 The xNF provider **MUST** provide an artifact per xNF that contains
231   all of the xNF Event Records supported. The artifact should include
232   reference to the specific release of the xNF Event Stream Common Event
233   Data Model document it is based on. (e.g.,
234   `VES Event Listener <https://github.com/att/evel-test-collector/tree/master/docs/att_interface_definition>`__)
235
236 Compute, Network, and Storage Requirements
237 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
238
239 * R-35851 The xNF Package **MUST** include xNF topology that describes
240   basic network and application connectivity internal and external to the
241   xNF including Link type, KPIs, Bandwidth, latency, jitter, QoS (if
242   applicable) for each interface.
243 * R-97102 The VNF Package **MUST** include VM requirements via a Heat
244   template that provides the necessary data for:
245
246   - VM specifications for all VNF components - for hypervisor, CPU,
247     memory, storage.
248   - Network connections, interface connections, internal and external to VNF.
249   - High availability redundancy model.
250   - Scaling/growth VM specifications.
251
252  Note: Must comply with the *Heat requirements in 5.b*.
253
254 * R-26881 The xNF provider **MUST** provide the binaries and images
255   needed to instantiate the xNF (xNF and VNFC images).
256 * R-96634 The VNF provider **MUST** describe scaling capabilities
257   to manage scaling characteristics of the VNF.
258
259
260 Testing
261 ^^^^^^^^^^
262
263 * R-43958 The xNF Package **MUST** include documentation describing
264   the tests that were conducted by the xNF providor and the test results.
265 * R-04298 The xNF provider **MUST** provide their testing scripts to
266   support testing.
267 * R-58775 The xNF provider **MUST** provide software components that
268   can be packaged with/near the xNF, if needed, to simulate any functions
269   or systems that connect to the xNF system under test. This component is
270   necessary only if the existing testing environment does not have the
271   necessary simulators.
272
273 Licensing Requirements
274 ^^^^^^^^^^^^^^^^^^^^^^^
275
276 * R-85653 The xNF **MUST** provide metrics (e.g., number of sessions,
277   number of subscribers, number of seats, etc.) to ONAP for tracking
278   every license.
279 * R-44125 The xNF provider **MUST** agree to the process that can
280   be met by Service Provider reporting infrastructure. The Contract
281   shall define the reporting process and the available reporting tools.
282 * R-40827 The xNF provider **MUST** enumerate all of the open
283   source licenses their xNF(s) incorporate.
284 * R-97293 The xNF provider **MUST NOT** require audits of
285   Service Provider’s business.
286 * R-44569 The xNF provider **MUST NOT** require additional
287   infrastructure such as a xNF provider license server for xNF provider
288   functions and metrics.
289 * R-13613 The VNF **MUST** provide clear measurements for licensing
290   purposes to allow automated scale up/down by the management system.
291 * R-27511 The VNF provider **MUST** provide the ability to scale
292   up a VNF provider supplied product during growth and scale down a
293   VNF provider supplied product during decline without “real-time”
294   restrictions based upon VNF provider permissions.
295 * R-85991 The xNF provider **MUST** provide a universal license key
296   per xNF to be used as needed by services (i.e., not tied to a VM
297   instance) as the recommended solution. The xNF provider may provide
298   pools of Unique xNF License Keys, where there is a unique key for
299   each xNF instance as an alternate solution. Licensing issues should
300   be resolved without interrupting in-service xNFs.
301 * R-47849 The xNF provider **MUST** support the metadata about
302   licenses (and their applicable entitlements) as defined in this
303   document for xNF software, and any license keys required to authorize
304   use of the xNF software.  This metadata will be used to facilitate
305   onboarding the xNF into the ONAP environment and automating processes
306   for putting the licenses into use and managing the full lifecycle of
307   the licenses. The details of this license model are described in
308   Appendix C. Note: License metadata support in ONAP is not currently
309   available and planned for 1Q 2018.
310
311 Configuration Management
312 ---------------------------------------------------
313
314 Controller Interactions With VNF
315 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
316
317 ONAP Controllers (such as APPC) expose a northbound API to clients
318 (such as SO) in order for the clients to initiate an activity
319 (aka command) on a VNF.   ONAP controllers interact with VNFs through
320 Network and Application Adapters to perform configuration and other
321 lifecycle management activities within NFV environment.
322 The standardized models, protocols and mechanisms by which network
323 functions are configured are equally applicable to VNFs and PNFs.
324
325 This section describes the list of commands that should be supported
326 by the VNF.   The following sections describe the standard protocols
327 that are supported (NETCONF, Chef, Ansible, and REST).
328
329 The commands below are expected to be supported on all VNF’s, unless
330 noted otherwise, either directly (via the NETCONF or REST interface)
331 or indirectly (via a Chef Cookbook or Ansible server).  Note that there
332 are additional commands offered to northbound clients that are not shown
333 below, as these commands either act internally on the Controller itself
334 or depend upon network cloud components for implementation (thus, these
335 actions do not put any special requirement on the VNF provider).
336
337 The commands allow for parametric data to be passed from the controller
338 to the VNF or Ansible/Chef server in the request.  The format of the
339 parameter data can be either xml (for NETCONF) or JSON (for Ansible,
340 Chef, or REST).
341
342 Configuration Commands
343 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
344
345 **Configure**: The Controller client is requesting that a post-instantiation
346 configuration be applied to the target VNF instance. After the Configure
347 action is completed, the VNF instance should be ready for service.
348 Note that customer specific configurations may need to be applied using
349 the ConfigModify action.
350
351 **ConfigModify**: The Controller client is requesting a configuration
352 update to a subset of the total configuration parameters of a VNF or to
353 apply customer specific configurations. The configuration update is
354 typically done while the VNF is in service and should not disrupt traffic.
355
356 **ConfigBackup**: The Controller client is requesting a backup of the
357 configuration parameters where the parameters are stored on the VNF.
358 This command is typically requested as part of an orchestration flow
359 for scenarios such as a software upgrade. The ConfigBackup is typically
360 done while the VNF is not in service (i.e., in a maintenance state).
361 When the ConfigBackup command is executed, the current VNF configuration
362 parameters are saved in storage that is preserved (if there is an existing
363 set of backed up parameters, they are overwritten).
364
365 **ConfigRestore**: The Controller client is requesting a restore action of
366 the configuration parameters to the VNF that were saved by ConfigBackup
367 command. This command is typically requested as part of an orchestration
368 flow for scenarios such as a software upgrade where the software upgrade
369 may have failed and the VNF needs to be rolled back to the prior configuration.
370 When the ConfigRestore command is executed, the VNF configuration parameters
371 which were backed to persistent preserved storage are applied to the VNF
372 (replacing existing parameters). The ConfigRestore is typically done while
373 the VNF is not in service (i.e., in a maintenance state).
374
375 **ConfigScaleOut**: The Controller client is requesting that a configuration
376 be applied after the VNF instance has been scaled out (i.e., one or more
377 additional VM’s instantiated to increase capacity). For some VNF’s,
378 ConfigScaleOut is not needed because the VNF is auto-configured after
379 scale-out. This command is being introduced in the Beijing release.
380
381 **Audit**: The Controller client is requesting that the current (last known
382 configuration update) is audited against the running configuration on the VNF.
383
384 * R-20741 The xNF **MUST** support ONAP Controller’s **Configure** command.
385 * R-19366 The xNF **MUST** support ONAP Controller’s **ConfigModify** command.
386 * R-32981 The xNF **MUST** support ONAP Controller’s **ConfigBackup** command.
387 * R-48247 The xNF **MUST** support ONAP Controller’s **ConfigRestore** command.
388 * R-94084 The xNF **MUST** support ONAP Controller’s **ConfigScaleOut**
389   command.
390 * R-56385 The xNF **MUST** support ONAP Controller’s **Audit** command.
391
392 LifeCycle Management Related Commands
393 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
394
395 **The following commands are needed to support various lifecycle management
396 flows where the VNF may need to be removed for service.**
397
398 **QuiesceTraffic**: The Controller client is requesting the VNF gracefully
399 stop traffic (aka block and drain traffic). The method for quiescing traffic
400 is specific to the VNF architecture. The action is completed when all
401 (in-flight transactions) traffic has stopped.   The VNF remains in an active
402 state where the VNF is able to process traffic (initiated using the
403 StartTraffic action).
404
405 **ResumeTraffic**: The Controller client is requesting the VNF resume
406 processing traffic. The method to resume traffic is specific to the VNF
407 architecture.
408
409 **StopApplication**: The Controller client is requesting that the application
410 running on the VNF is stopped gracefully (i.e., without traffic loss).
411 This is equivalent to quiescing the traffic and then stopping the application
412 processes. The processes can be restarted using the StartApplication command.
413
414 **StartApplication**: The Controller client is requesting that the application
415 running on the VNF is started. Get ready to process traffic.
416
417 **The following commands are needed to support software upgrades, in-place or
418 other type of software upgrade. The VNF instance may be removed from service
419 for the upgrade.**
420
421 **UpgradePrecheck**: The Controller client is requesting a confirmation that
422 the VNF can (and needs to) be upgraded to a specific software version
423 (specified in the request).
424
425 **UpgradeSoftware**: The Controller client is requesting that a (in-place)
426 software upgrade be performed on the VNF.  The software to be applied is
427 pre-loaded to a specified location.
428
429 **UpgradePostCheck**: The Controller client is requesting a confirmation that
430 the VNF software upgrade has been completed successfully (VNF upgraded to
431 the new software version).
432
433 **UpgradeBackup**: The Controller client is requesting that the VNF is backed
434 up prior to the UpgradeSoftware.
435
436 **UpgradeBackOut**: The Controller client is requesting that the VNF upgrade
437 is backed out (in the event that the SoftwareUpgrade or UpgradePostCheck
438 failed).
439
440 * R-12706 The xNF **MUST** support ONAP Controller’s **QuiesceTraffic**
441   command.
442 * R-07251 The xNF **MUST** support ONAP Controller’s **ResumeTraffic**
443   command.
444 * R-83146 The xNF **MUST** support ONAP Controller’s **StopApplication**
445   command.
446 * R-82811 The xNF **MUST** support ONAP Controller’s **StartApplication**
447   command.
448 * R-19922 The xNF **MUST** support ONAP Controller’s **UpgradePrecheck**
449   command.
450 * R-49466 The xNF **MUST** support ONAP Controller’s **UpgradeSoftware**
451   command.
452 * R-45856 The xNF **MUST** support ONAP Controller’s **UpgradePostCheck**
453   command.
454 * R-97343 The xNF **MUST** support ONAP Controller’s **UpgradeBackup**
455   command.
456 * R-65641 The xNF **MUST** support ONAP Controller’s **UpgradeBackOut**
457   command.
458
459 HealthCheck and Failure Related Commands
460 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
461
462 **HealthCheck**: The Controller client is requesting a health check over the
463 entire scope of the VNF.  The VNF must be 100% healthy, ready to take requests
464 and provide services, with all VNF required capabilities ready to provide
465 services and with all active and standby resources fully ready with no open
466 MINOR, MAJOR or CRITICAL alarms.
467
468 Note: In addition to the commands above, the Controller supports a set of
469 Openstack failure recovery related commands that are executed on-demand or via
470 Control Loop at the VM level.  The VNF must support these commands in a fully
471 automated fashion.
472
473 * R-41430 The xNF **MUST** support ONAP Controller’s **HealthCheck**
474   command.
475
476 Notes On Command Support Using Controller Southbound Protocols
477 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
478
479 The ONAP Controllers are designed to support a standard set of protocols in
480 order to communicate with the VNF instance.  The supported protocols are
481 NETCONF, Ansible, Chef, and REST.
482
483 NETCONF and REST require the VNF to implement a server which supports the RPC
484 or REST calls.
485
486 Ansible and Chef require the use of a Ansible or Chef server which communicates
487 with the Controller (northbound) and the VNF VM’s (southbound).
488
489 The vendor must select which protocol to support for the commands listed above.
490 Notes:
491
492 * NETCONF is most suitable for configuration related commands
493
494 * Ansible and Chef are suitable for any command.
495   Ansible has the advantage that it is agentless.
496
497 * REST is specified as an option only for the HealthCheck.
498
499
500 Additional details can be found in the `ONAP Application Controller (APPC) API Guide <http://onap.readthedocs.io/en/latest/submodules/appc.git/docs/APPC%20API%20Guide/APPC%20API%20Guide.html>`_, `ONAP VF-C project <http://onap.readthedocs.io/en/latest/submodules/vfc/nfvo/lcm.git/docs/index.html>`_ and the `ONAP SDNC project <http://onap.readthedocs.io/en/latest/submodules/sdnc/northbound.git/docs/index.html>`_.
501
502 NETCONF Standards and Capabilities
503 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
504
505 ONAP Controllers and their Adapters utilize device YANG model and
506 NETCONF APIs to make the required changes in the VNF state and
507 configuration. The VNF providers must provide the Device YANG model and
508 NETCONF server supporting NETCONF APIs to comply with target ONAP and
509 industry standards.
510
511 VNF Configuration via NETCONF Requirements
512 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
513
514 Configuration Management
515 +++++++++++++++++++++++++++
516
517 * R-88026 The xNF **MUST** include a NETCONF server enabling
518   runtime configuration and lifecycle management capabilities.
519 * R-95950 The xNF **MUST** provide a NETCONF interface fully defined
520   by supplied YANG models for the embedded NETCONF server.
521
522 NETCONF Server Requirements
523 ++++++++++++++++++++++++++++++
524
525 * R-73468 The xNF **MUST** allow the NETCONF server connection
526   parameters to be configurable during virtual machine instantiation
527   through Heat templates where SSH keys, usernames, passwords, SSH
528   service and SSH port numbers are Heat template parameters.
529 * R-90007 The xNF **MUST** implement the protocol operation:
530   **close-session()**- Gracefully close the current session.
531 * R-70496 The xNF **MUST** implement the protocol operation:
532   **commit(confirmed, confirm-timeout)** - Commit candidate
533   configuration datastore to the running configuration.
534 * R-18733 The xNF **MUST** implement the protocol operation:
535   **discard-changes()** - Revert the candidate configuration
536   datastore to the running configuration.
537 * R-44281 The xNF **MUST** implement the protocol operation:
538   **edit-config(target, default-operation, test-option, error-option,
539   config)** - Edit the target configuration datastore by merging,
540   replacing, creating, or deleting new config elements.
541 * R-60106 The xNF **MUST** implement the protocol operation:
542   **get(filter)** - Retrieve (a filtered subset of) the running
543   configuration and device state information. This should include
544   the list of xNF supported schemas.
545 * R-29488 The xNF **MUST** implement the protocol operation:
546   **get-config(source, filter)** - Retrieve a (filtered subset of
547   a) configuration from the configuration datastore source.
548 * R-11235 The xNF **MUST** implement the protocol operation:
549   **kill-session(session)** - Force the termination of **session**.
550 * R-02597 The xNF **MUST** implement the protocol operation:
551   **lock(target)** - Lock the configuration datastore target.
552 * R-96554 The xNF **MUST** implement the protocol operation:
553   **unlock(target)** - Unlock the configuration datastore target.
554 * R-29324 The xNF **SHOULD** implement the protocol operation:
555   **copy-config(target, source) -** Copy the content of the
556   configuration datastore source to the configuration datastore target.
557 * R-88031 The xNF **SHOULD** implement the protocol operation:
558   **delete-config(target) -** Delete the named configuration
559   datastore target.
560 * R-97529 The xNF **SHOULD** implement the protocol operation:
561   **get-schema(identifier, version, format) -** Retrieve the YANG schema.
562 * R-62468 The xNF **MUST** allow all configuration data to be
563   edited through a NETCONF <edit-config> operation. Proprietary
564   NETCONF RPCs that make configuration changes are not sufficient.
565 * R-01382 The xNF **MUST** allow the entire configuration of the
566   xNF to be retrieved via NETCONF's <get-config> and <edit-config>,
567   independently of whether it was configured via NETCONF or other
568   mechanisms.
569 * R-28756 The xNF **MUST** support **:partial-lock** and
570   **:partial-unlock** capabilities, defined in RFC 5717. This
571   allows multiple independent clients to each write to a different
572   part of the <running> configuration at the same time.
573 * R-83873 The xNF **MUST** support **:rollback-on-error** value for
574   the <error-option> parameter to the <edit-config> operation. If any
575   error occurs during the requested edit operation, then the target
576   database (usually the running configuration) will be left unaffected.
577   This provides an 'all-or-nothing' edit mode for a single <edit-config>
578   request.
579 * R-68990 The xNF **MUST** support the **:startup** capability. It
580   will allow the running configuration to be copied to this special
581   database. It can also be locked and unlocked.
582 * R-68200 The xNF **MUST** support the **:url** value to specify
583   protocol operation source and target parameters. The capability URI
584   for this feature will indicate which schemes (e.g., file, https, sftp)
585   that the server supports within a particular URL value. The 'file'
586   scheme allows for editable local configuration databases. The other
587   schemes allow for remote storage of configuration databases.
588 * R-20353 The xNF **MUST** implement both **:candidate** and
589   **:writable-running** capabilities. When both **:candidate** and
590   **:writable-running** are provided then two locks should be supported.
591 * R-11499 The xNF **MUST** fully support the XPath 1.0 specification
592   for filtered retrieval of configuration and other database contents.
593   The 'type' attribute within the <filter> parameter for <get> and
594   <get-config> operations may be set to 'xpath'. The 'select' attribute
595   (which contains the XPath expression) will also be supported by the
596   server. A server may support partial XPath retrieval filtering, but
597   it cannot advertise the **:xpath** capability unless the entire XPath
598   1.0 specification is supported.
599 * R-83790 The xNF **MUST** implement the **:validate** capability
600 * R-49145 The xNF **MUST** implement **:confirmed-commit** If
601   **:candidate** is supported.
602 * R-58358 The xNF **MUST** implement the **:with-defaults** capability
603   [RFC6243].
604 * R-59610 The xNF **MUST** implement the data model discovery and
605   download as defined in [RFC6022].
606 * R-87662 The xNF **SHOULD** implement the NETCONF Event Notifications
607   [RFC5277].
608 * R-93443 The xNF **MUST** define all data models in YANG [RFC6020],
609   and the mapping to NETCONF shall follow the rules defined in this RFC.
610 * R-26115 The xNF **MUST** follow the data model upgrade rules defined
611   in [RFC6020] section 10. All deviations from section 10 rules shall
612   be handled by a built-in automatic upgrade mechanism.
613 * R-10716 The xNF **MUST** support parallel and simultaneous
614   configuration of separate objects within itself.
615 * R-29495 The xNF **MUST** support locking if a common object is
616   being manipulated by two simultaneous NETCONF configuration operations
617   on the same xNF within the context of the same writable running data
618   store (e.g., if an interface parameter is being configured then it
619   should be locked out for configuration by a simultaneous configuration
620   operation on that same interface parameter).
621 * R-53015 The xNF **MUST** apply locking based on the sequence of
622   NETCONF operations, with the first configuration operation locking
623   out all others until completed.
624 * R-02616 The xNF **MUST** permit locking at the finest granularity
625   if a xNF needs to lock an object for configuration to avoid blocking
626   simultaneous configuration operations on unrelated objects (e.g., BGP
627   configuration should not be locked out if an interface is being
628   configured or entire Interface configuration should not be locked out
629   if a non-overlapping parameter on the interface is being configured).
630 * R-41829 The xNF **MUST** be able to specify the granularity of the
631   lock via a restricted or full XPath expression.
632 * R-66793 The xNF **MUST** guarantee the xNF configuration integrity
633   for all simultaneous configuration operations (e.g., if a change is
634   attempted to the BUM filter rate from multiple interfaces on the same
635   EVC, then they need to be sequenced in the xNF without locking either
636   configuration method out).
637 * R-54190 The xNF **MUST** release locks to prevent permanent lock-outs
638   when/if a session applying the lock is terminated (e.g., SSH session
639   is terminated).
640 * R-03465 The xNF **MUST** release locks to prevent permanent lock-outs
641   when the corresponding <partial-unlock> operation succeeds.
642 * R-63935 The xNF **MUST** release locks to prevent permanent lock-outs
643   when a user configured timer has expired forcing the NETCONF SSH Session
644   termination (i.e., product must expose a configuration knob for a user
645   setting of a lock expiration timer)
646 * R-10173 The xNF **MUST** allow another NETCONF session to be able to
647   initiate the release of the lock by killing the session owning the lock,
648   using the <kill-session> operation to guard against hung NETCONF sessions.
649 * R-88899 The xNF **MUST** support simultaneous <commit> operations
650   within the context of this locking requirements framework.
651 * R-07545 The xNF **MUST** support all operations, administration and
652   management (OAM) functions available from the supplier for xNFs using
653   the supplied YANG code and associated NETCONF servers.
654 * R-60656 The xNF **MUST** support sub tree filtering.
655 * R-80898 The xNF **MUST** support heartbeat via a <get> with null filter.
656 * R-06617 The xNF **MUST** support get-schema (ietf-netconf-monitoring)
657   to pull YANG model over session.
658 * R-25238 The xNF PACKAGE **MUST** validated YANG code using the open
659   source pyang [1]_ program using the following commands:
660
661 .. code-block:: python
662
663  $ pyang --verbose --strict <YANG-file-name(s)>
664  $ echo $!
665
666 * R-63953 The xNF **MUST** have the echo command return a zero value
667   otherwise the validation has failed
668 * R-26508 The xNF **MUST** support NETCONF server that can be
669   mounted on OpenDaylight (client) and perform the following operations:
670
671   - Modify, update, change, rollback configurations using each
672     configuration data element.
673   - Query each state (non-configuration) data element.
674   - Execute each YANG RPC.
675   - Receive data through each notification statement.
676
677
678
679 The following requirements provides the Yang models that suppliers must
680 conform, and those where applicable, that suppliers need to use.
681
682 * R-28545 The xNF **MUST** conform its YANG model to RFC 6060,
683   “YANG - A Data Modeling Language for the Network Configuration
684   Protocol (NETCONF)”
685 * R-29967 The xNF **MUST** conform its YANG model to RFC 6022,
686   “YANG module for NETCONF monitoring”.
687 * R-22700 The xNF **MUST** conform its YANG model to RFC 6470,
688   “NETCONF Base Notifications”.
689 * R-10353 The xNF **MUST** conform its YANG model to RFC 6244,
690   “An Architecture for Network Management Using NETCONF and YANG”.
691 * R-53317 The xNF **MUST** conform its YANG model to RFC 6087,
692   “Guidelines for Authors and Reviewers of YANG Data Model Documents”.
693 * R-33955 The xNF **SHOULD** conform its YANG model to RFC 6991,
694   “Common YANG Data Types”.
695 * R-22946 The xNF **SHOULD** conform its YANG model to RFC 6536,
696   “NETCONF Access Control Model”.
697 * R-10129 The xNF **SHOULD** conform its YANG model to RFC 7223,
698   “A YANG Data Model for Interface Management”.
699 * R-12271 The xNF **SHOULD** conform its YANG model to RFC 7223,
700   “IANA Interface Type YANG Module”.
701 * R-49036 The xNF **SHOULD** conform its YANG model to RFC 7277,
702   “A YANG Data Model for IP Management”.
703 * R-87564 The xNF **SHOULD** conform its YANG model to RFC 7317,
704   “A YANG Data Model for System Management”.
705 * R-24269 The xNF **SHOULD** conform its YANG model to RFC 7407,
706   “A YANG Data Model for SNMP Configuration”.
707
708 The NETCONF server interface shall fully conform to the following
709 NETCONF RFCs.
710
711 * R-33946 The xNF **MUST** conform to the NETCONF RFC 4741,
712   “NETCONF Configuration Protocol”.
713 * R-04158 The xNF **MUST** conform to the NETCONF RFC 4742,
714   “Using the NETCONF Configuration Protocol over Secure Shell (SSH)”.
715 * R-13800 The xNF **MUST** conform to the NETCONF RFC 5277,
716   “NETCONF Event Notification”.
717 * R-01334 The xNF **MUST** conform to the NETCONF RFC 5717,
718   “Partial Lock Remote Procedure Call”.
719 * R-08134 The xNF **MUST** conform to the NETCONF RFC 6241,
720   “NETCONF Configuration Protocol”.
721 * R-78282 The xNF **MUST** conform to the NETCONF RFC 6242,
722   “Using the Network Configuration Protocol over Secure Shell”.
723
724 VNF REST APIs
725 ^^^^^^^^^^^^^^^
726
727 HealthCheck is a command for which no NETCONF support exists.
728 Therefore, this must be supported using a RESTful interface
729 (defined in this section) or with a Chef cookbook/Ansible playbook
730 (defined in sections `Chef Standards and Capabilities`_ and
731 `Ansible Standards and Capabilities`_).
732
733 HealthCheck Definition: The VNF level HealthCheck is a check over
734 the entire scope of the VNF. The VNF must be 100% healthy, ready
735 to take requests and provide services, with all VNF required
736 capabilities ready to provide services and with all active and
737 standby resources fully ready with no open MINOR, MAJOR or CRITICAL
738 alarms.  NOTE: A switch may need to be turned on, but the VNF should
739 be ready to take service requests or be already processing service
740 requests successfully.
741
742 The VNF must provide a REST formatted GET RPCs to support HealthCheck
743 queries via the GET method over HTTP(s).
744
745 The port number, url, and other authentication information is provided
746 by the VNF provider.
747
748 REST APIs
749 ~~~~~~~~~
750
751 * R-31809 The xNF **MUST** support the HealthCheck RPC. The HealthCheck
752   RPC executes a xNF Provider-defined xNF HealthCheck over the scope of
753   the entire xNF (e.g., if there are multiple VNFCs, then run a health check,
754   as appropriate, for all VNFCs). It returns a 200 OK if the test completes.
755   A JSON object is returned indicating state (healthy, unhealthy), scope
756   identifier, time-stamp and one or more blocks containing info and fault
757   information. If the xNF is unable to run the HealthCheck, return a
758   standard http error code and message.
759
760 Examples of responses when HealthCheck runs and is able to provide a healthy
761 or unhealthy response:
762
763 .. code-block:: java
764
765  {
766    "identifier": "scope represented",
767    "state": "healthy",
768    "time": "01-01-1000:0000"
769  }
770
771  {
772    "identifier": "scope represented",
773    "state": "unhealthy",
774     {[
775    "info": "System threshold exceeded details",
776    "fault":
777      {
778        "cpuOverall": 0.80,
779        "cpuThreshold": 0.45
780      }
781      ]},
782    "time": "01-01-1000:0000"
783  }
784
785
786 Chef Standards and Capabilities
787 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
788
789 ONAP will support configuration of VNFs via Chef subject to the
790 requirements and guidelines defined in this section.
791
792 The Chef configuration management mechanism follows a client-server
793 model. It requires the presence of a Chef-Client on the VNF that will be
794 directly managed by a Chef Server. The Chef-client will register with
795 the appropriate Chef Server and are managed via ‘cookbooks’ and
796 configuration attributes loaded on the Chef Server which contain all
797 necessary information to execute the appropriate actions on the VNF via
798 the Chef-client.
799
800 ONAP will utilize the open source Chef Server, invoke the documented
801 Chef REST APIs to manage the VNF and requires the use of open source
802 Chef-Client and Push Jobs Client on the VNF
803 (https://downloads.chef.io/).
804
805 VNF Configuration via Chef Requirements
806 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
807
808 Chef Client Requirements
809 +++++++++++++++++++++++++
810
811 * R-79224 The xNF **MUST** have the chef-client be preloaded with
812   validator keys and configuration to register with the designated
813   Chef Server as part of the installation process.
814 * R-72184 The xNF **MUST** have routable FQDNs for all the endpoints
815   (VMs) of a xNF that contain chef-clients which are used to register
816   with the Chef Server.  As part of invoking xNF actions, ONAP will
817   trigger push jobs against FQDNs of endpoints for a xNF, if required.
818 * R-47068 The xNF **MAY** expose a single endpoint that is
819   responsible for all functionality.
820 * R-67114 The xNF **MUST** be installed with:
821
822  -  Chef-Client >= 12.0
823  -  Chef push jobs client >= 2.0
824
825 Chef Roles/Requirements
826 ++++++++++++++++++++++++++
827
828 * R-27310 The xNF Package **MUST** include all relevant Chef artifacts
829   (roles/cookbooks/recipes) required to execute xNF actions requested by
830   ONAP for loading on appropriate Chef Server.
831 * R-26567 The xNF Package **MUST** include a run list of
832   roles/cookbooks/recipes, for each supported xNF action, that will
833   perform the desired xNF action in its entirety as specified by ONAP
834   (see Section 7.c, ONAP Controller APIs and Behavior, for list of xNF
835   actions and requirements), when triggered by a chef-client run list
836   in JSON file.
837 * R-98911 The xNF **MUST NOT** use any instance specific parameters
838   for the xNF in roles/cookbooks/recipes invoked for a xNF action.
839 * R-37929 The xNF **MUST** accept all necessary instance specific
840   data from the environment or node object attributes for the xNF
841   in roles/cookbooks/recipes invoked for a xNF action.
842 * R-62170 The xNF **MUST** over-ride any default values for
843   configurable parameters that can be set by ONAP in the roles,
844   cookbooks and recipes.
845 * R-78116 The xNF **MUST** update status on the Chef Server
846   appropriately (e.g., via a fail or raise an exception) if the
847   chef-client run encounters any critical errors/failures when
848   executing a xNF action.
849 * R-44013 The xNF **MUST** populate an attribute, defined as node
850   [‘PushJobOutput’] with the desired output on all nodes in the push job
851   that execute chef-client run if the xNF action requires the output of a
852   chef-client run be made available (e.g., get running configuration).
853 * R-30654 The xNF Package **MUST** have appropriate cookbooks that are
854   designed to automatically ‘rollback’ to the original state in case of
855   any errors for actions that change state of the xNF (e.g., configure).
856 * R-65755 The xNF **SHOULD** support callback URLs to return information
857   to ONAP upon completion of the chef-client run for any chef-client run
858   associated with a xNF action.
859
860 -  As part of the push job, ONAP will provide two parameters in the
861    environment of the push job JSON object:
862
863     -  ‘RequestId’ a unique Id to be used to identify the request,
864     -  ‘CallbackUrl’, the URL to post response back.
865
866 -  If the CallbackUrl field is empty or missing in the push job, then
867    the chef-client run need not post the results back via callback.
868
869 * R-15885 The xNF **MUST** Upon completion of the chef-client run,
870   POST back on the callback URL, a JSON object as described in Table
871   A2 if the chef-client run list includes a cookbook/recipe that is
872   callback capable. Failure to POST on the Callback Url should not be
873   considered a critical error. That is, if the chef-client successfully
874   completes the xNF action, it should reflect this status on the Chef
875   Server regardless of whether the Callback succeeded or not.
876
877 ONAP Chef API Usage
878 ~~~~~~~~~~~~~~~~~~~
879
880 This section outlines the workflow that ONAP invokes when it receives an
881 action request against a Chef managed VNF.
882
883 1. When ONAP receives a request for an action for a Chef Managed VNF, it
884    retrieves the corresponding template (based on **action** and
885    **VNF)** from its database and sets necessary values in the
886    “Environment”, “Node” and “NodeList” keys (if present) from either
887    the payload of the received action or internal data.
888
889 2. If “Environment” key is present in the updated template, it posts the
890    corresponding JSON dictionary to the appropriate Environment object
891    REST endpoint on the Chef Server thus updating the Environment
892    attributes on the Chef Server.
893
894 3. Next, it creates a Node Object from the “Node” JSON dictionary for
895    all elements listed in the NodeList (using the FQDN to construct the
896    endpoint) by replicating it  [2]_. As part of this process, it will
897    set the name field in each Node Object to the corresponding FQDN.
898    These node objects are then posted on the Chef Server to
899    corresponding Node Object REST endpoints to update the corresponding
900    node attributes.
901
902 4. If PushJobFlag is set to “True” in the template, ONAP requests a push
903    job against all the nodes in the NodeList to trigger
904    chef-client\ **.** It will not invoke any other command via the push
905    job. ONAP will include a callback URL in the push job request and a
906    unique Request Id. An example push job posted by ONAP is listed
907    below:
908
909 .. code-block:: java
910
911    {
912      "command": "chef-client",
913      "run\_timeout": 300,
914      "nodes”: [“node1.vnf\_a.onap.com”, “node2.vnf\_a.onap.com”],
915        "env": {
916                 “RequestId”:”8279-abcd-aksdj-19231”,
917                 “CallbackUrl”:”<callback>”
918               },
919    }
920
921 5. If CallbackCapable field in the template is not present or set to
922    “False” ONAP will poll the Chef Server to check completion status of
923    the push job.
924
925 6. If “GetOutputFlag” is set to “True” in the template and
926    CallbackCapable is not set to “True”, ONAP will retrieve any output
927    from each node where the push job has finished by accessing the Node
928    Object attribute node[‘PushJobOutput’].
929
930 Ansible Standards and Capabilities
931 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
932
933 ONAP will support configuration of VNFs via Ansible subject to the
934 requirements and guidelines defined in this section.
935
936 Ansible allows agentless management of VNFs/VMs/VNFCs via execution
937 of ‘playbooks’ over ssh. The ‘playbooks’ are a structured set of
938 tasks which contain all the necessary resources and execution capabilities
939 to take the necessary action on one or more target VMs (and/or VNFCs)
940 of the VNF. ONAP will utilize the framework of an Ansible Server that
941 will host all Ansible artifacts and run playbooks to manage VNFs that support
942 Ansible.
943
944 VNF Configuration via Ansible Requirements
945 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
946
947 Ansible Client Requirements
948 +++++++++++++++++++++++++++++
949
950 * R-32217 The xNF **MUST** have routable FQDNs that are reachable via
951   the Ansible Server for the endpoints (VMs) of a xNF on which playbooks
952   will be executed. ONAP will initiate requests to the Ansible Server
953   for invocation of playbooks against these end points [3]_.
954 * R-54373 The xNF **MUST** have Python >= 2.6 on the endpoint VM(s)
955   of a xNF on which an Ansible playbook will be executed.
956 * R-35401 The xNF **MUST** support SSH and allow SSH access by the
957   Ansible server for the endpoint VM(s) and comply with the Network
958   Cloud Service Provider guidelines for authentication and access.
959 * R-82018 The VNF **MUST** load the Ansible Server SSH public key onto VNF
960   VM(s) as part
961   of instantiation. This will allow the Ansible Server to authenticate
962   to perform post-instantiation configuration without manual intervention
963   and without requiring specific VNF login IDs and passwords.
964
965  CAUTION: For VNFs configured using Ansible, to eliminate the need
966  for manual steps, post-instantiation and pre-configuration, to upload
967  of SSH public keys, SSH public keys loaded during (heat) instantiation shall
968  be preserved and not removed by (heat) embedded (userdata) scripts.
969
970 * R-92866 The VNF **MUST** include as part of post-instantiation
971   configuration done by Ansible Playbooks the removal/update of SSH
972   public keys loaded through instantiation to support Ansible. This may
973   include download and install of new SSH public keys.
974 * R-91745 The VNF **MUST** update the Ansible Server and other entities
975   storing and using the SSH keys for authentication when the SSH keys used
976   by Ansible are regenerated/updated.
977
978   NOTE: Ansible Server itself may be used to upload new SSH public keys
979   onto supported VNFs.
980
981 Ansible Playbook Requirements
982 +++++++++++++++++++++++++++++++
983
984 An Ansible playbook is a collection of tasks that is executed on the
985 Ansible server (local host) and/or the target VM (s) in order to
986 complete the desired action.
987
988 * R-40293 The xNF **MUST** make available playbooks that conform
989   to the ONAP requirement.
990 * R-49396 The xNF **MUST** support each ONAP (APPC) xNF action
991   by invocation of **one** playbook [4]_. The playbook will be responsible
992   for executing
993   all necessary tasks (as well as calling other playbooks) to complete
994   the request.
995 * R-33280 The xNF **MUST NOT** use any instance specific parameters
996   in a playbook.
997 * R-48698 The xNF **MUST** utilize information from key value pairs
998   that will be provided by the Ansible Server as "extra-vars" during
999   invocation to execute the desired xNF action. If the playbook requires
1000   files, they must also be supplied using the methodology detailed in
1001   the Ansible Server API, unless they are bundled with playbooks, example,
1002   generic templates.
1003
1004 The Ansible Server will determine if a playbook invoked to execute a
1005 xNF action finished successfully or not using the “PLAY_RECAP” summary
1006 in Ansible log.  The playbook will be considered to successfully finish
1007 only if the “PLAY RECAP” section at the end of playbook execution output
1008 has no unreachable hosts and no failed tasks. Otherwise, the playbook
1009 will be considered to have failed.
1010
1011 * R-43253 The xNF **MUST** use playbooks designed to allow Ansible
1012   Server to infer failure or success based on the “PLAY_RECAP” capability.
1013   NOTE: There are cases where playbooks need to interpret results of a task
1014   and then determine success or failure and return result accordingly
1015   (failure for failed tasks).
1016 * R-50252 The xNF **MUST** write to a specific one text files that
1017   will be retrieved and made available by the Ansible Server if, as part
1018   of a xNF action (e.g., audit), a playbook is required to return any
1019   xNF information. The text files must be written in the same directory as
1020   the one from which the playbook is being executed. A text file must be
1021   created for the xNF playbook run targets/affects, with the name
1022   ‘<VNFname>_results.txt’ into which any desired output from each
1023   respective VM/xNF must be written.
1024 * R-51442 The xNF **SHOULD** use playbooks that are designed to
1025   automatically ‘rollback’ to the original state in case of any errors
1026   for actions that change state of the xNF (e.g., configure).
1027
1028  NOTE: In case rollback at the playbook level is not supported or possible,
1029  the xNF provider shall provide alternative locking mechanism (e.g., for a
1030  small xNF the rollback mechanism may rely on workflow to terminate and
1031  re-instantiate VNF VMs and then re-run playbook(s)). Backing up updated
1032  files also recommended to support rollback when soft rollback is feasible.
1033
1034 * R-58301 The VNF **SHOULD NOT** use playbooks that make requests to
1035   Cloud resources e.g. Openstack (nova, neutron, glance, heat, etc.);
1036   therefore, there is no use for Cloud specific variables like Openstack
1037   UUIDs in Ansible Playbooks.
1038
1039  Rationale: Flows that require interactions with Cloud services
1040  e.g. Openstack shall rely on workflows run by an Orchestrator
1041  (Change Management) or
1042  other capability (such as a control loop or Operations GUI) outside
1043  Ansible Server which can be executed by a Controller such as APPC.
1044  There are policies, as part of Control Loop models, that send remediation
1045  action requests to APPC; these are triggered as a response to an event
1046  or correlated events published to Event Bus.
1047
1048 * R-02651 The VNF **SHOULD** use the Ansible backup feature to save a
1049   copy of configuration files before implementing changes to support
1050   operations such as backing out of software upgrades, configuration
1051   changes or other work as this will help backing out of configuration
1052   changes when needed.
1053 * R-43353 The VNF **MUST** return control from Ansible Playbooks only
1054   after tasks are fully complete, signaling that the playbook completed
1055   all tasks. When starting services, return control only after all services
1056   are up. This is critical for workflows where the next steps are dependent
1057   on prior tasks being fully completed.
1058
1059  Detailed examples:
1060
1061  StopApplication Playbook – StopApplication Playbook shall return control
1062  and a completion status only after VNF application is fully stopped, all
1063  processes/services stopped.
1064  StartApplication Playbook – StartApplication Playbook shall return control
1065  and a completion status only after all VNF application services are fully up,
1066  all processes/services started and ready to provide services. NOTE: Start
1067  Playbook should not be declared complete/done after starting one or several
1068  processes that start the other processes.
1069
1070  HealthCheck Playbook:
1071
1072  SUCCESS – HealthCheck success shall be returned (return code 0) by a
1073  Playbook or Cookbook only when VNF is 100% healthy, ready to take requests
1074  and provide services, with all VNF required capabilities ready to provide
1075  services and with all active and standby resources fully ready with no
1076  open MINOR, MAJOR or CRITICAL alarms.
1077
1078  NOTE: In some cases, a switch may need to be turned on, but a VNF
1079  reported as healthy, should be ready to take service requests or be
1080  already processing service requests successfully.
1081
1082  A successful execution of a health-check playbook shall also create one
1083  file per VNF VM, named after the VNF instance name followed by
1084  “_results.txt (<vnf_instance>_results.txt) to indicate health-check was
1085  executed and completed successfully, example: vfdb9904v_results.txt,
1086  with the following contents:
1087
1088 .. code-block:: java
1089
1090   {
1091    "identifier": "VNF",
1092    "state": "healthy",
1093    "time": "2018-03-16:1139"
1094   }
1095
1096 Example:
1097
1098 .. code-block:: java
1099
1100   $ cat vfdb9904v_results.txt
1101   {
1102    "identifier": "VNF",
1103    "state": "healthy",
1104    "time": "2018-03-16:1139"
1105   }
1106 ..
1107
1108  FAILURE – A health check playbook shall return a non-zero return code in
1109  case VNF is not 100% healthy because one or more VNF application processes
1110  are stopped or not ready to take service requests or because critical or
1111  non-critical resources are not ready or because there are open MINOR, MAJOR
1112  or CRITICAL traps/alarms or because there are issues with the VNF that
1113  need attention even if they do not impact services provided by the VNF.
1114
1115  A failed health-check playbook shall also create one file per VNF,
1116  named after the VNF instance name, followed by
1117  “_results.txt to indicate health-check was executed and found issues
1118  in the health of the VNF. This is to differentiate from failure to
1119  run health-check playbook or playbook tasks to verify the health of the VNF,
1120  example: vfdb9904v_results.txt, with the following contents:
1121
1122 .. code-block:: java
1123
1124  {
1125   "identifier": "VNF",
1126   "state": "unhealthy",
1127   "info": "Error in following VM(s). Check hcstatus files under /tmp/ccfx9901v for details",
1128   "fault": [
1129     "vfdb9904vm001",
1130     "vfdb9904vm002"
1131   ],
1132   "time": "2018-03-16:4044"
1133  }
1134 ..
1135
1136  Example:
1137
1138 .. code-block:: java
1139
1140  $ cat vfdb9904v_results.txt
1141  {
1142   "identifier": "VNF",
1143   "state": "unhealthy",
1144   "info": "Error in following VM(s). Check hcstatus files under /tmp/ccfx9901v for details",
1145   "fault": [
1146     "vfdb9904vm001",
1147     "vfdb9904vm002"
1148   ],
1149   "time": "2018-03-16:4044"
1150  }
1151 ..
1152
1153  See `VNF REST APIs`_ for additional details on HealthCheck.
1154
1155 ONAP Controller / Ansible API Usage
1156 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1157
1158 This section outlines the workflow that ONAP Controller invokes when
1159 it receives an action request against an Ansible managed VNF.
1160
1161  #. When ONAP Controller receives a request for an action for an
1162     AnsibleManaged VNF, it retrieves the corresponding template (based
1163     on **action** and **VNF**) from its database and sets necessary
1164     values (such as an Id, NodeList, and EnvParameters) from either
1165     information in the request or data obtained from other sources.
1166     This is referred to as the payload that is sent as a JSON object
1167     to the Ansible server.
1168  #. The ONAP Controller sends a request to the Ansible server to
1169     execute the action.
1170  #. The ONAP Controller polls the Ansible Server for result (success
1171     or failure).  The ONAP Controllers has a timeout value which is
1172     contained in the template.   If the result is not available when the
1173     timeout is reached, the ONAP Controller stops polling and returns a
1174     timeout error to the requester.   The Ansible Server continues to
1175     process the request.
1176
1177
1178 Support of Controller Commands And Southbound Protocols
1179 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1180
1181 The following table summarizes the commands and possible protocols selected.
1182 Note that the HealthCheck can also be supported via REST.
1183
1184 Table 8. ONAP Controller APIs and NETCONF Commands
1185
1186 +-------------+--------------------+--------------------+--------------------+
1187 |**Command**  |**NETCONF Support** |**Chef Support**    |**Ansible**         |
1188 +=============+====================+====================+====================+
1189 |General      |For each RPC, the   |VNF Vendor must     |VNF Vendor must     |
1190 |Comments     |appropriate RPC     |provide any         |provide an Ansible  |
1191 |             |operation is listed.|necessary roles,    |playbook to retrieve|
1192 |             |                    |cookbooks, recipes  |the running         |
1193 |             |                    |to retrieve the     |configuration from a|
1194 |             |                    |running             |VNF and place the   |
1195 |             |                    |configuration from  |output on the       |
1196 |             |                    |a VNF and place it  |Ansible server in   |
1197 |             |                    |in the respective   |a manner aligned    |
1198 |             |                    |Node Objects        |with playbook       |
1199 |             |                    |‘PushJobOutput’     |requirements listed |
1200 |             |                    |attribute of all    |in this document.   |
1201 |             |                    |nodes in NodeList   |                    |
1202 |             |                    |when triggered      |The PlaybookName    |
1203 |             |                    |by a chef-client    |must be provided    |
1204 |             |                    |run.                |in the JSON file.   |
1205 |             |                    |                    |                    |
1206 |             |                    |The JSON file for   |NodeList must list  |
1207 |             |                    |this VNF action is  |IP addresses or DNS |
1208 |             |                    |required to set     |supported FQDNs of  |
1209 |             |                    |“PushJobFlag” to    |an example VNF      |
1210 |             |                    |“True” and          |on which to         |
1211 |             |                    |“GetOutputFlag” to  |execute playbook.   |
1212 |             |                    |“True”. The “Node”  |                    |
1213 |             |                    |JSON dictionary     |                    |
1214 |             |                    |must have the run   |                    |
1215 |             |                    |list populated      |                    |
1216 |             |                    |with the necessary  |                    |
1217 |             |                    |sequence of roles,  |                    |
1218 |             |                    |cookbooks, recipes. |                    |
1219 |             |                    |                    |                    |
1220 |             |                    |The Environment     |                    |
1221 |             |                    |and Node values     |                    |
1222 |             |                    |should contain all  |                    |
1223 |             |                    |appropriate         |                    |
1224 |             |                    |configuration       |                    |
1225 |             |                    |attributes.         |                    |
1226 |             |                    |                    |                    |
1227 |             |                    |NodeList must       |                    |
1228 |             |                    |list sample FQDNs   |                    |
1229 |             |                    |that are required to|                    |
1230 |             |                    |conduct a           |                    |
1231 |             |                    |chef-client run for |                    |
1232 |             |                    |this VNF Action.    |                    |
1233 +-------------+--------------------+--------------------+--------------------+
1234 |Audit        |The <get-config> is |Supported via a     |Supported via a     |
1235 |             |used to return the  |cookbook that       |playbook that       |
1236 |             |running             |returns the running |returns the running |
1237 |             |configuration.      |configuration.      |configuration.      |
1238 +-------------+--------------------+--------------------+--------------------+
1239 |Configure,   |The <edit-config>   |Supported via a     |Supported via a     |
1240 |ModifyConfig |operation loads all |cookbook that       |playbook that       |
1241 |             |or part of a        |updates the VNF     |updates the VNF     |
1242 |             |specified data set  |configuration.      |configuration.      |
1243 |             |to the specified    |                    |                    |
1244 |             |target database. If |                    |                    |
1245 |             |there is no         |                    |                    |
1246 |             |<candidate/>        |                    |                    |
1247 |             |database, then the  |                    |                    |
1248 |             |target is the       |                    |                    |
1249 |             |<running/> database.|                    |                    |
1250 |             |A <commit> follows. |                    |                    |
1251 +-------------+--------------------+--------------------+--------------------+
1252 |Other        |This command has no |Supported via a     |Supported via a     |
1253 |Configuration|existing NETCONF RPC|cookbook that       |playbook that       |
1254 |Commands     |action.             |performs            |performs            |
1255 |             |                    |the action.         |the action.         |
1256 +-------------+--------------------+--------------------+--------------------+
1257 |Lifecycle    |This command has no |Supported via a     |Supported via a     |
1258 |Management   |existing NETCONF RPC|cookbook that       |playbook that       |
1259 |Commands     |action.             |performs            |performs            |
1260 |             |                    |the action.         |the action.         |
1261 +-------------+--------------------+--------------------+--------------------+
1262 |Health Check |This command has no |Supported via a     |Supported           |
1263 |             |existing NETCONF RPC|cookbook            |via a               |
1264 |             |action.             |that                |playbook            |
1265 |             |                    |performs            |that                |
1266 |             |                    |a HealthCheck and   |performs            |
1267 |             |                    |returns the results.|the                 |
1268 |             |                    |                    |HealthCheck         |
1269 |             |                    |                    |and returns         |
1270 |             |                    |                    |the                 |
1271 |             |                    |                    |results.            |
1272 +-------------+--------------------+--------------------+--------------------+
1273
1274 Monitoring & Management
1275 --------------------------------------------------
1276
1277 This section addresses data collection and event processing
1278 functionality that is directly dependent on the interfaces
1279 provided by the VNFs’ APIs. These can be in the form of asynchronous
1280 interfaces for event, fault notifications, and autonomous data streams.
1281 They can also be synchronous interfaces for on-demand requests to
1282 retrieve various performance, usage, and other event information.
1283
1284 The target direction for VNF interfaces is to employ APIs that are
1285 implemented utilizing standardized messaging and modeling protocols
1286 over standardized transports. Migrating to a virtualized environment
1287 presents a tremendous opportunity to eliminate the need for proprietary
1288 interfaces for VNF provider equipment while removing the traditional
1289 boundaries between Network Management Systems and Element Management
1290 Systems. Additionally, VNFs provide the ability to instrument the
1291 networking applications by creating event records to test and monitor
1292 end-to-end data flow through the network, similar to what physical or
1293 virtual probes provide without the need to insert probes at various
1294 points in the network. The VNF providers must be able to provide the
1295 aforementioned set of required data directly to the ONAP collection
1296 layer using standardized interfaces.
1297
1298 Data Model for Event Records
1299 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1300
1301 This section describes the data model for the collection of telemetry
1302 data from VNFs by Service Providers (SPs) to manage VNF health and
1303 runtime lifecycle. This data model is referred to as the VNF Event
1304 Streaming (VES) specifications. While this document is focused on
1305 specifying some of the records from the ONAP perspective, there may
1306 be other external bodies using the same framework to specify additional
1307 records. For example, OPNFV has a VES project that is looking to specify
1308 records for OpenStack’s internal telemetry to manage Application (VNFs),
1309 physical and virtual infrastructure (compute, storage, network devices),
1310 and virtual infrastructure managers (cloud controllers, SDN controllers).
1311 Note that any configurable parameters for these data records (e.g.,
1312 frequency, granularity, policy-based configuration) will be managed
1313 using the “Configuration” framework described in the prior sections
1314 of this document.
1315
1316 The Data Model consists of:
1317
1318 -  Common Header Record: This data structure precedes each of the
1319    Technology Independent and Technology Specific records sections of
1320    the data model.
1321
1322 -  Technology Independent Records: This version of the document
1323    specifies the model for Fault, Heartbeat, State Change, Syslog,
1324    Threshold Crossing Alerts, and VNF Scaling* (short for
1325    measurementForVfScalingFields – actual name used in JSON
1326    specification) records. In the future, these may be extended to
1327    support other types of technology independent records. Each of
1328    these records allows additional fields (name/ value pairs) for
1329    extensibility. The VNF provider can use these VNF Provider-specific
1330    additional fields to provide additional information that may be
1331    relevant to the managing systems.
1332
1333 -  Technology Specific Records: This version of the document specifies
1334    the model for Mobile Flow records, Signaling and Voice Quality records.
1335    In the future, these may be extended to support other types of records
1336    (e.g. Network Fabric, Security records, etc.). Each of these records
1337    allows additional fields (name/value pairs) for extensibility. The VNF
1338    providers can use these VNF-specific additional fields to provide
1339    additional information that may be relevant to the managing systems.
1340    A placeholder for additional technology specific areas of interest to
1341    be defined in the future documents has been depicted.
1342
1343 |image0|
1344
1345 Figure 1. Data Model for Event Records
1346
1347 Event Records - Data Structure Description
1348 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1349
1350 The data structure for event records consists of:
1351
1352 -  a Common Event Header block;
1353
1354 -  zero or more technology independent domain blocks; and
1355
1356    -  e.g., Fault domain, State Change domain, Syslog domain, etc.
1357
1358 -  zero or more technology specific domain blocks.
1359
1360    -  e.g., Mobile Flow domain, Signaling domain, Voice Quality domain,
1361       etc.
1362
1363 Common Event Header
1364 ~~~~~~~~~~~~~~~~~~~~~
1365
1366 The common header that precedes any of the domain-specific records contains
1367 information identifying the type of record to follow, information about
1368 the sender and other identifying characteristics related to timestamp,
1369 sequence number, etc.
1370
1371 Technology Independent Records – Fault Fields
1372 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1373
1374 The Fault Record, describing a condition in the Fault domain, contains
1375 information about the fault such as the entity under fault, the
1376 severity, resulting status, etc.
1377
1378 Technology Independent Records – Heartbeat Fields
1379 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1380
1381 The Heartbeat Record provides an optional structure for communicating
1382 information about heartbeat or watchdog signaling events.  It can
1383 contain information about service intervals, status information etc.
1384 as required by the heartbeat implementation.
1385
1386 Note: Heartbeat records would only have the Common Event Header block.
1387 An optional heartbeat domain is available if required by the heartbeat
1388 implementation.
1389
1390 Technology Independent Records – State Change Fields
1391 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1392
1393 The State Change Record provides a structure for communicating information
1394 about data flow through the VNF. It can contain information about state
1395 change related to physical device that is reported by VNF. As an example,
1396 when cards or port name of the entity that has changed state.
1397
1398 Technology Independent Records – Syslog Fields
1399 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1400
1401 The Syslog Record provides a structure for communicating any type of
1402 information that may be logged by the VNF. It can contain information
1403 about system internal events, status, errors, etc.
1404
1405 Technology Independent Records – Threshold Crossing Alert Fields
1406 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1407
1408 The Threshold Crossing Alert (TCA) Record provides a structure for
1409 communicating information about threshold crossing alerts. It can
1410 contain alert definitions and types, actions, events, timestamps
1411 and physical or logical details.
1412
1413 Technology Independent Records - VNF Scaling Fields
1414 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1415
1416 The VNF Scaling\* (short for measurementForVfScalingFields –
1417 actual name used in JSON specification) Record contains information
1418 about VNF and VNF resource structure and its condition to help in
1419 the management of the resources for purposes of elastic scaling.
1420
1421 Technology Independent Records – otherFields
1422 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1423
1424 The otherFields Record defines fields for events belonging to the
1425 otherFields domain of the Technology Independent domain enumeration.
1426 This record provides a mechanism to convey a complex set of fields
1427 (possibly nested or opaque) and is purely intended to address
1428 miscellaneous needs such as addressing time-to-market considerations
1429 or other proof-of-concept evaluations. Hence, use of this record
1430 type is discouraged and should be minimized.
1431
1432 Technology Specific Records – Mobile Flow Fields
1433 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1434
1435 The Mobile Flow Record provides a structure for communicating
1436 information about data flow through the VNF. It can contain
1437 information about connectivity and data flows between serving
1438 elements for mobile service, such as between LTE reference points, etc.
1439
1440 Technology Specific Records – Signaling Fields
1441 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1442
1443 The Signaling Record provides a structure for communicating information
1444 about signaling messages, parameters and signaling state.  It can
1445 contain information about data flows for signaling and controlling
1446 multimedia communication sessions such as voice and video calls.
1447
1448 Technology Specific Records – Voice Quality Fields
1449 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1450 The Voice Quality Record provides a structure for communicating information
1451 about voice quality statistics including media connection information,
1452 such as transmitted octet and packet counts, packet loss, packet delay
1453 variation, round-trip delay, QoS parameters and codec selection.
1454
1455 Technology Specific Records – Future Domains
1456 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1457
1458 The futureDomains Record is a placeholder for additional technology
1459 specific areas of interest that will be defined and described
1460 in the future documents.
1461
1462 Data Structure Specification of the Event Record
1463 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1464
1465 For additional information on the event record formats of the data
1466 structures mentioned above, please refer to `VES Event
1467 Listener <https://github.com/att/evel-test-collector/tree/master/docs/att_interface_definition>`__.
1468
1469 Transports and Protocols Supporting Resource Interfaces
1470 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1471
1472 Delivery of data from VNFs to ONAP must use the common transport
1473 mechanisms and protocols for all VNFs as defined in this document.
1474 Transport mechanisms and protocols have been selected to enable both
1475 high volume and moderate volume datasets, as well as asynchronous and
1476 synchronous communications over secure connections. The specified
1477 encoding provides self-documenting content, so data fields can be
1478 changed as needs evolve, while minimizing changes to data delivery.
1479
1480 The term ‘Event Record’ is used throughout this document to represent
1481 various forms of telemetry or instrumentation made available by the
1482 VNF including, faults, status events, various other types of VNF
1483 measurements and logs. Headers received by themselves must be used
1484 as heartbeat indicators. Common structures and delivery protocols for
1485 other types of data will be given in future versions of this document
1486 as we get more insight into data volumes and required processing.
1487
1488 In the following sections, we provide options for encoding, serialization
1489 and data delivery. Agreements between Service Providers and VNF providers
1490 shall determine which encoding, serialization and delivery method to use
1491 for particular data sets. The selected methods must be agreed to prior to
1492 the on-boarding of the VNF into ONAP design studio.
1493
1494 VNF Telemetry using VES/JSON Model
1495 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1496
1497 The preferred model for data delivery from a VNF to ONAP DCAE is
1498 the JSON driven model as depicted in Figure 2.
1499
1500 |image1|
1501
1502 Figure 2. VES/JSON Driven Model
1503
1504 VNF providers will provide a YAML artifact to the Service Provider
1505 that describes:
1506
1507 * standard VES/JSON model information elements (key/values) that
1508   the VNF provides
1509 * any additional non-standard (custom) VES/JSON model information
1510   elements (key/values) that the VNF provides
1511
1512 Using the semantics and syntax supported by YAML, VNF providers
1513 will indicate specific conditions that may arise, and recommend
1514 actions that should be taken at specific thresholds, or if specific
1515 conditions repeat within a specified time interval.
1516
1517 Based on the VNF provider's recommendations, the Service Provider may
1518 create additional YAML artifacts (using ONAP design Studio), which
1519 finalizes Service Provider engineering rules for the processing of
1520 the VNF events.  The Service Provider may alter the threshold levels
1521 recommended by the VNF providor, and may modify and more clearly
1522 specify actions that should be taken when specified conditions arise.
1523 The Service Provider-created version of the YAML artifact will be
1524 distributed to ONAP applications by the Design framework.
1525
1526 VNF Telemetry using YANG Model
1527 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1528
1529 In addition to the JSON driven model described above, a YANG
1530 driven model can also be supported, as depicted in Figure 3.
1531
1532 |image2|
1533
1534 Figure 3. YANG Driven Model
1535
1536 VNF providers will provide to the Service Provider the following
1537 YANG model artifacts:
1538
1539 * common IETF YANG modules that support the VNF
1540 * native (VNF provider-supplied) YANG modules that support the VNF
1541 * open (OpenConfig) YANG modules and the following
1542   configuration-related information, including:
1543
1544   * telemetry configuration and operational state data; such as:
1545
1546     * sensor paths
1547     * subscription bindings
1548     * path destinations
1549     * delivery frequency
1550     * transport mechanisms
1551     * data encodings
1552
1553 * a YAML artifact that provides all necessary mapping relationships
1554   between YANG model data types to VES/JSON information elements
1555 * YANG helper or decoder functions that automate the conversion between
1556   YANG model data types to VES/JSON information elements
1557 * OPTIONAL: YANG Telemetry modules in JSON format per RFC 7951
1558
1559 Using the semantics and syntax supported by YANG, VNF providers
1560 will indicate specific conditions that may arise, and recommend
1561 actions that should be taken at specific thresholds, or if specific
1562 conditions repeat within a specified time interval.
1563
1564 Based on the VNF provider's recommendations, the Service Provider may
1565 create additional YAML artifacts (using ONAP design Studio), which
1566 finalizes Service Provider engineering rules for the processing of the
1567 VNF events.  The Service Provider may alter the threshold levels recommended
1568 by the VNF provider, and may modify and more clearly specify actions that
1569 should be taken when specified conditions arise.  The Service
1570 Provided-created version of the YAML will be distributed to ONAP
1571 applications by the Design framework.
1572
1573 Note: While supporting the YANG model described above, we are still
1574 leveraging the VES JSON based model in DCAE.  The purpose of the
1575 diagram above is to illustrate the concept only and not to imply a
1576 specific implementation.
1577
1578 VNF Telemetry using Google Protocol Buffers
1579 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1580
1581 In addition to the data delivery models described above, support for
1582 delivery of VNF telemetry using Google Protocol Buffers (GPB) can
1583 also be supported, as depicted in Figure 4.
1584
1585 VNF providers will provide to the Service Provider the additional
1586 following artifacts to support the delivery of VNF telemetry to DCAE
1587 via the open-source gRPC mechanism using Google's Protocol Buffers:
1588
1589 * the YANG model artifacts described in support of the
1590   "VNF Telemetry using YANG Model"
1591 * valid definition file(s) for all GPB / KV-GPB encoded messages
1592 * valid definition file(s) for all gRPC services
1593 * gRPC method parameters and return types specified as Protocol
1594   Buffers messages
1595
1596 |image3|
1597
1598 Figure 4. Protocol Buffers Driven Model
1599
1600 Note: if Google Protocol Buffers are employed for delivery of VNF
1601 telemetry, Key-Value Google Protocol Buffers (KV-GPB) is the
1602 preferred serialization method.  Details of specifications and
1603 versioning corresponding to a release can be found at:
1604 `VES Event Listener <https://github.com/att/evel-test-collector/tree/master/docs/att_interface_definition>`__.
1605
1606 Note: While supporting the VNF telemetry delivery approach described above,
1607 we are still leveraging the VES JSON based model in DCAE.  The purpose of
1608 the diagram above is to illustrate the concept only and not to imply a
1609 specific implementation.
1610
1611 Monitoring & Management Requirements
1612 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1613
1614 VNF telemetry via standardized interface
1615 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1616
1617 * R-51910 The xNF **MUST** provide all telemetry (e.g., fault event
1618   records, syslog records, performance records etc.) to ONAP using the
1619   model, format and mechanisms described in this section.
1620
1621 Encoding and Serialization
1622 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
1623
1624 Content delivered from VNFs to ONAP is to be encoded and serialized using JSON:
1625
1626 JSON
1627 ~~~~~~~~~~~~~~~~~~
1628
1629 * R-19624 The xNF **MUST** encode and serialize content delivered to ONAP using JSON (RFC 7159) plain text format. High-volume data
1630   is to be encoded and serialized using `Avro <http://avro.apache.org/>`_, where the Avro [5]_ data format are described using JSON.
1631
1632   - JSON plain text format is preferred for moderate volume data sets
1633     (option 1), as JSON has the advantage of having well-understood simple
1634     processing and being human-readable without additional decoding. Examples
1635     of moderate volume data sets include the fault alarms and performance
1636     alerts, heartbeat messages, measurements used for xNF scaling and syslogs.
1637   - Binary format using Avro is preferred for high volume data sets
1638     (option 2) such as mobility flow measurements and other high-volume
1639     streaming events (such as mobility signaling events or SIP signaling)
1640     or bulk data, as this will significantly reduce the volume of data
1641     to be transmitted. As of the date of this document, all events are
1642     reported using plain text JSON and REST.
1643   - Avro content is self-documented, using a JSON schema. The JSON schema is
1644     delivered along with the data content
1645     (http://avro.apache.org/docs/current/ ). This means the presence and
1646     position of data fields can be recognized automatically, as well as the
1647     data format, definition and other attributes. Avro content can be
1648     serialized as JSON tagged text or as binary. In binary format, the
1649     JSON schema is included as a separate data block, so the content is
1650     not tagged, further compressing the volume. For streaming data, Avro
1651     will read the schema when the stream is established and apply the
1652     schema to the received content.
1653
1654 In addition to the preferred method (JSON), content can be delivered
1655 from xNFs to ONAP can be encoded and serialized using Google Protocol
1656 Buffers (GPB).
1657
1658 KV-GPB/GPB
1659 ~~~~~~~~~~~~~~~~~~
1660
1661 Telemetry data delivered using Google Protocol Buffers v3 (proto3)
1662 can be serialized in one of the following methods:
1663
1664 * Key-value Google Protocol Buffers (KV-GPB) is also known as
1665   self-describing GPB:
1666
1667   * keys are strings that correspond to the path of the system
1668     resources for the VNF being monitored.
1669   * values correspond to integers or strings that identify the
1670     operational state of the VNF resource, such a statistics counters
1671     and the state of a VNF resource.
1672
1673 * VNF providers must supply valid KV-GPB definition file(s) to allow
1674   for the decoding of all KV-GPB encoded telemetry messages.
1675
1676 * Native Google Protocol Buffers (GPB) is also known as compact GPB:
1677
1678   * keys are represented as integers pointing to the system resources for
1679     the VNF being monitored.
1680   * values correspond to integers or strings that identify the operational
1681     state of the VNF resource, such a statistics counters and the state
1682     of a VNF resource.
1683
1684 * Google Protocol Buffers (GPB) requires metadata in the form of .proto
1685   files. VNF providers must supply the necessary GPB .proto files such that
1686   GPB telemetry messages can be encoded and decoded.
1687
1688 * In the future, we may consider support for other types of
1689   encoding & serialization methods based on industry demand.
1690
1691
1692 Reporting Frequency
1693 ~~~~~~~~~~~~~~~~~~~~~
1694
1695 * R-98191 The xNF **MUST** vary the frequency that asynchronous data
1696   is delivered based on the content and how data may be aggregated or
1697   grouped together. For example, alarms and alerts are expected to be
1698   delivered as soon as they appear. In contrast, other content, such as
1699   performance measurements, KPIs or reported network signaling may have
1700   various ways of packaging and delivering content. Some content should
1701   be streamed immediately; or content may be monitored over a time interval,
1702   then packaged as collection of records and delivered as block; or data
1703   may be collected until a package of a certain size has been collected;
1704   or content may be summarized statistically over a time interval, or
1705   computed as a KPI, with the summary or KPI being delivered.
1706
1707   - We expect the reporting frequency to be configurable depending
1708     on the virtual network function’s needs for management. For example,
1709     Service Provider may choose to vary the frequency of collection between
1710     normal and trouble-shooting scenarios.
1711   - Decisions about the frequency of data reporting will affect the
1712     size of delivered data sets, recommended delivery method, and how the
1713     data will be interpreted by ONAP. These considerations should not
1714     affect deserialization and decoding of the data, which will be guided
1715     by the accompanying JSON schema or GPB definition files.
1716
1717 Addressing and Delivery Protocol
1718 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1719
1720 ONAP destinations can be addressed by URLs for RESTful data PUT. Future
1721 data sets may also be addressed by host name and port number for TCP
1722 streaming, or by host name and landing zone directory for SFTP transfer
1723 of bulk files.
1724
1725 * R-88482 The xNF **SHOULD** use REST using HTTPS delivery of plain
1726   text JSON for moderate sized asynchronous data sets, and for high
1727   volume data sets when feasible.
1728 * R-84879 The xNF **MUST** have the capability of maintaining a primary
1729   and backup DNS name (URL) for connecting to ONAP collectors, with the
1730   ability to switch between addresses based on conditions defined by policy
1731   such as time-outs, and buffering to store messages until they can be
1732   delivered. At its discretion, the service provider may choose to populate
1733   only one collector address for a xNF. In this case, the network will
1734   promptly resolve connectivity problems caused by a collector or network
1735   failure transparently to the xNF.
1736 * R-81777 The VNF **MUST** be configured with initial address(es) to use
1737   at deployment time. Subsequently, address(es) may be changed through
1738   ONAP-defined policies delivered from ONAP to the VNF using PUTs to a
1739   RESTful API, in the same manner that other controls over data reporting
1740   will be controlled by policy.
1741 * R-08312 The xNF **MAY** use other options which are expected to include:
1742
1743   - REST delivery of binary encoded data sets.
1744   - TCP for high volume streaming asynchronous data sets and for other
1745     high volume data sets. TCP delivery can be used for either
1746     JSON or binary encoded data sets.
1747   - SFTP for asynchronous bulk files, such as bulk files that contain
1748     large volumes of data collected over a long time interval or data
1749     collected across many xNFs. This is not preferred. Preferred is to
1750     reorganize the data into more frequent or more focused data sets, and
1751     deliver these by REST or TCP as appropriate.
1752   - REST for synchronous data, using RESTCONF (e.g., for xNF state polling).
1753
1754 * R-03070 The xNF **MUST**, by ONAP Policy, provide the ONAP addresses
1755   as data destinations for each xNF, and may be changed by Policy while
1756   the xNF is in operation. We expect the xNF to be capable of redirecting
1757   traffic to changed destinations with no loss of data, for example from
1758   one REST URL to another, or from one TCP host and port to another.
1759
1760 Asynchronous and Synchronous Data Delivery
1761 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1762
1763 * R-06924 The xNF **MUST** deliver asynchronous data as data becomes
1764   available, or according to the configured frequency.
1765 * R-73285 The xNF **MUST** must encode, address and deliver the data
1766   as described in the previous paragraphs.
1767 * R-42140 The xNF **MUST** respond to data requests from ONAP as soon
1768   as those requests are received, as a synchronous response.
1769 * R-34660 The xNF **MUST** use the RESTCONF/NETCONF framework used by
1770   the ONAP configuration subsystem for synchronous communication.
1771 * R-86585 The VNF **MUST** use the YANG configuration models and RESTCONF
1772   [RFC8040] (https://tools.ietf.org/html/rfc8040).
1773 * R-11240 The xNF **MUST** respond with content encoded in JSON, as
1774   described in the RESTCONF specification. This way the encoding of a
1775   synchronous communication will be consistent with Avro.
1776 * R-70266 The xNF **MUST** respond to an ONAP request to deliver the
1777   current data for any of the record types defined in
1778   `Event Records - Data Structure Description`_ by returning the requested
1779   record, populated with the current field values. (Currently the defined
1780   record types include fault fields, mobile flow fields, measurements for
1781   xNF scaling fields, and syslog fields. Other record types will be added
1782   in the future as they become standardized and are made available.)
1783 * R-46290 The xNF **MUST** respond to an ONAP request to deliver granular
1784   data on device or subsystem status or performance, referencing the YANG
1785   configuration model for the xNF by returning the requested data elements.
1786 * R-43327 The xNF **SHOULD** use `Modeling JSON text with YANG
1787   <https://tools.ietf.org/html/rfc7951>`_, If YANG models need to be
1788   translated to and from JSON{RFC7951]. YANG configuration and content can
1789   be represented via JSON, consistent with Avro, as described in “Encoding
1790   and Serialization” section.
1791
1792 Security
1793 ~~~~~~~~~~
1794
1795 * R-42366 The xNF **MUST** support secure connections and transports such as
1796   Transport Layer Security (TLS) protocol
1797   [`RFC5246 <https://tools.ietf.org/html/rfc5246>`_] and should adhere to
1798   the best current practices outlined in
1799   `RFC7525 <https://tools.ietf.org/html/rfc7525>`_.
1800 * R-44290 The xNF **MUST** control access to ONAP and to xNFs, and creation
1801   of connections, through secure credentials, log-on and exchange mechanisms.
1802 * R-47597 The xNF **MUST** carry data in motion only over secure connections.
1803 * R-68165 The xNF **MUST** encrypt any content containing Sensitive Personal
1804   Information (SPI) or certain proprietary data, in addition to applying the
1805   regular procedures for securing access and delivery.
1806
1807
1808 .. [1]
1809    https://github.com/mbj4668/pyang
1810
1811 .. [2]
1812    Recall that the Node Object **is required** to be identical across
1813    all VMs of a VNF invoked as part of the action except for the “name”.
1814
1815 .. [3]
1816    Upstream elements must provide the appropriate FQDN in the request to
1817    ONAP for the desired action.
1818
1819 .. [4]
1820    Multiple ONAP actions may map to one playbook.
1821
1822 .. [5]
1823    This option is not currently supported in ONAP and it is currently
1824    under consideration.
1825
1826 .. [6]
1827    https://wiki.opnfv.org/display/PROJ/VNF+Event+Stream
1828
1829 .. |image0| image:: Data_Model_For_Event_Records.png
1830       :width: 7in
1831       :height: 8in
1832
1833
1834 .. |image1| image:: VES_JSON_Driven_Model.png
1835       :width: 5in
1836       :height: 3in
1837
1838 .. |image2| image:: YANG_Driven_Model.png
1839       :width: 5in
1840       :height: 3in
1841
1842 .. |image3| image:: Protocol_Buffers_Driven_Model.png
1843       :width: 4.74in
1844       :height: 3.3in