Versions Compared

Key

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

...

  • Properties are removed by setting the value to null in the update registration request. (Only applicable when updatedCmHandles json tag is present)
  • Both Additional and Public properties should be taken care off as part of the update.

Analysis

Interface Proposal

Proposal

ScenarioURIPayload/Input RequestSuggested Code / ChangesComments
Request to create the cmHandle

POST

{ncmpRoot}/ncmpInventory/v1/ch/


{
  "dmiPlugin": "onap.dmi.plugin",
  "createdCmHandles": [
    {
      "cmHandle": "myHandle1",
      "cmHandleProperties": {
        "prop1": "value1",
        "prop2": "value2",
        "prop3": "value3"
      }
    }
  ]
}


No Impact. It will create the cmHandle.Existing behaviour.
Request has updatedCmHandles tag present in the incoming request.

POST

{ncmpRoot}/ncmpInventory/v1/ch/


{
  "dmiPlugin": "onap.dmi.plugin",
  "updatedCmHandles": [
    {
      "cmHandle": "myHandle1",
      "cmHandleProperties": {
        "prop1": null,
        "prop2": "newValue2",
        "prop4": "value4"
      }
    }
  ]
}










Requirement URI
Comment

NCMP-008

Register or update public cmhandle properties


{ncmpRoot}/ncmpInventory/v1/ch/
Scenario : DMI notifies NCMP of new, updated or removed cmhandles
Method : POST
URI : {ncmpRoot}/ncmpInventory/v1/ch/
Header :
Content-Type: application/json


Request Body

Request Body : {
      "dmiPlugin" : "onap.dmi.plugin",
      "createdCmHandles" : [ {   "cmHandle" : "

rf4er5454

cmHandle1",
                                 "cmHandleProperties" : {
                                    

"samplePropertyName1" : "samplePropertyValue1

"prop1" : "value1",
                                    "prop2" : "value2",


                                    "prop3" : "value3"
                                  }        

                                                                         "publicCmHandleProperties" :  {     
                                                                                "hostedBy" : "cmhandle-5678"                                                                                       
                                                                                 "samplePropertyName2" : "samplePropertyValue2

                                  }

                             },
                             {..}
                           ],

      "updatedCmHandles" : [
                             {

                                 "cmHandle" : "ds4errr77",
                                 "cmHandleProperties" : { # To remove a property, set the value to null
                                    "samplePropertyName1" : "updatedSamplePropertyValue1",
                                    "samplePropertyName2" : null  # This property will be removed
                                  }        

                                                                         "publicCmHandleProperties" :  {      # To remove a property, set the value to null
                                                                               "hostedBy" : "cmhandle-11213",
                                                                                "samplePublicPropertyName1" : "updatedSamplePublicPropertyValue2"

                                  }


                             },
                             {..}

                           ],
      "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
  • Is the URI being updated to {ncmpRoot}/ncmpDmi/v2/ch ?
  • Update to an existing interface
  • New proposed additions in red
  • To remove a property, suggest to set the value for the property to json null in the updatedCmHandles section
  • Note, the given
    • properties
    like hostedBy are sample data only.



    December 2021 Yang Model for Public Properties Support

    ...