Overview
Jira Legacy |
---|
server | System Jira |
---|
columnIds | issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 4733707d-2057-3a0f-ae5e-4fd8aff50176 |
---|
key | Overview
Jira Legacy |
---|
server | System Jira |
---|
columnIds | issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 4733707d-2057-3a0f-ae5e-4fd8aff50176 |
---|
key | CPS-1628 |
---|
|
- This page gives a description of CPS events including their fields
- Events will be split into events and Headers
...
#1 LCM Event (NCMP → Client Apps)
...
Expand |
---|
|
Current LCM Event ObjectField | Type | Description | Header | Payload | Notes | CloudEvents Mapping |
---|
eventID | string | The unique id identifying the event | X |
| Mandatory | standard (id ) | eventCorrelationId | string | The id identifying the event. In LCMEvent this is always a cmhandleId | X |
| Optional (extension fields will be optional now) | extension (correlationid ) | eventTime | string | The timestamp when original event occurred | X |
| Mandatory | standard (time ) | eventSource | string | The source of the event | X |
| Mandatory | standard (source ) | eventType | string | The type of the event | X |
| Mandatory | standard (type ) | eventSchema | string | The schema that this event adheres to. | X |
| Mandatory e.g. cps:org.onap.ncmp.cmhandle.lcm-event:1.0.0 | standard (dataschema ) | eventSchemaVersion | string | The version of the schema that this event adheres to
| X |
| Mandatory e.g v1.0
| N/A included in 'dataschema' | event | Event | The payload of an event |
| X | Mandatory | standard (data ) | N/A | N/A | The version of CNCF Specification | X |
| Specified by CNCF (value hardcoded) | standard (specversion ) |
Type:Event (cps:org.onap.ncmp.cmhandle.lcm-event:v1)Field | Type | Description | Header | Payload | Notes |
---|
cmHandleId | string | cmHandle id |
| X |
| oldValues | Values | Values that represents the state of a cmHandle |
| X | Defined by values object below | newValues | Values | Values that represents the state of a cmHandle |
| X | Defined by values object below |
Type:ValuesField | Type | Description | Header | Payload | Notes |
---|
dataSyncEnabled | string | cmHandle id |
| X |
| cmHandleState | string | State of cmHandle |
| X | Enum: ["ADVISED", "READY", "LOCKED", "DELETING", "DELETED"] | cmHandleProperties | object | cmHandle properties |
| X | List of Java <String, String> Maps |
|
...
Expand |
---|
|
AVC Event ObjectField | Type | Description | Header | Payload | Notes | CloudEvents Mapping |
---|
eventID | string | The unique id identifying the event | X |
| Mandatory | standard (id ) | eventCorrelationId | string | The id identifying the event | X |
| Optional | extension(correlationid ) | eventTime | string | The timestamp when original event occurred | X |
| Optional | standard (time ) | eventSource | string | The source of the event | X |
| Optional | standard (source ) | eventType | string | The type of the event | X |
| Mandatory (e.g. cps:org.onap.cps.ncmp.events:avc-event) | standard (type ) | eventSchema | string | The schema that this event adheres to | X |
| Mandatory (e.g. cps:org.onap.cps.ncmp.events:avc-event-schema) | standard (dataschema ) | eventSchemaVersion | string | The version of the schema that this event adheres to
| X |
| Mandatory | N/A included in 'dataschema' | event | Event | The payload of an event |
|
| Mandatory | standard (data ) |
Type: Event (cps:org.onap.cps.ncmp.events:avc-event-schema:v1)Field | Type | Description | Header | Payload | Notes |
---|
|
|
...
AVC Subscription Event (external Clients Apps → NCMP) : ON HOLD - kieran mccarthy to analyze further
Priyank Maheshwari We need to revisit this schema and include the cloud events fields. (At the moment this doesn't have proper fields)
Excerpt |
---|
Expand |
---|
title | AVC Subscription Event |
---|
| Subscription Event Object Field | Type | Description | Header | Payload | Notes | CloudEvents Mapping |
---|
version | string | The event type version | X |
|
| included in dataschema | eventType | string | The event type | X |
|
| standard (type ) | source |
|
| NEW TBC, see issue #18 |
|
| X |
| NEW see decision #18, value <clientId> (same as in payload) TBC | standard (source ) | event | Event | The payload for an event | X |
| Defined by event object below | standard (data ) |
Event Object (cps:org.onap.cps.ncmp.events:avc-subscription-event:v1)Field | Type | Description | Header | Payload | Notes |
---|
subscription | Subscription | The subscription details |
| X | Defined by subscription object below | dataType | DataType | The datatype content |
| X | Defined by dataType object below | predicates | Predicates | Additional values to be added into the subscription |
| X | Defined by predicates object below |
Type: SubscriptionField | Type | Description | Header | Payload | Notes |
---|
clientID | string | The client ID |
| X |
| name | string | The name of the subscription |
| X |
| isTagged | boolean | optional parameter, default is false |
| X | default: false |
Type: DataTypeField | Type | Description | Header | Payload | Notes |
---|
dataspace | string | The dataspace name |
| X |
| dataCategory | string | The category type of the data |
| X |
| dataProvider | string | The provider name of the data |
| X |
| schemaName | string | The name of the schema |
| X |
| schemaVersion | string | The version of the schema |
| X |
|
Type: PredicatesField | Type | Description | Header | Payload | Notes |
---|
targets | array | CM Handles to be targeted by the subscription |
| X |
| datastore | string | datastore which is to be used by the subscription |
| X |
| Xpath-filter | string | filter to be applied to the CM Handles through this event |
| X |
|
|
#4 DMI Async Request Response Event (DMI → NCMP)
...
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 |
---|
title | DMI Async Request Response Event |
---|
|
DmiAsyncRequestResponse Event Object 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 ) | eventTarget | string | The target of the event | X |
|
| extensions (target ) | eventType | string | The type of the event | X |
|
| standard (type ) | eventSchema | string | The event schema for async request response events | X |
|
| standard (dataschema ) | eventSchemaVersion | string | The event schema version for async request response events
| X |
|
| N/A included in 'dataschema' | eventSource | string | The source of the event | X |
|
| standard (source ) | eventContent | EventContent | The payload of an event |
|
| The name of this fields is inconsistent with all other event schemas, see issue #6 | standard (data) |
Type: EventContent (cps:org.onap.cps.ncmp.events:dmi-async-request-response-event-schema:v1)Field | Type | Description | Header | Payload | Notes |
---|
response-data-schema | string | The schema of response data |
| X |
| response-status | string | The status of the response |
| X |
| response-code | string | The code of the response |
| X |
| response-data | object | The data payload |
| X | contains payload of type object |
|
...
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 |
---|
title | NCMP Async Request Response Event |
---|
|
NcmpAsyncRequestResponse Event ObjectField | 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 ) | eventTarget | string | The target of the event | X |
|
| extensions (target ) | eventType | string | The type of the event | X |
|
| extensions standard (target type ) | eventType source | string | The | type source of the event | X |
| NEW see decision #18, value 'ncmp' | standard ( | type source ) | eventSchema | string | The event schema for async request response events | X |
|
| standard (dataschema ) | eventSchemaVersion | string | The event schema version for async request response events
| X |
|
| N/A included in 'dataschema' | event | Event | The payload of an event |
| X | Defined by event object below | standard (data ) | forwardedEvent | ForwardedEvent | The payload of a forwarded event |
| X | Relation to Event field unclear, do we need 2 events at all see issue #7 | standard (data ) See new proposal below |
Type: Event (cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1)Field | Type | Description | Header | Payload | Notes |
---|
eventID | string | The unique id identifying the event generated by DMI |
| X | Only in payload in v1 of the payload schema. To be removed in v2 version (will be in the header only) | eventCorrelationId | string | The request id passed by NCMP |
| X | as above | eventTime | string | The timestamp when original event occurred |
| X | as above | eventTarget | string | The target of the event |
| X | as above | eventType | string | The type of the event |
| X | as above | eventSchema | string | The event schema for async request response events |
| X | as above | eventSource | string | The source of the event |
| X | as above | response-data-schema | string | The received schema of response data |
| X |
| response-status | string | The received status of the response |
| X |
| response-code | string | The received code of the response |
| X |
| response-data | object | The data payload |
| X | contains payload of type object |
Type: forwardedEvent (cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1)Field | Type | Description | Header | Payload | Notes |
---|
eventID | string | The unique id identifying the event generated by DMI |
| ? | Can NCMP put these in the header and remove them from the 'forwardedEvent' | eventCorrelationId | string | The request id passed by NCMP |
| ? | as above | eventTime | string | The timestamp when original event occurred |
| ? | as above | eventTarget | string | The target of the event |
| ? | as above | eventType | string | The type of the event |
| ? | as above | eventSchema | string | The event schema for async request response events |
| ? | as above | eventSchemaVersion | string | The event schema version for async request response events |
| ? | as above | eventSource | string | The source of the event |
| ? | as above | response-data-schema | string | The received schema of response data |
| X |
| response-status | string | The received status of the response |
| X |
| response-code | string | The received code of the response |
| X |
| response-data | object | The data payload |
| X | contains payload of type object |
Proposed New Schema:see Jira Legacy |
---|
server | System Jira |
---|
serverId | 4733707d-2057-3a0f-ae5e-4fd8aff50176 |
---|
key | CPS-1660 |
---|
|
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 ) | eventSchemaVersion | string | The event schema version for async request response events
| X |
|
| N/A included in '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 |
---|
title | DMI Async Batch Response Event |
---|
|
BatchResponseEvent DmiDataOperationEvent Object Excerpt |
---|
Field | Type | Description | Header | Payload | Notes | CloudEvents Mapping |
---|
eventID | string | The unique id identifying the event generated by DMI | X |
| Mandatory. Generated by DMI-Plugin | standard (id ) | eventCorrelationId | string | The request id passed by NCMP | X |
| Mandatory. This is requestId that NCMP sent to client as an ACK. example : “request-1234" (UUID) | extension (correlationid ) | eventTarget | string | The destination topic of the client | X |
| Mandatory. TBC example: my-topic | extension (destination ) | source | string | The source of the event |
|
| OptionalMandatory. example : dmi-plugin:enm-1 (dmi service name) | standard (source ) | eventTime | string | The timestamp when original event occurred | X |
| 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. | standard (time ) | eventType | string | The type of the event | X |
| Mandatory. NCMP owns eventType that would be used by dmi-plugins The Convention of eventType and Schema names is under discussion, see open issue #17 on CPS-1515 Spike | standard (type ) | eventSchema | string | The event schema for async request response events | X |
| Mandatory. The Convention of eventType and Schema names is under discussion, see open issue #17 on CPS-1515 Spike
| standard (dataschema ) | eventSchemaVersion | string | The event schema version for async request response events
| X |
|
| N/A included in 'dataschema ' | event | Event | The payload of an event |
| X | java object not yet defined by schema, see issue #2 | standard (data ) | specversion | String | Version of CNCF spec | X |
| hardcoded value of 1.0 | standard (specversion ) |
|
Type: Event (cps:org.onap.cps.ncmp.event.async:dmi-asyncdata-batch-responseoperation-event-schema:v1) Field | Type | Description | Header | Payload | Notes |
---|
No Properties defined (Entire event treated as single object) |
|
#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 |
---|
title | NCMP Async Batch Response Event - Client Topic |
---|
|
BatchResponseEvent NcmpDataOperationEvent Object 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 ) | eventType | string | The type of the event | X | X |
|
| standard (type ) | source | string | The source of the event | X |
| NEW see decision #18, value 'ncmp' | standard ( | type source ) | eventSchema | string | The event schema for async request response events | X |
|
| standard (dataschema ) | eventSchemaVersion | string | The event schema version for async request response events
| X |
|
| N/A included in 'dataschema ' | event | Event | The payload of an event |
| X | Java object not yet defined by schema, see issue #2 | standard (data ) |
Type: Event (cps:org.onap.cps.ncmp.event.async:ncmp-asyncdata-batchoperation-response-event-schema:v1) Field | Type | Description | Header | Payload | Notes |
---|
No Properties defined (Entire event treated as single object) |
|
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.)
...
https://github.com/cloudevents/spec
- 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
The table below shows how previously proposed headers should be mapped to pre-defined CNFC headers.
...
Before
...
After1
...
- /kafka
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_)idtime | .withIdwithTime() |
| Optional (could be Mandatory for |
eventSourceeventSchema | (ce_) sourcedataschema | .withSourcewithDataSchema() | Mandatory | N/A |
| Optional includes the version of the schema |
| content-type2 | withDataContentType() | application/json | Optional |
eventCorrelationId | (ce_) | specversion (default 1.0).v1() | 1.0 | Mandatory - This is the version of the cloud events | eventTypecorrelationid | .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_) | typedata | . | withTypewithData(json TBC) |
| 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. |
...
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 |