Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-837

Remove and Add Properties as part of CM-Handle registration update

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Medium Medium
    • Jakarta Release
    • None
    • NCMP

      Within the NCMP CM-Handle registration post request add functionality to remove properties of an existing CM-Handle.

      Properties are removed by setting the value to null in the update registration request

      this can be done for both Additional and Public properties of the CM HandleOriginal Interface described here: https://wiki.onap.org/display/DW/CPS-391Spike%3A+Define+and+Agree+NCMP+REST+Interface#CPS391Spike:DefineandAgreeNCMPRESTInterface-Sync&ModelAPI #1

       

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

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

      • Properties can only be updated using 'updateCmHandles' json tag. Currently this only works with existing properties.
        • Property should be removed when explicitly set to null. see above example for  "prop1"
        • Property should not be removed because it is omitted. see above example for  "prop3" (value should remain)
        • New properties should be added (unlike current behavior which throws DataNode not found exception)

      Code Impacts

      •  org.onap.cps.ncmp.api.impl.NetworkCmProxyDataServiceImpl#parseAndUpdateCmHandlesInDmiRegistration
      • for each CM Handle :
        • need to retrieve existing properties (read dat using cps Service)
        • compare with incoming (updated) properties
        • create dataNode collection representing the updated properties
        • instead of cpsDataService.updateNodeLeavesAndExistingDescendantLeaves use cpsDataService.replaceListContent

       
      A/C # Create and agree proposal with team on (https://wiki.onap.org/display/DW/Implementation+Proposals)

      1. Update Open-API docs with details (add description and examples?) on property updates (https://wiki.onap.org/display/DW/Implementation+Proposals RestDmiPluginRegistration.updateCmHandles)
      2. Demo update scenarios to team

      Out-of-Scope

      1. CSIT Test, this alternative scenario of normal registration which can be covered by unit (Groovy/Spock)

       

            mpriyank Priyank Maheshwari
            dylanb95est dylanb95est
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: