...
- The delta feature can be used to compare the configuration of two nodes on a network over time (for example configuration changes over days). This can then be used
- to identify the cause of configuration change
- and if the configuration change causes any problems, the delta report can help identify the issue.
- A reference configuration can be stored in an anchor, and a copy/snapshot of this reference configuration can then be further modified by other users. Hence the user will always have a reference configuration which they can be sure of is free of any known issues.
The delta of the reference configuration and modified configuration can then be used to rectify problems with a node configuration.- If the changes to the configuration lead to any problems, the users can generate the delta to identify the problems and if required the users can fix the issues with configuration changes or rollback the changes to the reference configuration.
- It can even be used to monitor unwanted deviations in some configuration values.
- Configuration from one node can be used to deploy other nodes. Or as stated above a reference configuration can be used to deploy multiple different nodes.
API Implementation
RESTful API implementation proposed as below to find out delta configuration between two anchors for a given dataspace, cps-path and descendants.
API : GET http://localhost:8080/v2/{dataspace-name}/anchors/{anchor-name}/delta?xpath={xpath}&descendants={descendants}?compareWithAnchor={anchor-name}
Request parameters:
...
Response Body: Response body should contain anchors delta report (added/deleted/modified configuration) as below.
[
{"action": "ADD", "xpath":"/bookstore/categories/[@code=3]", "payload":{"code":3,"name":"kidz"}},
{"action": "DELETE", "xpath":"/bookstore/categories/[@code=1]", "payload":{"code":1,"name":"Fiction"}},
{"action": "UPDATE", "xpath":"/bookstore/categories/[@code=2]", "payload":{"name":"Comic"}}
]
Below is explanation about the delta reporting mechanism.
Points from initial discussion
...