Details
-
Story
-
Status: Closed
-
Medium
-
Resolution: Done
-
None
Description
(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:
- look for (using cpsPath query) ONE (shuffle?) CM Handle (overal) State = 'READY' and Sync State 'UNSYNCHRONIZED'
- Modulesyncwatchdog (reference)
- execute Data Sync (read from root) using CPS-Core Java API
- Get the data - org.onap.cps.ncmp.api.impl.operations.DmiDataOperations#getResourceDataFromDmi (similar method)
- Data conversion - Analyze -> Need to get the structure of the Response from getResourceDataFromDmi
- Save the data - org.onap.cps.api.impl.CpsDataServiceImpl#saveData(java.lang.String, java.lang.String, java.lang.String, java.time.OffsetDateTime)
- Set CM Handle Sync State 'SYNCHRONIZED' (& update timestamp)
Question:
- Do we need to have the intermediate 'SYNCHRONIZING' state?
no, use HazelCast distributed cache to keep this 'state' - 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 - Yet to discuss on the failure scenario (validation errors)
Log error, set state to Locked-misbehaving with reason details - Once data sync is completed the CM handle (overall) state should be updated? -> No. CM Handle will remain in READY State.
- 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) - 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 - If data already exists?
Throw exception! (workaround for client is to delete the data)
A/C:
- Document and Agree proposal with Team
- 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.]
Attachments
Issue Links
- blocks
-
CPS-1003 De-registration: send required event(s) using central state handler
-
- Closed
-
- is blocked by
-
CPS-999 Add Anchor to to 'NCMP-CmHandle-Operational-Data' Dataspace (upon model-sync)
-
- Closed
-
-
CPS-1014 Update the Registry Yang module with DataStoreSyncState
-
- Closed
-
- relates to
-
CPS-1055 AND Condition in CPS Path
-
- Closed
-
-
CPS-1119 Define the Initial DataSyncEnabled-flag & SyncStateEnum after module Sync based on 'hidden' config param
-
- Closed
-
-
CPS-875 CM Handle State: Watchdog-process that syncs 'ADVISED' CM Handles
-
- Closed
-