Composite State to handle dmi-reg YANG updates
- Introduce CompositeState object which handles change in updated YANG for dmi-registry
- Used Builder pattern as some of the fields are optional
- Removed the abstract ready method from CmHandleState which was used as
state machine
- Fixed few test cases
Issue-ID: CPS-1042
Change-Id: I8aaf6f819c66b3a9d30c5e8f0a0007f9528b247f
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
diff --git a/cps-ncmp-service/src/test/resources/expectedStateModel.json b/cps-ncmp-service/src/test/resources/expectedStateModel.json
new file mode 100644
index 0000000..a416194
--- /dev/null
+++ b/cps-ncmp-service/src/test/resources/expectedStateModel.json
@@ -0,0 +1,19 @@
+{
+ "cm-handle-state" : "ADVISED",
+ "lock-reason" : {
+ "reason" : "lock-reason",
+ "details" : "lock-misbehaving-details"
+ },
+ "last-update-time" : "2022-01-01T01:01:01.000-1800",
+ "data-sync-enabled" : false,
+ "datastores" : {
+ "operational" : {
+ "sync-state" : "NONE_REQUESTED",
+ "last-sync-time" : "2022-01-01T01:01:01.000-1800"
+ },
+ "running" : {
+ "sync-state" : "NONE_REQUESTED",
+ "last-sync-time" : "2022-01-01T01:01:01.000-1800"
+ }
+ }
+}
\ No newline at end of file