Versions Compared

Key

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

Table of Contents

...

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

Expand
titleAVC Subscription Event

Subscription Event Object

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotesCloudEvents Mapping
versionstringThe event type version

ekiemcc : What is this version?  This should be covered in the header now?
eventTypestring

The event type



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

Enum: 

["CREATE"]

standard ( type )
eventEventThe payload for an event

Defined by event object belowstandard ( data ) 

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

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotes
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

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotes
clientIDstring

The client ID


x
namestring

The name of the subscription


x
isTaggedboolean

optional parameter, default is false


xdefault: false

Type: DataType

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotes
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

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotes
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


...

Expand
titleDMI Async Batch Response Event

BatchResponseEvent Object

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotesCloudEvents Mapping
eventIDstringThe unique id identifying the event generated by DMIx

standard ( id ) 
eventCorrelationIdstring

The request id passed by NCMP

x
eventTarget


extensions (correlationid)
eventTargetstringThe destination topic of the clientx

extensions ( target )
eventTimestringThe timestamp when original event occurredx

standard ( time) 
eventTypestringThe type of the eventx

standard ( type ) 
eventSchemastring

The event schema for async request response events

x

standard ( dataschema ) 
eventSchemaVersionstring

The event schema version for async request response events

x

N/A included in 'dataschema'
eventEventThe payload of an event
xjava object not yet defined by schema, see issue #2standard ( data ) 


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

FieldTypeDescriptionKafka HeaderEvent Payload FieldNotes
No Properties defined (Entire event treated as single object)


...

Cloudy Event Library

Introduction...

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. )

link to library 

...

Library

https://github.com/cloudevents/spec

https://github.com/cloudevents/sdk-java

Examples : https://github.com/cloudevents/sdk-java/tree/main/examples/kafka/src/main/java/io/cloudevents/examples/kafka


Before

After

CloudeEvent builder methodExample ValueNotes

eventId

id

.withId()
Mandatory

eventSource

source

.withSource()
Mandatory

N/A

specversion  (default 1.0)

.v1()1.0Mandatory  - 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/jsonOptional
eventCorrelationIdcorrelationid.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 applies to the event which has this field.

eventdata.withData(json TBC)
Mandatory actual event/payload now would be under "data" field.

...