blob: df37de36321f3bcf69196a14e28cbee8d86ccedc [file] [log] [blame]
emaclee41121982022-07-28 06:52:39 +01001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright (C) 2022 Nordix Foundation
4
5.. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
6.. _cpsEvents:
7
8CPS Events
9##########
10
emaclee41121982022-07-28 06:52:39 +010011CPS-NCMP
12********
13
JosephKeenan52950bd2022-09-27 16:12:30 +010014Async events are triggered when a valid topic has been detected in a passthrough operation.
15
16:download:`NCMP request response event schema <schemas/ncmp-async-request-response-event-schema-v1.json>`
17
18Event header
19^^^^^^^^^^^^^
20
21.. code-block:: json
22
23 {
24 "eventId" : "001",
25 "eventCorrelationId" : "cps-001",
26 "eventTime" : "2022-09-28T12:24:21.003+0000",
27 "eventTarget" : "test-topic",
28 "eventType" : "org.onap.cps.ncmp.event.model.DmiAsyncRequestResponseEvent",
29 "eventSchema" : "urn:cps:org.onap.cps.ncmp.event.model.DmiAsyncRequestResponseEvent:v1",
30 "forwarded-Event" : { ... }
31 }
32
33Forwarded-Event Payload
34^^^^^^^^^^^^^^^^^^^^^^^
35
36.. code-block:: json
37
38 "Forwarded-Event": {
39 "eventId" : "002",
40 "eventCorrelationId" : "cps-001",
41 "eventTime" : "2022-09-28T12:24:18.340+0000",
42 "eventTarget" : "test-topic",
43 "eventType" : "org.onap.cps.ncmp.event.model.DmiAsyncRequestResponseEvent",
44 "eventSchema" : "urn:cps:org.onap.cps.ncmp.event.model.DmiAsyncRequestResponseEvent:v1",
45 "eventSource" : "org.onap.cps.ncmp.dmi",
46 "response-data-schema" : "urn:cps:org.onap.cps.ncmp.event.model.DmiAsyncRequestResponseEvent:v1",
47 "response-status" : "OK",
48 "response-code" : "200",
49 "response-data" : { ... }
50 }
51
52
emaclee41121982022-07-28 06:52:39 +010053Lifecycle Management (LCM) Event
54================================
55
56
57Overview
58--------
emacleec9e11dd2022-08-17 09:52:32 +010059LCM events for CM Handles are published when a CM Handle is created, deleted or another change in the cm handle state occurs.
emaclee41121982022-07-28 06:52:39 +010060
emacleeb176de22022-08-31 15:53:10 +010061 **3 possible event types:**
emaclee41121982022-07-28 06:52:39 +010062
emacleeb176de22022-08-31 15:53:10 +010063 * Create
64 * Update
65 * Delete
emaclee41121982022-07-28 06:52:39 +010066
emaclee41121982022-07-28 06:52:39 +010067LCM Event Schema
68----------------
69The current published LCM event is based on the following schema:
70
71:download:`Life cycle management event schema <schemas/lcm-event-schema-v1.json>`
72
73LCM Event structure
74-------------------
75
76Events header
77^^^^^^^^^^^^^
78*Event header prototype for all event types*
79
80.. code-block:: json
81
emacleeb176de22022-08-31 15:53:10 +010082 {
83 "eventId" : "00001",
84 "eventCorrelationId : "cmhandle-001",
85 "eventTime" : "2021-11-16T16:42:25-04:00",
86 "eventSource" : "org.onap.ncmp",
87 "eventType" : "org.onap.ncmp.cmhandle-lcm-event.create",
88 "eventSchema" : "org.onap.ncmp:cmhandle-lcm-event",
89 "eventSchemaVersion" : "1.0"
90 "event": ....
91 }
emaclee41121982022-07-28 06:52:39 +010092
93Events payload
94^^^^^^^^^^^^^^
95Event payload varies based on the type of event.
96
97**CREATE**
98
99Event payload for this event contains the properties of the new cm handle created.
100
101*Create event payload prototype*
102
103.. code-block:: json
104
105 "event": {
106 "cmHandleId" : "cmhandle-001",
107 "newValues" : {
108 "cmHandleState" : "ADVISED",
109 "dataSyncEnabled" : "TRUE",
110 "cmhandleProperties" : [
111 "prop1" : "val1",
112 "prop2" : "val2"
113 ]
114 }
115 }
116 }
117
118
119**UPDATE**
120
121Event payload for this event contains the difference in state and properties of the cm handle.
122
123*Update event payload prototype*
124
125.. code-block:: json
126
127 "event": {
128 "cmHandleId" : "cmhandle-001",
129 "oldValues" : {
130 "cmHandleState" : "ADVISED",
131 "dataSyncEnabled" : "FALSE",
132 "cmhandleProperties" : [
133 "prop1" : "val1",
134 "prop2" : "val2",
135 }
136 "newValues" : {
137 "cmHandleState" : "READY",
138 "dataSyncEnabled" : "TRUE",
139 "cmhandleProperties" : [
140 "prop1" : "updatedval1",
141 "prop2" : "updatedval2"
142 ]
143 }
144 }
145 }
146
147
148**DELETE**
149
150Event payload for this event contains the identifier of the deleted cm handle.
151
152*Delete event payload prototype*
153
154.. code-block:: json
155
156 "event": {
157 "cmHandleId" : "cmhandle-001",
158 }
159
160