blob: ee3df45378d8f08c24bf69bfda7809afca58285d [file] [log] [blame]
Arpit Singhc45db422024-01-30 10:51:28 +05301.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
Arpit Singhc45db422024-01-30 10:51:28 +05303.. Copyright (C) 2024 TechMahindra Ltd.
4.. _cpsDelta:
5
6.. toctree::
7 :maxdepth: 1
8
9CPS Delta Feature
10#################
11
Arpit Singh04094542024-05-06 20:12:52 +053012- The concept of CPS Delta Feature is to have the ability to find the delta or difference between two configurations in CPS.
Arpit Singhc45db422024-01-30 10:51:28 +053013
Arpit Singh04094542024-05-06 20:12:52 +053014- The Delta feature provides two new endpoints, providing the following functionalities:
Arpit Singhc45db422024-01-30 10:51:28 +053015
16 - Ability to find the delta between the configurations stored in two anchors within the same dataspace.
Arpit Singh04094542024-05-06 20:12:52 +053017 - Ability to find the delta between the configurations stored under an anchor and a JSON payload provided as part of REST request.
Arpit Singhc45db422024-01-30 10:51:28 +053018
Arpit Singh04094542024-05-06 20:12:52 +053019The difference found are compiled into a Delta Report returned by the server. This report can be used in several different ways, one such use case is sending it over the Kafka Notification Service to the user.
Arpit Singhc45db422024-01-30 10:51:28 +053020
21Delta Report Format
22-------------------
23
Arpit Singh04094542024-05-06 20:12:52 +053024The Delta Report is based on the RFC 6902 and RFC 9144, which define a set of parameters to be included in the Delta Report. In CPS only the relevant parameters defined in the RFCs are used. These include:
25 - **action:** This parameter defines how the data nodes changed between two configurations. If data nodes are added, deleted or modified then the 'action' parameter in the delta report will be set to one of the following pre-defined operation values, i.e., 'create', 'remove' or 'replace' respectively for each data node.
Arpit Singhc45db422024-01-30 10:51:28 +053026 - **xpath:** This parameter will provide the xpath of each data node that has been either added, deleted or modified.
Arpit Singh3c8539c2024-09-04 11:02:06 +053027 - **source-data:** this parameter is added to the delta report when a data node is removed or updated, this represents the source/reference data against which the delta is being generated. In case of newly added data node this field is not included in the delta report.
28 - **target-data:** this parameter is added to the delta report when a data node is added or updated, this represents the data values that are being compared to the source data. In case of a data node being removed this field is not included in the delta report.
Arpit Singhc45db422024-01-30 10:51:28 +053029
30**Note.** In case of an existing data node being modified, both the source-data and target-data fields are present in the delta report.
Arpit Singh04094542024-05-06 20:12:52 +053031**Additional Information.** `Analysis of RFC 9144 and RFC 6902 for Delta Report generation <https://lf-onap.atlassian.net/wiki/spaces/DW/pages/16523520/Analysis+of+RFC+9144+and+RFC6902+for+Delta+Report+generation>`_
Arpit Singhc45db422024-01-30 10:51:28 +053032
33Mechanism for Delta generation
34------------------------------
35
36.. image:: _static/cps-delta-mechanism.png
37 :alt: Mechanism for Delta generation
38
39Endpoints provided as part of Delta Feature
40-------------------------------------------
41
42.. toctree::
43 :maxdepth: 1
44
45 cps-delta-endpoints.rst