Versions Compared

Key

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

...

RFC 8641 : Subscription to YANG Notifications for Datastore Updates

Extract from RFC 8641 :

...

module: ietf-yang-push

     rpcs:
       +---x resync-subscription {on-change}?
          +---w input
             +---w id    sn:subscription-id

     yang-data (for placement into RPC error responses):
       +-- resync-subscription-error
       |  +--ro reason?                   identityref
       |  +--ro period-hint?              centiseconds
       |  +--ro filter-failure-hint?      string
       |  +--ro object-count-estimate?    uint32
       |  +--ro object-count-limit?       uint32
       |  +--ro kilobytes-estimate?       uint32
       |  +--ro kilobytes-limit?          uint32
       +-- establish-subscription-error-datastore
       |  +--ro reason?                   identityref
       |  +--ro period-hint?              centiseconds
       |  +--ro filter-failure-hint?      string
       |  +--ro object-count-estimate?    uint32
       |  +--ro object-count-limit?       uint32
       |  +--ro kilobytes-estimate?       uint32
       |  +--ro kilobytes-limit?          uint32
       +-- modify-subscription-error-datastore
          +--ro reason?                   identityref
          +--ro period-hint?              centiseconds
          +--ro filter-failure-hint?      string
          +--ro object-count-estimate?    uint32
          +--ro object-count-limit?       uint32
          +--ro kilobytes-estimate?       uint32
          +--ro kilobytes-limit?          uint32
       notifications:
          +---n push-update
          |  +--ro id?                   sn:subscription-id
          |  +--ro datastore-contents?   <anydata>
          |  +--ro incomplete-update?    empty
          +---n push-change-update {on-change}?
             +--ro id?                   sn:subscription-id
             +--ro datastore-changes
             |  +--ro yang-patch
             |     +--ro patch-id    string
             |     +--ro comment?    string
             |     +--ro edit* [edit-id]
             |        +--ro edit-id      string
             |        +--ro operation    enumeration
             |        +--ro target       target-resource-offset
             |        +--ro point?       target-resource-offset
             |        +--ro where?       enumeration
             |        +--ro value?       <anydata>
             +--ro incomplete-update?    empty

Alternatives 

Alternative event headers include

Alt #1 

