...
Expand |
---|
title | NCMP Async Request Response Event |
---|
|
NcmpAsyncRequestResponse Event Object Field | Type | Description | Kafka Header | Event Payload Field | 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' | event | Event | The payload of an event |
|
| Defined by event object below | standard ( source ) | forwardedEvent | ForwardedEvent | The payload of a forwarded event |
|
| Relation to Event field unclear, do we need 2 events at all see issue #7 | standard ( data ) |
Type: Event (cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1)Field | Type | Description | Kafka Header | Event Payload Field | 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 |
| 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 | Kafka Header | Event Payload Field | 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: Jira Legacy |
---|
server | System Jira |
---|
serverId | 4733707d-2057-3a0f-ae5e-4fd8aff50176 |
---|
key | CPS-1660 |
---|
|
Field | Type | Description | Kafka Header | Event Payload Field | Notes | CloudEvents Mapping |
---|
eventID | string | The unique id identifying the event generated by DMI |
|
|
| standard (id) | eventCorrelationId | string | The request id passed by NCMP |
|
|
| extensions(correlationid) | eventTime | string | The timestamp when original event occurred |
|
|
| standard (time) | eventSource | string | The source of the event |
|
| What value should contain in this? Needs clarification, see issue #8 | standard (source) | eventType | string | The type of the event |
|
|
| standard (type) | eventSchema | string | The event schema for async request response events |
|
|
| standard (dataschema) | eventSchemaVersion | string | The event schema version for async request response events
|
|
|
| N/A included in 'dataschema' | event | Event | The payload of an event |
|
| 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 | Kafka Header | Event Payload Field | Notes |
---|
eventCorrelationId | string | The request id passed by NCMP |
|
| as above @Toine asked to add this property. | responseStatus | string | The received status of the response |
|
|
| responseCode | string | The received code of the response |
|
|
| responseData | object | The data payload |
|
| contains payload of type 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 kafka headers or part of the actual payload ( fields other than "data" are sent as kafka headers )
- These CNCF cloud events will be applied to all the events listed in above sections ( LCM , DMI Data AVC etc. )
...
Before | After | CloudeEvent builder method | Example Value | Notes |
---|
eventId | id | .withId() |
| Mandatory |
eventSource | source | .withSource() |
| Mandatory |
N/A | specversion (default 1.0) | .v1() | 1.0 | Mandatory - This is the version of the cloud events |
eventType | type | .withType() |
| Mandatory |
eventTime | time | .withTime() |
| Optional |
eventSchema | dataschema | .withDataSchema() |
| Optional includes the version of the schema |
| datacontenttype | withDataContentType() | application/json | Optional |
eventCorrelationId | 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 | data | .withData(json TBC) |
| Mandatory actual event/payload now would be under "data" field. |
...