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

Create Data Synchronization watchdog

XMLWordPrintable

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

      (Many technical issue are similar/already resolved as part of https://jira.onap.org/browse/CPS-875)

      Step 1-4 Similar to Module Watch dog:

      1. look for (using cpsPath query) ONE (shuffle?) CM Handle (overal) State = 'READY' and Sync State 'UNSYNCHRONIZED'
        1. Modulesyncwatchdog (reference)
      2. execute Data Sync (read from root) using CPS-Core Java API
        1. Get the data - org.onap.cps.ncmp.api.impl.operations.DmiDataOperations#getResourceDataFromDmi (similar method)
        2. Data conversion - Analyze -> Need to get the structure of the Response from getResourceDataFromDmi
        3. Save the data - org.onap.cps.api.impl.CpsDataServiceImpl#saveData(java.lang.String, java.lang.String, java.lang.String, java.time.OffsetDateTime)
      3. Set CM Handle Sync State 'SYNCHRONIZED' (& update timestamp)

       

      Question:

      1. Do we need to have the intermediate 'SYNCHRONIZING' state?
        no, use HazelCast distributed cache to keep this 'state'
      2. What exactly read from top-level element means?
        See (old) demo here: https://wiki.onap.org/download/attachments/93000392/CPS-231.mp4?version=2&modificationDate=1614013592000&api=v2
      3. Yet to discuss on the failure scenario (validation errors)
        Log error, set state to Locked-misbehaving with reason details
      4. Once data sync is completed the CM handle (overall) state should be updated? -> No. CM Handle will remain in READY State.
      5. How to get the resourceIdentifier ? e.g.  "stores:bookstore"
        this identifier consists off the <module-name>: <top-level-container-name>
        Use SchemaContext (ODL) Java object defined and created heer: org.onap.cps.yang.YangTextSchemaSourceSetBuilder#generateSchemaContext
        Instead setup a new simulator set-up with just one module and one top-level-container (work with JosephKeenan if possible)
      6. What should be the parentNodeXpath value? /dmi-registry? (in saveData)
        No parent paths, use Java AP-Method: org.onap.cps.api.CpsDataService#saveData(String dataspaceName, String anchorName, String jsonData, OffsetDateTime observedTimestamp);
        dataspaceName = 'NFP-Operational'
        anchorName = CM-Handle-Id
      7. If data already exists?
        Throw exception! (workaround for client is to delete the data)

       

      A/C:

      1. Document and Agree proposal with Team 
      2. Demo to show the data being synchronised successfully from the RAN-Sim. [Need to have some CM handle state = ADVISED for the Module sync watchdog to update the cm handle state to READY.]

       

       

       

            sourabh_sourabh Sourabh Sourabh
            ToineSiebelink Toine Siebelink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: