You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

References

Issues & Decisions

#Issue

Notes

Decisions

1Use "Generic" Detail-fields or or more specific fields

kieran mccarthy prefer to use specific terms like 'orginalState' instead of generic 'details'

2how many event schema's for different events wil there be?

e.g. 1 schema for state change, 1 other schema for public properties?
OR
a single schema with some fields not always of the used/compulsory

Need to discuss with kieran mccarthy 

3what is the best term to use for change events 'original', 'previous' or something elseTeam found term 'original' confusing and prefers 'previous' e.g. previousState
4Should public properties be part of (same) structure as stateTeam feels state and properties are very different and should not be combined into same structure
This also depends on open issue #2

Overview

This page is for deciding the structure of the proposed "detail" section which needs to be introduced in the NcmpEvent payload.
Refer : CPS-858 Define Notifications on CM Handle Add (Ready) & Delete  #8

Purpose : Additional field(s) to store information about the previous state.

Current Schema

Current NcmpSchema
{
  "eventId"                  : "00001",    
  "eventCorrelationId  : "cmhandle-001",       
  "eventTime"              : "2021-11-16T16:42:25-04:00",
  "eventSource"           : "org.onap.ncmp",                                 
  "eventType"              : "org.onap.ncmp.cmhandle-lcm-event",   
  ”eventSchema”         : “org.onap.ncmp:cmhandle-lcm-event:v1",   

  "event": {
     “cmhandle-state”     : “READY”,

      "cmHandleId" : "cmhandle-001",
      “cmhandle-properties” : [
          {“public-property-name-1” : “public-property-value-1”},
          {“public-property-name-2” : “public-property-value-2”}     
       ]
    }
}

Proposed Schema Alternatives

Option #1 Structured Details
{
  "eventId"                  : "00001",    
  "eventCorrelationId  : "cmhandle-001",       
  "eventTime"              : "2021-11-16T16:42:25-04:00",
  "eventSource"           : "org.onap.ncmp",                                 
  "eventType"              : "org.onap.ncmp.cmhandle-lcm-event",   
  ”eventSchema”         : “org.onap.ncmp:cmhandle-lcm-event:v1",   

  "event": {
     “cmhandle-state”     : “READY”,

      "cmHandleId" : "cmhandle-001",
     “cmhandle-properties” : [
          {“public-property-name-1” : “public-property-value-1”},
          {“public-property-name-2” : “public-property-value-2”}     
       ],
     "detail": {
         "detailMessage" : "sample message about the event",
          "lastCmHandleState" : "ADVISED"
          }
    }
}
Option #2  Only add 'lastCmHandleState'
{
  "eventId"                  : "00001",    
  "eventCorrelationId  : "cmhandle-001",       
  "eventTime"              : "2021-11-16T16:42:25-04:00",
  "eventSource"           : "org.onap.ncmp",                                 
  "eventType"              : "org.onap.ncmp.cmhandle-lcm-event",   
  ”eventSchema”         : “org.onap.ncmp:cmhandle-lcm-event:v1",   

  "event": {
     “cmhandle-state”     : “READY”,
     "last-cmhandle-state" : "ADVISED",

      "cmHandleId" : "cmhandle-001",
     “cmhandle-properties” : [
          {“public-property-name-1” : “public-property-value-1”},
          {“public-property-name-2” : “public-property-value-2”}     
       ]
    }
}
Option #3 'Details' consist of a property map
{
  "eventId"                  : "00001",    
  "eventCorrelationId  : "cmhandle-001",       
  "eventTime"              : "2021-11-16T16:42:25-04:00",
  "eventSource"           : "org.onap.ncmp",                                 
  "eventType"              : "org.onap.ncmp.cmhandle-lcm-event",   
  ”eventSchema”         : “org.onap.ncmp:cmhandle-lcm-event:v1",   

  "event": {
     “cmhandle-state”     : “READY”,

      "cmHandleId" : "cmhandle-001",
     “cmhandle-properties” : [
          {“public-property-name-1” : “public-property-value-1”},
          {“public-property-name-2” : “public-property-value-2”}     
       ],

   “detail” : [
          {“lastCmHandleState” : “ADVISED”},
          {“sampleMessage” : “some message”}     
       ]
    }
}

 

  • No labels