blob: 8446834c318b4837fbc1a20f9f2cdc5b68c980ea [file] [log] [blame]
sourabh_sourabh9a76aa32023-07-25 10:58:52 +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) 2023 Nordix Foundation
4
5.. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
6.. _cmHandleLcmEvents:
7
8
9CM Handle Lifecycle Management (LCM) Events
10###########################################
11
12.. toctree::
13 :maxdepth: 1
14
15Introduction
16============
17
18LCM events for CM Handles are published when a CM Handle is created, deleted or another change in the cm handle state occurs.
19
20 **3 possible event types:**
21
22 * Create
23 * Update
24 * Delete
25
26CM Handle LCM Event Schema
27---------------------------
28The current published LCM event is based on the following schema:
29
30:download:`Life cycle management event schema <schemas/lcm-event-schema-v1.json>`
31
32CM Handle LCM Event structure
33-----------------------------
34
35Events header
36^^^^^^^^^^^^^
37*Event header prototype for all event types*
38
39.. code-block::
40
41 {
42 "eventId" : "00001",
43 "eventCorrelationId : "cmhandle-001",
44 "eventTime" : "2021-11-16T16:42:25-04:00",
45 "eventSource" : "org.onap.ncmp",
46 "eventType" : "org.onap.ncmp.cmhandle-lcm-event.create",
47 "eventSchema" : "org.onap.ncmp:cmhandle-lcm-event",
48 "eventSchemaVersion" : "1.0",
49 "event" : ...
50 }
51
52Events payload
53^^^^^^^^^^^^^^
54Event payload varies based on the type of event.
55
56**CREATE**
57
58Event payload for this event contains the properties of the new cm handle created.
59
60*Create event payload prototype*
61
62.. code-block:: json
63
64 "event": {
65 "cmHandleId" : "cmhandle-001",
66 "newValues" : {
67 "cmHandleState" : "ADVISED",
68 "dataSyncEnabled" : "TRUE",
69 "cmhandleProperties" : [
70 "prop1" : "val1",
71 "prop2" : "val2"
72 ]
73 }
74 }
75 }
76
77
78**UPDATE**
79
80Event payload for this event contains the difference in state and properties of the cm handle.
81
82*Update event payload prototype*
83
84.. code-block:: json
85
86 "event": {
87 "cmHandleId" : "cmhandle-001",
88 "oldValues" : {
89 "cmHandleState" : "ADVISED",
90 "dataSyncEnabled" : "FALSE",
91 "cmhandleProperties" : [
92 "prop1" : "val1",
93 "prop2" : "val2",
94 }
95 "newValues" : {
96 "cmHandleState" : "READY",
97 "dataSyncEnabled" : "TRUE",
98 "cmhandleProperties" : [
99 "prop1" : "updatedval1",
100 "prop2" : "updatedval2"
101 ]
102 }
103 }
104 }
105
106
107**DELETE**
108
109Event payload for this event contains the identifier of the deleted cm handle.
110
111*Delete event payload prototype*
112
113.. code-block:: json
114
115 "event": {
116 "cmHandleId" : "cmhandle-001",
117 }