blob: e8c53456c2527cebcd562a649c368b9b00419e8b [file] [log] [blame]
Bruno Sakotoff7d57a2021-09-07 18:21:59 -04001.. This work is licensed under a
2.. Creative Commons Attribution 4.0 International License.
3.. http://creativecommons.org/licenses/by/4.0
4..
puthuparambil.adityacb23b172022-01-10 12:58:37 +00005.. Copyright (C) 2021-2022 Bell Canada
Bruno Sakotoff7d57a2021-09-07 18:21:59 -04006
7=====================
8CPS Temporal Modeling
9=====================
10
Bruno Sakotoa43a13b2021-10-07 09:11:48 -040011Event Structure
12===============
13
14Data manipulated by both CPS Core and CPS Temporal to represent a Data Updated
15Event is a JSON structure that is defined by following Json Schema:
16
puthuparambil.adityacb23b172022-01-10 12:58:37 +000017* :download:`cps-data-updated-event-schema.json <../_static/event-schema/cps-data-updated-event-schema.json>`
Bruno Sakotoa43a13b2021-10-07 09:11:48 -040018
19And following is an example of an event compliant with this schema:
20
21.. code:: json
22
23 {
puthuparambil.adityacb23b172022-01-10 12:58:37 +000024 "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v2",
Bruno Sakotoa43a13b2021-10-07 09:11:48 -040025 "id": "38aa6cc6-264d-4ede-b534-18f5c1f403ea",
26 "source": "urn:cps:org.onap.cps",
27 "type": "org.onap.cps.data-updated-event",
28 "content": {
29 "observedTimestamp": "2021-06-09T13:00:00.123-0400",
puthuparambil.adityacb23b172022-01-10 12:58:37 +000030 "operation": "UPDATE",
Bruno Sakotoa43a13b2021-10-07 09:11:48 -040031 "dataspaceName": "my-dataspace",
32 "schemaSetName": "my-schema-set",
33 "anchorName": "my-anchor",
34 "data": {
35 "interface": {
36 "name": "itf-1",
37 "status": "up"
38 }
39 }
40 }
41 }
42
puthuparambil.adityacb23b172022-01-10 12:58:37 +000043Event versions
44==============
45
46The following table lists the data-updated-event schema evolution over releases :
47
48 +-----------+------------+-------------------------+---------------------+
49 | Version | Release | Compatibility Type | Upgrade First |
50 | | | (with previous version) | |
51 +===========+============+=========================+=====================+
52 | v1 | Istanbul | n/a | Any order |
53 +-----------+------------+-------------------------+---------------------+
54 | v2 | Jakarta | Backward | Consumer (Temporal) |
55 +-----------+------------+-------------------------+---------------------+
56
57**Compatibility Types**
58
59Several compatibility types exist when an event schema definition is evolving from one release to the next one:
60
61- Backward compatibility means that consumers using the new schema can read data produced with the previous schema.
62- Forward compatibility means that data produced with a new schema can be read by consumers using the previous schema.
63- Full compatibility means that schemas are both backward and forward compatible: old data can be read with the new schema, and new data can also be read with the previous schema.