...

    { 
      "eventId": "00001", 
      "eventTime": "2015-11-16T16:42:25-04:00", 
      "eventType": "org.onap.ncmp.CmHandleCreateEvent",
     "eventSource": "org.onap.ncmp", # ??? Is this needed?
     "event": {

<event body>
}

...

{
  "schema": "org.onap.ncmp:cmhandle-lcm-event-schema:v1",
  "id": "77b8f114-4562-4069-8234-6d059ff742ac",
  "source": "org.onap.ncmp",
  "type": "org.onap.ncmp.cmhandle-lcm-event",
  "content": {
     "observedTimestamp": "2020-12-01T00:00:00.000+0000",  # time of received REST registration request
     "cmhandleId": "43t345tbnfd85435"
     "operation" : "CREATE",
     "data" : {

           <event body>

      }

}

...

{

 "eventId": "00001",

 "eventTime": "2015-11-16T16:42:25-04:00",

 "eventType": "org.onap.ncmp.cmhandle-lcm-event",
 "eventSource": "org.onap.ncmp", # ??? Is this needed?

...

Alternatives 

Alternative event headers include

Alt #1 


Current CPS event

{
  "schema": "org.onap.ncmp:cmhandle-lcm-event-schema:v1",
  "id": "77b8f114-4562-4069-8234-6d059ff742ac",
  "source": "org.onap.ncmp",
  "type": "org.onap.ncmp.cmhandle-lcm-event",
  "content": {
     "observedTimestamp": "2020-12-01T00:00:00.000+0000",  # time of received REST registration request
      ....

   }

}


 Proposed event for cmhandle LCM

{
  "eventId"            : "00001",         
  "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

-schema

:v1",   

  "event": {
 

    "ietf-yang-push:push-change-update" : {

         "id" : "349839",

   “cmhandle-id”         : “sdfksdkf-001”,
     “operation”             

"datastore-changes" : {
             "ietf-yang-patch:yang-patch" : {
                 "patch-id" : "34534ffd98",  # Some random patch id generated by the machine 
                 "edit" : [
                    {
                      "edit-id" : "ded43434-1",
                      "operation" : "create",
                      "target" : "cmhandle=111222333",
                      "value" : {
                           "state" : {
                 

: “create”,
     “cmhandle-state”     : “ADVISED”
     “cmhandle-properties” : [
          “public-property-name-1” : “public-property-value-1”,
          “public-property-name-2” : “public-property-value-2”     ]
    }
}

Proposal Details

Scope covers the Create, Update and Delete of CM Handles.

Update is required as an application must know when we go from ADVISED to READY state.

Proposal is via the main scenarios.... the schema can reflect this.



cmhandle Event TypeDetailEvent
CREATEAdd New CM Handle.
CM Handle added to NCMP in ADVISED state with publicCmhandleProperties

{
  "eventId"                  : "00001",    
  "eventCorrelationId  : "cmhandle-001"      
  "eventTime"             

"cmhandleState" : "ADVISED"

: "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",   

   "eventOrigin" : {
      ...
   }

 

 

"event": {
     “operation”             

  ]

: “create”,
     “cmhandle-state”     

        }
     

: “ADVISED”
     “cmhandle-properties” : [
          “public-property-name-1” : “public-property-value-1”,
          “public-property-name-2” : “public-property-value-2”     ]
    }
}

Proposal Details

Scope covers the Create, Update and Delete of CM Handles.

Update is required as an application must know when we go from ADVISED to READY state.

Proposal is via the main scenarios.... the schema can reflect this.

cmhandle Event TypeDetailEvent
CREATEAdd New CM Handle.
CM Handle added to NCMP in ADVISED state with publicCmhandleProperties
{
  "schema": "org.onap.ncmp:cmhandle-lcm-event-schema:v1",
  "id": "77b8f114-4562-4069-8234-6d059ff742ac",
  "source": "org.onap.ncmp",
  "type"UPDATE

Update cmhandle.
cmhandle goes from ADVISED to READY once the schemas are
discovered/added for the cmhandle

schemaSet is also sent in the event as it has been updated along
with the state transition

{
  "eventId"                  : "00001",    
  "eventCorrelationId  : "cmhandle-001"      
  "eventTime"              : "2021-11-16T16:42:25-04:00",
  "eventSource"           : "org.onap.ncmp

.cmhandle-lcm-event

",                                 
  "

content

eventType"

: {

     

"observedTimestamp": "2020-12-01T00:00:00.000+0000",

 

# time of received REST registration request

     

"cmhandleId": "43t345tbnfd85435"
     "operation" : "CREATE",
     "data" : {   # May add new payload info in future, e.g.  publicCmHandleProperties
         "state" : {
 

: "org.onap.ncmp.cmhandle-lcm-event",   
  ”eventSchema”         : “org.onap.ncmp:cmhandle-lcm-event:v1",   

   "eventOrigin" : {
      ...
   }

  "event": {
     “operation”             

"cmhandleState" : "ADVISED"
           }
    }
  }
}
UPDATE

Update cmhandle.
cmhandle goes from ADVISED to READY once the schemas are
discovered/added for the cmhandle

schemaSet is also sent in the event as it has been updated along
with the state transition: “update”,
     “cmhandle-state”     : “READY”
     "schemaSet": ["schema-name-1", "schema-name-2", "schema-name-3", "schema-name-4", "schema-name-5"]   #  list of all yang modules
}

{
  "schema": "urn:cps:org.onap.ncmp:cmhandle-lcm-event-schema:v1",
  "id": "77b8f114-4562-4069-8234-6d059ff742ac",
  "source": "urn:cps:org.onap.ncmp",
  "type": "org.onap.cps.cmhandle-lcm-event",
  "content": {
    "observedTimestamp": "2020-12-01T00:00:00.000+0000",
    "cmhandleId": 43t345tbnfd85435
    "operation" : "UPDATE",
    "data": {  #  only changed properties are returned
         "state" : {
             "cmhandleState" : "READY"
          },
         "schemaSet": ["schema-name-1", "schema-name-2", "schema-name-3", "schema-name-4", "schema-name-5"]   #  list of all yang modules
      }
    }
  }
}

UPDATE

Update cmhandle

Multiple updates to a cmhandle
Update a publicCmhandleProperty attributes

{
  "schema": "urn:cps:org.onap.ncmp:cmhandle-lcm-event-schema:v2",
  "id": "77b8f114-4562-4069-8234-6d059ff742ac",
  "source": "urn:cps:org.onap.ncmp",
  "type": "org.onap.cps.cmhandle-lcm-event",
  "content": {
    "observedTimestamp": "2020-12-01T00:00:00.000+0000",
    "cmhandleId": 43t345tbnfd85435
    "operation" : "UPDATE",
    "data": {
         "publicCmhandleProperties" : [
             "property-name-1" : null   #  indicates the property has been deleted/removed from the cmhandle
             "property-name-2" : "some-prop-value-2"  # indicates the property has been modified.
             "property-name-3" : "some-prop-value-3"  # This is a new cmhandle property added.
         ]
      }
    }
  }
}
UPGRADE

Upgrade cmhandle

SchemaSet change.  
Triggered by an upgrade of a network element for example

{
  "schema": "urn:cps:org.onap.ncmp:cmhandle-lcm-event-schema:v2",
  "id": "77b8f114-4562-4069-8234-6d059ff742ac",
  "source": "urn:cps:org.onap.ncmp",
  "type": "org.onap.cps.cmhandle-lcm-event",
  "content": {
    "observedTimestamp": "2020-12-01T00:00:00.000+0000",
    "cmhandleId": 43t345tbnfd85435
    "operation" : "UPGRADE",
    "data": {

         "originalSchemaSet" : ["schema-name-1", "schema-name-2", "schema-name-3", "schema-name-4", "schema-name-5.1"],
         "newSchemaSet": ["schema-name-1", "schema-name-2", "schema-name-3", "schema-name-4", "schema-name-5.2", "schema-name-6"]
      }
    }
  }
}

DELETEDelete cmhandle{
  "schema": "org.onap.ncmp:cmhandle-lcm-event-schema:v1",
  "id": "77b8f114-4562-4069-8234-6d059ff742ac",
  "source": "org.onap.ncmp",
  "type": "org.onap.ncmp.cmhandle-lcm-event",
  "content": {
    "observedTimestamp": "2020-12-01T00:00:00.000+0000",
    "cmhandleId": 43t345tbnfd85435
    "operation" : "DELETE"
}

...