X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=docs%2Fcontent%2Fmodeling.rst;h=e8c53456c2527cebcd562a649c368b9b00419e8b;hb=cb23b1771e3fc552090f80791b852ce8ad05f150;hp=b8bf91e4f9a5e6c18195030da4fdb4d763ef8c1b;hpb=564e5e96c4ee9a4ae9715865cf6491b4266c601f;p=cps%2Fcps-temporal.git diff --git a/docs/content/modeling.rst b/docs/content/modeling.rst index b8bf91e..e8c5345 100644 --- a/docs/content/modeling.rst +++ b/docs/content/modeling.rst @@ -2,10 +2,62 @@ .. Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 .. -.. Copyright (C) 2021 Bell Canada +.. Copyright (C) 2021-2022 Bell Canada ===================== CPS Temporal Modeling ===================== -.. warning:: Draft +Event Structure +=============== + +Data manipulated by both CPS Core and CPS Temporal to represent a Data Updated +Event is a JSON structure that is defined by following Json Schema: + +* :download:`cps-data-updated-event-schema.json <../_static/event-schema/cps-data-updated-event-schema.json>` + +And following is an example of an event compliant with this schema: + +.. code:: json + + { + "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v2", + "id": "38aa6cc6-264d-4ede-b534-18f5c1f403ea", + "source": "urn:cps:org.onap.cps", + "type": "org.onap.cps.data-updated-event", + "content": { + "observedTimestamp": "2021-06-09T13:00:00.123-0400", + "operation": "UPDATE", + "dataspaceName": "my-dataspace", + "schemaSetName": "my-schema-set", + "anchorName": "my-anchor", + "data": { + "interface": { + "name": "itf-1", + "status": "up" + } + } + } + } + +Event versions +============== + +The following table lists the data-updated-event schema evolution over releases : + + +-----------+------------+-------------------------+---------------------+ + | Version | Release | Compatibility Type | Upgrade First | + | | | (with previous version) | | + +===========+============+=========================+=====================+ + | v1 | Istanbul | n/a | Any order | + +-----------+------------+-------------------------+---------------------+ + | v2 | Jakarta | Backward | Consumer (Temporal) | + +-----------+------------+-------------------------+---------------------+ + +**Compatibility Types** + +Several compatibility types exist when an event schema definition is evolving from one release to the next one: + +- Backward compatibility means that consumers using the new schema can read data produced with the previous schema. +- Forward compatibility means that data produced with a new schema can be read by consumers using the previous schema. +- 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. \ No newline at end of file