Table of Contents |
---|
Overview
...
# | Short Name | Source | Destination | Impl. Status | Notes | Full Schema Name | Diagram Ref. |
---|---|---|---|---|---|---|---|
1 | LCM Event | NCMP | Client Apps | In Use | Life Cycle Management Events, when cmHandles are added or removed | cps:org.onap.ncmp.cmhandle.lcm-event:v1 | CM-Handle State Changes and Notifications Overview#Notificationhandlingincode |
2 | DMI Data AVC Event | DMI | NCMP | Implemented, Not in use | Attribute Value Change in configuration management (CM) data. | cps:org.onap.cps.ncmp.events:avc-event-schema:v1 | 5 in CPS Data Notifications Overview#ComponentDiagram |
3 | AVC Subscription Create Event | Client | NCMP & DMIs | Implemented, Not in use | Create Event Only | cps:org.onap.cps.ncmp.events:avc-subscription-event:v1 | 7 in CPS Data Notifications Overview#ComponentDiagram |
4 | DMI Async Request Response Event | DMI | NCMP | In Use | DMI passes response onto Kafka topic specified by client. | cps:org.onap.cps.ncmp.events:dmi-async-request-response-event-schema:v1 | 3b → 4a in CPS-821 Spike: Support Async read-write operations on CPS-NCMP interface#ProposedDesign |
5 | NCMP Async Request Response Event | NCMP | Client Apps | In Use | Forward No.4 to client specified topic | cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1 | 4b → 5 in CPS-821 Spike: Support Async read-write operations on CPS-NCMP interface#ProposedDesign |
6 | Bulk Response Event (Internal) | DMI | NCMP | In Progress | Internal Kafka topic | cps:org.onap.cps.ncmp.event:dmi-async-bulk-response-event-schema:v1 | 5 in CPS-1515: Spike: Support Multiple CM-Handles for NCMP Get Operation (batch Data operations)#BulkRequestMessageFlow |
7 | NCMP | Client Apps | In Progress | Forwarding the DMI responses to the client topic | cps:org.onap.cps.ncmp.event:ncmp-async-bulk-response-event-schema:v1 | 6 in CPS-1515: Spike: Support Multiple CM-Handles for NCMP Get Operation (batch Data operations)#BulkRequestMessageFlow |
#1 LCM Event (NCMP → Client Apps)
...
This event is for the asynchronous responses from DMI to NCMP following (synchronous) requests (from NCMP) specifying a (response) topic. See 3b → 4a in CPS-821 Spike: Support Async read-write operations on CPS-NCMP interface#ProposedDesign
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DmiAsyncRequestResponse Event Object
Type: EventContent (cps:org.onap.cps.ncmp.events:dmi-async-request-response-event-schema:v1)
|
...
This event is for the asynchronous responses from NCMP to Client Apps following (synchronous) requests (from client) specifying a (response) topic. See 4b → 5 in CPS-821 Spike: Support Async read-write operations on CPS-NCMP interface#ProposedDesign
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NcmpAsyncRequestResponse Event Object
Type: Event (cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1)
Type: forwardedEvent (cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1)
Proposed New Schema:see
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Field | Type | Description | Header | Payload | Notes | CloudEvents Mapping | eventID | string | The unique id identifying the event generated by DMI | X | standard (id ) | eventCorrelationId | string | The request id passed by NCMP | X | extensions(correlationid ) | eventTime | string | The timestamp when original event occurred | X | standard (time ) | eventSource | string | The source of the event | X | What value should contain in this? Needs clarification, see issue #8 | standard (source ) | eventType | string | The type of the event | X | standard (type ) | eventSchema | string | The event schema for async request response events | X | standard (dataschema ) |
| X | dataschema ' | event | Event | The payload of an event | X | Defined by event object below | standard (data ) |
received code of the response | X | ||||
response-data | object | The data payload | X | contains payload of type object |
Proposed New Schema:
see
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
Field | Type | Description | Header | Payload | Notes | CloudEvents Mapping |
---|---|---|---|---|---|---|
eventID | string | The unique id identifying the event generated by DMI | X | standard (id ) | ||
eventCorrelationId | string | The request id passed by NCMP | X | extensions(correlationid ) | ||
eventTime | string | The timestamp when original event occurred | X | standard (time ) | ||
eventSource | string | The source of the event | X | What value should contain in this? Needs clarification, see issue #8 | standard (source ) | |
eventType | string | The type of the event | X | standard (type ) | ||
eventSchema | string | The event schema for async request response events | X | standard (dataschema ) | ||
| X | dataschema ' | ||||
event | Event | The payload of an event | X | Defined by event object below | standard (data ) |
Type: Event (cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1)
Field | Type | Description | Header | Payload | Notes |
---|---|---|---|---|---|
eventCorrelationId | string | The request id passed by NCMP | X | as above @Toine asked to add this property. | |
responseStatus | string | The received status of the response | X | ||
responseCode | string | The received code of the response | X | ||
responseData | object | The data payload | X | contains payload of type object |
#6 Data Operation (response) Event (DMI → NCMP)
Description
Batch (data) request will always result in asynchronous events (responses) sent to the client. This event is the response from DMI to NCMP. See 5 in CPS-1515: Spike: Support Multiple CM-Handles for NCMP Get Operation (bulk / batch operations)#BulkRequestMessageFlow
Expand | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||
DmiDataOperationEvent Object
| as above @Toine asked to add this property. | responseStatus | string | The received status of the response | X | responseCode | string | The received code of the response | X | responseData | object | The data payload | X | contains payload of type object |
#6 Data Operation (response) Event (DMI → NCMP)
Description
Batch (data) request will always result in asynchronous events (responses) sent to the client. This event is the response from DMI to NCMP. See 5 in CPS-1515: Spike: Support Multiple CM-Handles for NCMP Get Operation (bulk / batch operations)#BulkRequestMessageFlow
...
title | DMI Async Batch Response Event |
---|
DmiDataOperationEvent Object
...
Mandatory. Generated by DMI-Plugin
...
The request id passed by NCMP
...
Optional. The timestamp should follow that on https://www.rfc-editor.org/rfc/rfc3339#section-5. This follows ISO 8601 and is what is used/referenced in 3GPP standards
example: 1985-04-12T23:20:50.52Z this represents 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC.
...
The event schema for async request response events
...
The event schema version for async request response events
...
Type: Event (cps:org.onap.cps.ncmp.event.async:dmi-data-operation-event-schema:v1)
...
#7 Data Operation (response) Event (NCMP → Client App)
Description
Batch (data) request will always result in asynchronous events (responses) sent to the client. This event is the response from DMI to NCMP. See 6 in CPS-1515: Spike: Support Multiple CM-Handles for NCMP Get Operation (bulk / batch operations)#BulkRequestMessageFlow
...
title | NCMP Async Batch Response Event - Client Topic |
---|
NcmpDataOperationEvent Object
...
The request id passed by NCMP
...
The event schema for async request response events
...
The event schema version for async request response events
...
Type: Event (cps:org.onap.cps.ncmp.event.async:ncmp-data-operation-event-schema:v1)
...
CNCF Cloud Event alignment
Introduction
CNCF CloudEvents is a specification for describing event data in common formats to provide interoperability across services, platforms and systems.
- These cloud events will be applied to all the internal and external events we have in CPS , NCMP and DMI Plugin.
- Cloud events will be taking care of the fields which are part of Headers or part of the actual payload (fields other than "data" are sent as Headers)
- These CNCF cloud events will be applied to all the events listed in above sections (LCM , DMI Data AVC etc.)
Library References
- https://github.com/cloudevents/sdk-java
- https://mvnrepository.com/artifact/io.cloudevents
- examples : https://github.com/cloudevents/sdk-java/tree/main/Examples/kafka/src/main/java/io/cloudevents/Examples/kafka
Common Header Mapping
The table below shows how previously proposed headers should be mapped to pre-defined CNFC headers.
...
Before
...
After1
...
eventId
...
(ce_)id
...
eventSource
...
(ce_)source
...
N/A
...
(ce_)specversion (default 1.0)
...
eventType
...
(ce_)type
...
eventTime
...
(ce_)time
...
eventSchema
...
(ce_)dataschema
...
Optional includes the version of the schema
...
withDataContentType()
...
Optional This will be part of the extensions field in the cloud events and all the restrictions of the attribute field naming applies to it.
i.e these fields will be in the small case.
This is marked as optional as it only applies to some events.
...
Type: Event (cps:org.onap.cps.ncmp.event.async:dmi-data-operation-event-schema:v1)
|
#7 Data Operation (response) Event (NCMP → Client App)
Description
Batch (data) request will always result in asynchronous events (responses) sent to the client. This event is the response from DMI to NCMP. See 6 in CPS-1515: Spike: Support Multiple CM-Handles for NCMP Get Operation (bulk / batch operations)#BulkRequestMessageFlow
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NcmpDataOperationEvent Object
Type: Event (cps:org.onap.cps.ncmp.event.async:ncmp-data-operation-event-schema:v1)
|
CNCF Cloud Event alignment
Introduction
CNCF CloudEvents is a specification for describing event data in common formats to provide interoperability across services, platforms and systems.
- These cloud events will be applied to all the internal and external events we have in CPS , NCMP and DMI Plugin.
- Cloud events will be taking care of the fields which are part of Headers or part of the actual payload (fields other than "data" are sent as Headers)
- These CNCF cloud events will be applied to all the events listed in above sections (LCM , DMI Data AVC etc.)
Library References
- https://github.com/cloudevents/sdk-java
- https://mvnrepository.com/artifact/io.cloudevents
- examples : https://github.com/cloudevents/sdk-java/tree/main/Examples/kafka/src/main/java/io/cloudevents/Examples/kafka
Common Header Mapping
The table below shows how previously proposed headers should be mapped to pre-defined CNFC headers.
Before | After1 | CloudeEvent builder method | Example Value | Notes |
---|---|---|---|---|
eventId | (ce_)id | .withId() | Mandatory | |
eventSource | (ce_)source | .withSource() | Mandatory | |
N/A | (ce_)specversion (default 1.0) | .v1() | 1.0 | Mandatory - This is the version of the cloud events |
eventType | (ce_)type | .withType() | Mandatory | |
eventTime | (ce_)time | .withTime() | Optional (could be Mandatory for | |
eventSchema | (ce_)dataschema | .withDataSchema() | Optional includes the version of the schema | |
content-type2 | withDataContentType() | application/json | Optional | |
eventCorrelationId | (ce_)correlationid | .withExtension() | Optional This will be part of the extensions field in the cloud events and all the restrictions of the attribute field naming applies to it. i.e these fields will be in the small case. This is marked as optional as it only applies to some events. | |
event | (ce_)data | .withData(json TBC) | Mandatory actual event/payload now would be under "data" field. |
- Note 1 all cloud-event headers will be prefixed during serialization with 'ce_' (this means when filtering on serialized Kafka-headers this prefix need to be applied)
- Note 2 content-type is a a 'default' header name no 'wrapped' by CloudEvents and hence the inconsistency in names and that is does NOT have the 'ce_' prefix.
Common NCMP response staus code & message :
- Status-code 0-99 is reserved for any success response
- Status-code from 100 to 199 is reserved for any failed response.
Status Code | Status Message |
---|---|
0 | Successfully applied changes |
100 | cm handle id(s) is(are) not found |
101 | cm handle id(s) is(are) in non ready state |
102 | dmi plugin service is not responding |
103 | dmi plugin service is not able to read resource data |