Versions Compared

Key

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

References

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-799

Issues/Decisions

#IssueNotesDecision
1


Proposal

The state of a given cmhandle consists of the cmhandle state itself as well as the synchronization state information related to the model instance data related to the cmhandle.  Below shows the makeup of this state follow by the allowed cmhandle state transitions.


           


NCMP CRUD / Action requests are only allowed if state.cmhandleState == READY.

CRUD / Action requests are rejected with IllegalStateException for all other cmHandleStates.

Requests to get state / public properties / cmhandle metadata are always allowed on a cmhandle regardless of the value of 'state'.

CmHandle state transitions : 



Supported NCMP API Requests  (CPS-E-05):  

No Format
Get the current state of a cmhandle when cmhandle is READY

------ Sync ------------------------------------------------------------------------------
    Request (sync)
           GET  {ncmp-root}/ncmp/v1/ch/<cmhandle>/state
           Accept: application/json

     Response 
           "state" : {
                "cmHandleState" : "READY",
                "dataSyncEnabled" : true,
                "dataSyncState" : {
                    "state" : "SYNCHRONIZED",
                    "lastSyncTime" : "2022-04-01 07:37:20"
                }
            }


Get the current state of a cmhandle when cmhandle is LOCKED

------ Sync ------------------------------------------------------------------------------
    Request (sync)
           GET  {ncmp-root}/ncmp/v1/ch/<cmhandle>/state
           Accept: application/json

     Response 
           "state" : {
               "cmHandleState" : "LOCKED",
               "lockReason"    : {
                     "reason"  : "LOCKED_MISBEHAVING",
                     "details" : "Error recovering Modules for cmhandle"
                }
            }
               

------ Async ------------------------------------------------------------------------------
    Request (async)
            GET  {ncmp-root}/ncmp/v1/ch/<cmhandle>/state?topic=<topic-name>
            Accept: application/json

    Response 
            {
               "requestId" : "dffrtg56-rt56"
            }

    Event :

             "requestId" : "dffrtg56-rt56",
             "data" : {
                 "cmhandle" : "dfsdgfw454df",
                 "state" : {
                    "cmHandleState" : "READY",
                    "dataSyncEnabled" : true,
                    "dataSyncState" : {
                        "state" : "SYNCHRONIZED",
                        "lastSyncTime" : "2022-04-01 07:37:20"
                    }
                }
              }