Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 12 Next »

References

CPS-858 - Getting issue details... STATUS

Open Issues & Decisions

#IssueNotesDecision
1

should dataspaceName be given another name?

dataspaces are private to an application (e.g. NCMP) they should not be shared

kieran mccarthy what do you mean by dataspaceName?

omit for now - put in later if needed/required.
2should schema urn be generalized, how might it impact publication to ORAN R1?

The schema of the payload is dictated by the source of the event

kieran mccarthy what do you refer to here?  Ans : the schema refers to 'org.onap'. 
Not sure if this is acceptable in an ORAN R1 specification.

Emailed ORAN guys to identify how to close the gap between ORAN and ONAP.
Not clear if we can publish an onap schema in ORAN!  Waiting on response.

.


3should "ncmp" be used rather than "cps" in the type definitions

 i.e. org.onap.cps.cmhandle-lcm-event or org.onap.ncmp.cmhandle-lcm-event?

NCMP owns these events, 'cps' should not appear (even if cps is emitting them)

NCMP java classnames begin with org.onap.cps.ncmp – Tony does not care (smile), but Toine does.

kieran mccarthy , where does this type come from?

schema urn should refer to ncmp - not cps.
4should a bulk cmhandle event be supported?

Prefer to delay this decision, but keep it in mind so we do not need to break compatibility to support it.

-- Could be tricky as with horizontal scale NCMP, multiple will be emitting simulatneously

leave out of scope for now

Input Reference Material

RFC 8639 : Subscription to YANG Notifications

RFC 8641 : Subscription to YANG Notifications for Datastore Updates

Extract from RFC 8641 :

3.5.2 On-Change Subscriptions
A publisher indicates the type of change to a datastore node using the different YANG Patch operations: the "create" operation is used for newly created objects (except entries in a user-ordered list), the "delete" operation is used for deleted objects (including in user-ordered lists), the "replace" operation is used when only the object value changes, the "insert" operation is used when a new entry is inserted in a list, and the "move" operation is used when an existing entry in a user-ordered list is moved. However, a patch must be able to do more than just describe the delta from the previous state to the current state. As per Section 3.3, it must also be able to identify whether transient changes have occurred on an object during a dampening period. To support this, it is valid to encode a YANG Patch operation so that its application would result in no change between the previous state and the current state. This indicates that some churn has occurred on the object. An example of this would be a patch that indicates a "create" operation for a datastore node where the receiver believes one already exists or a "replace" operation that replaces a previous value with the same value. Note that this means that the "create" and "delete" errors as described in [RFC8072], Section 2.5 are not errors in the case of YANG-Push (i.e., they are considered valid operations for YANG-Push).

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 

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>
}
Alt #2 Based on 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
     "cmhandleId": "43t345tbnfd85435"
     "operation" : "CREATE",
     "data" : {

           <event body>

      }

}


 Contents of event body based on RFC 8641 with Alt #1 header

{

 "eventId": "00001",

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

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

   "schema": "org.onap.ncmp:cmhandle-lcm-event-schema:v1"
 "event": {

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

         "id" : "349839",

         "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" : {
                               "cmhandleState" : "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 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": "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" : {   # May add new payload info in future, e.g.  publicCmHandleProperties
         "state" : {
              "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

{
  "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"
}
  • No labels