blob: 34aa43df539eb7cfb17d57d47276d7d1edf0d96b [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
3.. Copyright (C) 2021 Pantheon.tech
4.. Copyright (C) 2024 TechMahindra Ltd.
5.. _cpsDelta:
6
7.. toctree::
8 :maxdepth: 1
9
10CPS Delta Feature
11#################
12
13- The concept of CPS Delta Feature is to have the ability to find the delta or difference between two configurations stored in CPS DB.
14
15- The Delta feature brings a new functionality:
16
17 - Ability to find the delta between the configurations stored in two anchors within the same dataspace.
18
19The calculated differences can then be used to generate a Delta Report which can be sent over the Kafka Notification Service to the user.
20
21Delta Report Format
22-------------------
23
24The Delta Report is based on the RFC 9144, which defines a set of parameters to be included in the Delta Report. In CPS only the relevant parameters defined in RFC 9144 are used. These include:
Arpit Singh3c8539c2024-09-04 11:02:06 +053025 - **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 '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.
31
32Mechanism for Delta generation
33------------------------------
34
35.. image:: _static/cps-delta-mechanism.png
36 :alt: Mechanism for Delta generation
37
38Endpoints provided as part of Delta Feature
39-------------------------------------------
40
41.. toctree::
42 :maxdepth: 1
43
44 cps-delta-endpoints.rst