Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • This page gives a description of CPS events including their fields
  • Events will be split into events and Kafka headersHeaders

Issues & Decisions

#DescriptionNotesDecision
1No Event properties defined for DMI AVC Event

Priyank Maheshwari will need to specify  and agreed event structure for DMI AVC Event with stakeholders  ie. provide Jira ticket


Event Body should be compatible with RFC8641

kieran mccarthy

to confirm

has confirmed.

Priyank Maheshwari

  to create

created JIRA to create the event body schema. 

2Bulk Operation events details have not yet be defined (just headers)

Sourabh Sourabh to provide Jira tickets

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-1658

3Should all the events have same
kafka headers
Headers

kieran mccarthy

Posissbly

Possibly Common (base) set of headers but mandatory aspect might differ. In practice we might need a separate headers (

shema

schema?) for each event

4Clarify the format of the version eventSchemaVersion

v1 or 1.0

ex: 1.0.0 (without 'v')

kieran mccarthy to check ORAN preference

kieran mccarthy confirms through email on to use semantic versioning which ORAN follows https://semver.org.

5What to do with additional event headers (from DMI Plugins)

kieran mccarthy   if DMI produce

Additional

additional headers NCMP will discard those

ie

i.e. not included in forwarded events

6Event(Content) field in DMI Async Request Response Event has inconsistent name (compared with other schemas)
  1. Add V2 file
  2. Deprecate V1
  3. Support both versions for a while
  4. Delete the V1 version (after some time)

CPS Team

 Create

Create a V2 of the schema and rename eventContent as event data. Do it as part of the schema addition.

