RFC 9144 makes use of the fact that 2 new datastores have been defined in NMDA. These include:\
- <intended>: which contains validated configuration data that a client application intends to be in effect
- <operational>: which contains operational state data as well as configuration data that is actually in effect.
Intention of RFC 9144
RFC 9144 YANG data model that defines RPCs intended to be used in conjunction with NETCONF [RFC6241] or RESTCONF [RFC8040]. These RPCs allow a client to request a server to compare two NMDA datastores and report any differences.
RFC 9144 Data Model and the current approach of CPS Delta
The core of the RFC 9144 solution is a new management operation, <compare>, that compares the data tree contents of two datastores. The operation checks whether there are any differences in values or in data nodes that are contained in either datastore and returns any differences as output. The output is returned in the format specified in YANG Patch [RFC8072].
The current approach to Delta report generation follows the JSON patch format to report the delta as described in RFC6902. A JSON Patch document represents an array of objects, where each object contains exactly one operation, path and associated values. The operation can have following values: add, remove, replace, move, copy and test. The path represents the JSON patrh and the values contain the difference in source and target values.
Example JSON Patch document, transferred in an HTTP PATCH request:
RFC 9144 Overview and example of RESTCONF
The YANG data model defines the <compare> operation as a new RPC. The operation takes the following input parameters:
- source: the source or reference datastore
- target: the datastore to be compared against the source datastore
- filter-spec: a xpath based filter to specify the data nodes to be compared in a given datastore. This allows a comparison operation to be applied only to a specific part of the datastore that is of interest, such as a particular subtree.
- all: When set, this parameter indicates that all differences should be included, including differences pertaining to schema nodes that exist in only one of the datastores. When this parameter is not included, a prefiltering step is automatically applied to exclude data from the comparison that does not pertain to both datastores.
- report-origin: this parameter is used to indicate whether to include origin or source data in delta report or not.
The operation provides the following output parameters:
- differences: This parameter contains the list of differences. Those differences are encoded per the YANG Patch data model defined in [RFC8072].
RESTCONF Example
Sample YANG Model
Sample Data
Request in RESTCONF
Response in RESTCONF
Open Questions
- What are the advantages of using RFC 9144?
- Any different than current approach? Can it be modified as per requirements of CPS? For example using xpath format
- The documentation defines a POST operation to find the delta. Does this mean this approach intends to persist the Delta generated ti a database? If so will it be an indefinite persistence of delta report or will the delta be removed from storage after a specific time period.
- The current approach is a GET operation with no intention to persist the delta report