blob: 34b5a5f66987c0b40dcc7e20cc84d5d9a0c5b456 [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
14Lifecycle Management (LCM) Event
15================================
16
17
18Overview
19--------
emacleec9e11dd2022-08-17 09:52:32 +010020LCM 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 +010021
22 **3 possible event types:**
23
24 * Create
25 * Update
26 * Delete
27
emaclee41121982022-07-28 06:52:39 +010028LCM Event Schema
29----------------
30The current published LCM event is based on the following schema:
31
32:download:`Life cycle management event schema <schemas/lcm-event-schema-v1.json>`
33
34LCM Event structure
35-------------------
36
37Events header
38^^^^^^^^^^^^^
39*Event header prototype for all event types*
40
41.. code-block:: json
42
43 {
44 "eventId" : "00001",
45 "eventCorrelationId : "cmhandle-001",
46 "eventTime" : "2021-11-16T16:42:25-04:00",
47 "eventSource" : "org.onap.ncmp",
48 "eventType" : "org.onap.ncmp.cmhandle-lcm-event.create",
49 "eventSchema" : "org.onap.ncmp:cmhandle-lcm-event",
50 "eventSchemaVersion" : "1.0"
51 "event": ....
52 }
53
54Events payload
55^^^^^^^^^^^^^^
56Event payload varies based on the type of event.
57
58**CREATE**
59
60Event payload for this event contains the properties of the new cm handle created.
61
62*Create event payload prototype*
63
64.. code-block:: json
65
66 "event": {
67 "cmHandleId" : "cmhandle-001",
68 "newValues" : {
69 "cmHandleState" : "ADVISED",
70 "dataSyncEnabled" : "TRUE",
71 "cmhandleProperties" : [
72 "prop1" : "val1",
73 "prop2" : "val2"
74 ]
75 }
76 }
77 }
78
79
80**UPDATE**
81
82Event payload for this event contains the difference in state and properties of the cm handle.
83
84*Update event payload prototype*
85
86.. code-block:: json
87
88 "event": {
89 "cmHandleId" : "cmhandle-001",
90 "oldValues" : {
91 "cmHandleState" : "ADVISED",
92 "dataSyncEnabled" : "FALSE",
93 "cmhandleProperties" : [
94 "prop1" : "val1",
95 "prop2" : "val2",
96 }
97 "newValues" : {
98 "cmHandleState" : "READY",
99 "dataSyncEnabled" : "TRUE",
100 "cmhandleProperties" : [
101 "prop1" : "updatedval1",
102 "prop2" : "updatedval2"
103 ]
104 }
105 }
106 }
107
108
109**DELETE**
110
111Event payload for this event contains the identifier of the deleted cm handle.
112
113*Delete event payload prototype*
114
115.. code-block:: json
116
117 "event": {
118 "cmHandleId" : "cmhandle-001",
119 }
120
121