7NCMP Async Request Response Event (#5) contains both an Event and ForwardedEvent

ForwardedEvent is not wrapped inside Event but question now is if we need 2 events at all?!

Sourabh Sourabh  and Raviteja Karumuri  can check how it is actually working and then we decide (create a JIRA ticket)

Wiki for the Study on NCMPAsyncRequestResponse event schema

8Dmi Data AVC Event, use of eventSource field

Priyank Maheshwari wanted to store 'datastore' in this field but kieran mccarthy explained it to use for different purposes

kieran mccarthy Clients can use this field as per their requirements. 

9Can Kafka Headers be describe with 'schema's owned and managed by NCMP 

Conclusion: events not designed as proposed, very inconsistent. Never go a bug because these async events aren't used at all (confirmed by Csaba Koscis) Instead bulk request wil be used for topology use cases.

kieran mccarthy and team agreed to:

  1. Temporary disable the legacy async request feature (task created:
POC to follow.
  1.  
    Jira
    serverONAP Jira
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-
1657

Defining header schema.

Integration of header with kafka.

Naming and versioning convention for the header schemas.

Higlights  
- Defined Common Header schema. Extended it and used in a base class.

  • Now defining the publisher to send the event and the headers.
10Depending #10 can schema inherit/extend a common schema for common headers

Commonly define them and then define what are mandatory(required) or optional as per the schema extending it.

If a field is not used in the extended schema then it should be able to handle it.

Extend the POC ( on #9 ) to cover this.

11Is anyone using Async Request feature?See

Event Overview

...

cps:org.onap.cps.ncmp.events:avc-subscription-event:v1

...

cps:org.onap.cps.ncmp.events:dmi-async-request-response-event-schema:v1

...

cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1

...

Bulk Response Event (Client)

...

#1 LCM Event (NCMP → Client Apps)

Description

LCM (Life Cycle Management) Event. Sent by NCMP when the state of a CM Handle changes. For diagram see CM-Handle State Changes and Notifications Overview#Notificationhandlingincode

...

  1. 1694
    )
  2. As part of a lower priority work items (but during Montreal) fiX related events with learnings from the new batch-usecase. (task created
    Jira
    serverONAP Jira
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-1693
    )
8Dmi Data AVC Event, use of eventSource field

Priyank Maheshwari wanted to store 'datastore' in this field but kieran mccarthy explained it to use for different purposes

kieran mccarthy Clients can use this field as per their requirements. 

9Can Headers be described with 'schema's owned and managed by NCMP 

POC to follow. 

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-

1660 we need to re-design event  #4 (Covers Point 6 as well) and #5 in a backward incompatible way. If no-one is using this feature right now (suspected) we can do this more easily/cheaper!
12Do we need additionalProperties for DMI ASync Data Request respondes (events #4, #5)The original code populates a framework defined 'additionalProperties' field with a singel key-value pair: "response-data",{<json data>}. No other (private) properties are added either in DMI PLugin or NCMP code. The name is just coincidence and misleading. In fact this 'additionalProperties' field should NOT have been used at all!No, the new schema should NOT add  'additionalProperties' field at all use 'additionalProperties:no' in the schema
titleLCM Event Details

Current LCM Event Object

...

M
E.g. cps:org.onap.ncmp.cmhandle.lcm-event

...

The version of the schema that this event adheres to

...

M

e.g v1.0

...

1657

Defining header schema.

Integration of header with kafka.

Naming and versioning convention for the header schemas. 'id' 

Does the headers schema have a version too?!


 Priyank Maheshwari confirmed headers can be described with a separate schema.

Both header schema's and event schemas will be published on https://docs.onap.org/projects/onap-cps/en/latest/cps-events.html

Header schema name and version will be maintained in the 'id' metadata field of header's schema . 

10Depending #10 can schema inherit/extend a common schema for common headers

Commonly define them and then define what are mandatory(required) or optional as per the schema extending it.

If a field is not used in the extended schema then it should be able to handle it.

extend the POC (on #9) to cover this.

 Priyank Maheshwari did the POC and the conclusion of that was that :-

  • One schema can extend the other schema.
  • We cannot override the mandatory/optional parameter from the Parent schema. 

Toine Siebelink agrees to go ahead with separate schema/headers per event.  There will be some duplication but it will have its advantage when versioning. 

11Is anyone using Async Request feature?

See

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-1660
we need to re-design event  #4 (Covers Point 6 as well) and #5 in a backward incompatible way. If no-one is using this feature right now (suspected) we can do this more easily/cheaper!

 Csaba Kocsis confirmed this is not used by Ericsson currently. No plans to use soon for single-cmhandle requests either (TBC). Need to decide priority (Csaba Kocsis to find out of fiXing the legacy schema(s)
See decision on issue #7

12Do we need additionalProperties for DMI ASync Data Request respondes (events #4, #5)The original code populates a framework defined 'additionalProperties' field with a singel key-value pair: "response-data",{<json data>}. No other (private) properties are added either in DMI PLugin or NCMP code. The name is just coincidence and misleading. In fact this 'additionalProperties' field should NOT have been used at all!No, the new schema should NOT add  'additionalProperties' field at all use 'additionalProperties:no' in the schema
13AVC Subscription Event (DMI → NCMP) (events #3)
  • Want to understand what 'data' is datatype referring to under Subscription Event?
    • What value comes under 'schemaName' & 'SchemaVersion' of Datatype definition under AVC Subscription Event?
    • Reconfirmation needed on 'schemaName' & 'SchemaVersion'  should be in the payload?

 kieran mccarthy this issue is now no longer relevant as the decision was to use CNCF Cloud Events instead as per decision #14

14Align headers with CNCF Cloud EventsUsing standard headers as defined by Cloud Events and possibly common header extension See Table below, CNFC Cloud Event alignment
CPS will use Cloud Events  3PP for all current and legacy events to ensure common format

kieran mccarthyand Toine Siebelink  agreed on general idea but exact list of common headers need to be agreed 
Jira (first impl.) to be added! 

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-1717

15

During the meeting we saw that the Header fields were prefiXed with "ce_" so we need to check if we are ok with that.

assume "ce_" can be used as all user of the CNCF lib will get this behavior, will check if it can be replaced with no prefix at all. 
Sourabh Sourabh and Priyank Maheshwari concluded a cloud events specific serializer is used that add this prefix and cannot easily be changed (also that would be inconsistent use of this library) 

CPS Team recommend to accept this prefix and simply document that this prefer is required when filtering on kafka headers defined by CloudEvenst standard.

  team agreed with  kieran mccarthy to accept "ce_" prefix on serialzied CE defined headers. 
Note. Event(s) documentation in RTD should mentioned this  clearly too

16Do will still need/ can we still use schemas for header details with CNCF library ?! How to publish info about non-standard headers like correlationid ?

Meeting on   Team agreed refer to CNFC doc. and add list of extensions in RTD documentation. (key and value constraints)

17Inconsistent casing convention for header fields v. json data fieldsJust observing. All header ion CNCF are lowercase whereas json field are camelCase. Don't want to change but want to make sure agree...

Meeting on   Team agreed this is the way it is and Toine Siebelink will update to CPS Style section: Contribution and Development#CommonStyleConventions

18Confirm 'source'. is to be added to ALL events (declared mandatory for CNFC events)

kieran mccarthy confirm is is compulsory and a value will need to be set for all event definition. in NCMP a default value of 'ncmp' can be used if no other source is applicable. Toine Siebelink will update this page were needed to add this field and default value

Event Overview

#Short NameSourceDestinationImpl. StatusNotesFull Schema NameDiagram Ref.
1LCM EventNCMPClient AppsIn UseLife Cycle Management Events, when cmHandles are added or removedcps:org.onap.ncmp.cmhandle.lcm-event:v1

...

CM-Handle State Changes and Notifications Overview#Notificationhandlingincode
2DMI Data AVC EventDMINCMPImplemented, Not in useAttribute Value Change in configuration management (CM) data.cps:org.onap.cps.ncmp.events:avc-event-schema:v15 in CPS Data Notifications Overview#ComponentDiagram
3AVC Subscription Create EventClient NCMP & DMIsImplemented, Not in useCreate Event Only

cps:org.onap.cps.ncmp.events:avc-subscription-event:v1

7 in CPS Data Notifications Overview#ComponentDiagram
4DMI Async Request Response EventDMINCMPIn UseDMI 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
5NCMP Async Request Response EventNCMPClient AppsIn UseForward 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
6Bulk Response Event (Internal)DMINCMPIn ProgressInternal Kafka topiccps:org.onap.cps.ncmp.event:dmi-async-bulk-response-event-schema:v15 in CPS-1515: Spike: Support Multiple CM-Handles for NCMP Get Operation (Data operations)#BulkRequestMessageFlow
7

Bulk Response Event (Client)

NCMP Client AppsIn ProgressForwarding the DMI responses to the client topiccps:org.onap.cps.ncmp.event:ncmp-async-bulk-response-event-schema:v16 in CPS-1515: Spike: Support Multiple CM-Handles for NCMP Get Operation (Data operations)#BulkRequestMessageFlow

#1 LCM Event (NCMP → Client Apps)

Description

LCM (Life Cycle Management) Event. Sent by NCMP when the state of a CM Handle changes. For diagram see CM-Handle State Changes and Notifications Overview#Notificationhandlingincode

Expand
titleLCM Event Details

Current LCM

...

Values that represents the state of a cmHandle

...

Type:Values

...

State of cmHandle

...

["ADVISED", "READY", "LOCKED", "DELETING", "DELETED"]

...

#2 DMI Data AVC Event  (ONAP DMI → NCMP)

Description

A normalized AVC Event  that ONAP DMI Plugin will send to NCMP. NCMP can process the event and update cached data if needed. See 5 in CPS Data Notifications Overview#ComponentDiagram
Other DMI Plugin might snet similar events, using same headers but different payload and value for 'eventSchema' Depending on the AVC subscription details those events might or might not be forwarded to the Client Apps.

Expand
titleDMI Data AVC Event
AVC

Event Object

FieldTypeDescription
Kafka
Header
Event
Payload
Field
Notes
(M=Mandatory, O=Optional)
CloudEvents Mapping
eventIDstringThe unique id identifying the event
x
X
M

Mandatorystandard (id)
eventCorrelationIdstringThe id identifying the event
x
.  In LCMEvent this is always a cmhandleIdX
Optional
(extension fields will be optional now)
extension (correlationid)
M
eventTimestringThe timestamp when original event occurred
x
X
Mandatorystandard (time)
O
eventSourcestringThe source of the eventX
xO Needs clarification, see issue #8

Mandatorystandard (source)
eventTypestringThe type of the event
x
X
Mandatory
M (e.g. cps:org.onap.cps.ncmp.events:avc-event)eventSchemastring
standard (type)
eventSchemastringThe schema that this event adheres to
x
X
M (

Mandatory e.g. cps:org.onap.

cps

ncmp.

ncmp

cmhandle.

events:avc-event-schema

lcm-event:1.0.0

standard (dataschema)
eventSchemaVersionstring

The version of the schema that this event adheres to

x
X
M (

Mandatory e.g

.

v1.0

orv2.0)

N/A included in 'dataschema'
eventEventThe payload of an event
X
M
Mandatory
Type: Event (
standard (data)
N/AN/AThe version of CNCF SpecificationX
Specified by CNCF (value hardcoded)

standard (specversion)

Type:Event (cps:

cps:

org.onap.

cps

ncmp.

ncmp

cmhandle.

events:avc

lcm-event

-schema

:v1)

FieldTypeDescription
Kafka
Header
Event
Payload
Field
Notes
No Properties defined (entire event treated as single object) See open issue #1

#3 AVC Subscription Event (DME → NCMP)

Description

AVC Subscription Event  (External Clients Apps  → NCMP) : ON HOLD - kieran mccarthy to analyze further

ekiemcc : This is now covered by the header?  Is this needed any longer in the body?
cmHandleIdstringcmHandle id
X
oldValuesValues

Values that represents the state of a cmHandle


XDefined by values object below
newValuesValuesValues that represents the state of a cmHandle
XDefined by values object below

Type:Values

Expand
titleAVC Subscription Event
Subscription Event Object

FieldTypeDescription
Kafka
Header
Event
Payload
Field
Notes
version
dataSyncEnabledstring

The event type versionekiemcc : What is this version?  This should be covered in the header now?eventTypestring

The event type

cmHandle id
X
cmHandleStatestring

State of cmHandle


XEnum: 
[
"CREATE"]eventEventThe payload for an eventDefined by event object below

Event Object (cps:org.onap.cps.ncmp.events:avc-subscription-event:v1)

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotessubscriptionSubscriptionThe subscription detailsxDefined by subscription object belowdataTypeDataType

The datatype content

xDefined by dataType object belowpredicatesPredicates

Additional values to be added into the subscription

xDefined by predicates object below

Type: Subscription

"ADVISED", "READY", "LOCKED", "DELETING", "DELETED"]
cmHandlePropertiesobjectcmHandle properties
XList of Java <String, String> Maps


#2 DMI Data AVC Event  (ONAP DMI → NCMP)

Description

A normalized AVC Event  that ONAP DMI Plugin will send to NCMP. NCMP can process the event and update cached data if needed. See 5 in CPS Data Notifications Overview#ComponentDiagram
Other DMI Plugin might snet similar events, using same headers but different payload and value for 'eventSchema' Depending on the AVC subscription details those events might or might not be forwarded to the Client Apps.

name
Expand
titleDMI Data AVC Event

AVC Event Object

FieldTypeDescription
Kafka
Header
Event
Payload
Field
Notes
clientID
CloudEvents Mapping
eventIDstringThe
client ID
unique id identifying the eventX
Mandatorystandard (id)
eventCorrelationId
x
stringThe
name of
id identifying the
subscription
event
x
X
isTaggedboolean

optional parameter, default is false

xdefault: false

Type: DataType

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotesdataspacestring

The dataspace name

xdataCategorystring

The category type of the data

xdataProviderstring

The provider name of the data

xschemaNamestring

The name of the schema

xschemaVersionstring

The version of the schema

x

Type: Predicates

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotestargetsarray

CM Handles to be targeted by the subscription

xdatastorestring

datastore which is to be used by the subscription

xxpath-filterstring

filter to be applied to the CM Handles through this event

x

#4 DMI Async Request Response Event (DMI → NCMP)

Description

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


Optionalextension(correlationid)
eventTimestringThe timestamp when original event occurredX
Optionalstandard (time)
eventSourcestringThe source of the eventX
Optionalstandard (source)
eventTypestringThe type of the eventX
Mandatory (e.g. cps:org.onap.cps.ncmp.events:avc-event)standard (type)
eventSchemastringThe schema that this event adheres toX
Mandatory (e.g. cps:org.onap.cps.ncmp.events:avc-event-schema)standard (dataschema)
eventSchemaVersionstring

The version of the schema that this event adheres to

X
MandatoryN/A included in 'dataschema'
eventEventThe payload of an event

Mandatorystandard (data)

Type: Event (cps:org.onap.cps.ncmp.events:avc-event-schema:v1)

FieldTypeDescriptionHeaderPayloadNotes

No Properties defined (entire event treated as single object) See open issue #1
Priyank Maheshwari  This is how the event will look like.

CPS-1065 Spike: CM data notifications from NCMP to applications including subscriptions#EventPayloadExample


#3 AVC Subscription Event (DME → NCMP)

Description

AVC Subscription Event  (external Clients Apps  → NCMP) 

Priyank Maheshwari  We need to revisit this schema and include the cloud events fields. (At the moment this doesn't have proper fields) 

eventCorrelationId
Excerpt


Expand
titleAVC Subscription Event

Subscription

Expand
titleDMI Async Request Response Event
DmiAsyncRequestResponse

Event Object

FieldTypeDescription
Kafka
Header
Event
Payload
Field
Notes
eventID
CloudEvents Mapping
versionstringThe
unique id identifying the event generated by DMI
event type versionX

included in dataschema
eventType
x
string

The

request id passed by NCMPxeventTimestringThe timestamp when original event occurredxeventTargetstringThe target of the eventxeventTypestringThe type of the eventxeventSchemastring

The event schema for async request response events

xeventSchemaVersionstring

The event schema version for async request response events

xeventSourcestringThe source of the eventxeventContentEventContentThe payload of an event

The name of this fields is inconsistent with all other event schemas, see issue #6

Type: EventContent (cps:org.onap.cps.ncmp.events:dmi-async-request-response-event-schema:v1)

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotesrepsonse-data-schemastring

The schema of response data

xresponse-statusstring

The status of the response

xresponse-codestring

The code of the response

xresponse-dataobjectThe data payloadxcontains payload of type object

#5 NCMP Async Request Response Event (NCMP → Client App)

Description

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

event type

X


standard (type)
source

X
NEW  see decision #18, value <clientId> (same as in payload) TBCstandard (source)
eventEventThe payload for an eventX
Defined by event object belowstandard (data

Event Object (cps:org.onap.cps.ncmp.events:avc-subscription-event:v1)

FieldTypeDescriptionHeaderPayloadNotes
subscriptionSubscriptionThe subscription details
XDefined by subscription object below
dataTypeDataType

The datatype content


XDefined by dataType object below
predicatesPredicates

Additional values to be added into the subscription


XDefined by predicates object below

Type: Subscription

FieldTypeDescriptionHeaderPayloadNotes
clientIDstring

The client ID


X
namestring

The name of the subscription


X
isTaggedboolean

optional parameter, default is false


Xdefault: false

Type: DataType

FieldTypeDescriptionHeaderPayloadNotes
dataspacestring

The dataspace name


X
dataCategorystring

The category type of the data


X
dataProviderstring

The provider name of the data


X
schemaNamestring

The name of the schema


X
schemaVersionstring

The version of the schema


X

Type: Predicates

FieldTypeDescriptionHeaderPayloadNotes
targetsarray

CM Handles to be targeted by the subscription


X
datastorestring

datastore which is to be used by the subscription


X
Xpath-filterstring

filter to be applied to the CM Handles through this event


X




#4 DMI Async Request Response Event (DMI → NCMP)

Description

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

Type: Event (cps:org.onap.cps.ncmp.events:ncmp-async-request-response-event-schema:v1)

Expand
titleDMI Async Request Response Event

DmiAsyncRequestResponse Event Object

Expand
titleNCMP Async Request Response Event

NcmpAsyncRequestResponse Event Object

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotes
eventIDstringThe unique id identifying the event generated by DMIxeventCorrelationIdstring

The request id passed by NCMP

xeventTimestringThe timestamp when original event occurredxeventTargetstringThe target of the eventxeventTypestringThe type of the eventxeventSchemastring

The event schema for async request response events

xeventSchemaVersionstring

The event schema version for async request response events

xeventEventThe payload of an eventDefined by event object belowforwardedEventForwardedEventThe payload of a forwarded event

Relation to Event field unclear, do we need 2 events at all see issue #7

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotes
eventIDstring
FieldTypeDescriptionHeaderPayload NotesCloudEvents Mapping
eventIDstring
The unique id identifying the event generated by DMI
xOnly in payload in v1 of the payload schema.  To be removed in v2 version (will be in the header only)
X

standard (id
eventCorrelationIdstring

The request id passed by NCMP

xas above
X

extensions (correlationid)
eventTimestringThe timestamp when original event occurred
x
X

standard (time
as above
eventTargetstringThe target of the event
x
X

extensions (target)
as above
eventTypestringThe type of the event
x
X

standard (type
as above
eventSchemastring

The event schema for async request response events

xas above
X

standard (dataschema
eventSchemaVersion
eventSource
string

The

source of the eventxresponse-data-schemastring

The received schema of response data

x

event schema version for async request response events

X

N/A included in 'dataschema'
eventSource
response-status
stringThe
received status
source of the
responsexresponse-codestring

The received code of the response

xresponse-dataobject

The data payload

xcontains payload of type object