Versions Compared

Key

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

...

Expand


#Req/usecase

REST

Method

 URI

Request/Response Example
1DMI notifies NCMP of new , deleted or changed cmhandles DMI Plugin NCMP. Including initial registrationPOST{ncmpRoot}/ncmp/v1/ch/
Scenario : DMI notifies NCMP of new cmhandles
Method : POST
URI : {ncmpRoot}/ncmp/v1/ch/
Header :
Content-Type: application/json

Code Block
languagexml
titleRequest Body
Request Body : {
      "dmiPlugin" : "onap.dmi.plugin", 
      "createdCmHandles" : [ {   "cmHandle" : "rf4er5454",
                                 "cmHandleProperties" :
                                   { "subSystemId" : "system-001" }
                             }, {..} ],
      "updatedCmHandles" : [ .. ],
      "removedCmHandles" : [ "node-1", "node-2" , ... ]
  }


json attributes:

  • "dmiPlugin" resolvable servicename
  • "createdCmHandles" used for initial cm handle registrations or subsequent
    cmhandle creations
  • "updatedCmHandles"
    Used for updates to cmhandles. Same structure as for create handles
  • "removedCmHandles"  array of cmhandles that have been deleted
    from the network (no additional properties
2Get all cm handles that support a given
module
POST

{ncmpRoot}/ncmp/v1/ch/searches


/v1/ch/search/modules

Scenario : Get the all cmhandles that support a given module
URI :  {ncmpRoot}/ncmp/v1/ch/searches


The minimal requirement is if we provide the AND query impl then for OR query the client can send multiple requests


Request Body

Content: application/json

Note: revision should be optional 

{

  "modules": [
    {
    "module-namemoduleName": "some-module" , (Mandatory)
}     "revision": "" (Optional)
    }
  ]
}


Header :
Accept: application/json
Response:

Should return an array of objects as we may add more data in the future 
{
  "cmHandles": [

"ew534fe", "23ft4", "434fsdf", ...


    {
      "cmHandleId": "xxx"
    }
  ]
}

3Request (trigger) Data SyncPOST

{ncmpRoot}/ncmp/v1/ch/<cmHandle>/syncData

Scenario : Client requests to sync a node

URI : {ncmpRoot}/ncmp/v1/ch/node123/syncData

Response   : HTTP-Status code (only, no body)

4Get model info for CMHandleGET

{ncmpRoot}/ncmp/v1/ch/{cmHandle}/modules

Scenario : Get the model data for CMHandle

URI :{ncmpRoot}/ncmp/v1/ch/2334dedf/modules

Header :
      Accept: application/json

Response:

  [
        {
            "moduleName": "nc-notifications",
            "revision": "2008-07-14",
        },
        {
            "moduleName": "ietf-tls-server",
            "revision": "2016-11-02",
        },
        {
            "moduleName": "ietf-ssh-server",
            "revision": "2016-11-02",
        }
    ]
5Get all the registered cmhandles for a given pluginGET{ncmpRoot}/ncmp/v1/dmiPlugins/{pluginId}/ch

Scenario : Get all cmhandles from NCMP for a given dmiPlugin. May be used
for conciliation
Method : GET
URI : {ncmpRoot}/ncmp/v1/dmiPlugins/{dmiPlugin}/ch
Header :
Content-Type: application/json

Code Block
languagexml
titleResponse Body
Success Response :
    HTTP/1.1 200 Ok
Date: Thu, 26 Jan 2021 20:56:30 GMT
Server: example-server
  { "cmHandles" : [ {
          "cmHandle" : "node-1",
          "cmHandleProperties " : { "subSystem" : "system-001" }
       } ]
   }



...