...
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 |
---|
{ } } |
Proposed event for cmhandle LCM |
---|
{ |
:v1", |
"id" : "349839",
“cmhandle-id” : “sdfksdkf-001”, |
"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”, |
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 Type | Detail | Event |
---|---|---|
CREATE | Add New CM Handle. CM Handle added to NCMP in ADVISED state with publicCmhandleProperties | { |
: "2021-11-16T16:42:25-04:00", |
: "org.onap.ncmp.cmhandle-lcm-event", "eventOrigin" : { |
"event": { |
: “create”, |
: “ADVISED” |
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 Type | Detail | Event | ||||
---|---|---|---|---|---|---|
CREATE | Add 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. schemaSet is also sent in the event as it has been updated along | { ", 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", "eventOrigin" : { } } } } | UPDATE | Update cmhandle. schemaSet is also sent in the event as it has been updated along { |
UPDATE | Update cmhandle Multiple updates to a cmhandle | { "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. | { "originalSchemaSet" : ["schema-name-1", "schema-name-2", "schema-name-3", "schema-name-4", "schema-name-5.1"], | ||||
DELETE | Delete 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" } |
...