diff options
author | Rudrangi Anupriya <ra00745022@techmahindra.com> | 2023-07-17 20:20:34 +0530 |
---|---|---|
committer | Lee Anjella Macabuhay <lee.anjella.macabuhay@est.tech> | 2023-07-18 08:42:26 +0000 |
commit | ad61e283f7d981c3c8e307af871fb3a63e0cf4f9 (patch) | |
tree | 1c7670de106a9f157ec0456df8b7c0a1ef43e328 /integration-test/src/test/resources/data | |
parent | dcf84ad73f0301ef41049e692b9963f6dcac3661 (diff) |
Persisting a list element to a parent list (ep2)
Post List Element does not allow for create List Element, only appends onto existing node as children
-Add a check in saveListElements to see if the parent xpath is a root path ("/").If root node store list element as top node. Else add passed list element to parent xpath node.
-Add test for scenario for above
-Add test scenario Saving list element data fragment under Root node
-Add Integration Tests Add and Delete top-level list (element) data nodes with root node
-Update bookstore model with TopLevelList datanode
Issue-ID: CPS-1586
Change-Id: Iaa7f59fbeebb03703626132c6d5c2afde0e7ab4b
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
Diffstat (limited to 'integration-test/src/test/resources/data')
-rw-r--r-- | integration-test/src/test/resources/data/bookstore/bookstore.yang | 28 | ||||
-rw-r--r-- | integration-test/src/test/resources/data/bookstore/bookstoreData.json | 8 |
2 files changed, 36 insertions, 0 deletions
diff --git a/integration-test/src/test/resources/data/bookstore/bookstore.yang b/integration-test/src/test/resources/data/bookstore/bookstore.yang index e592a9c5ce..ab384de1c4 100644 --- a/integration-test/src/test/resources/data/bookstore/bookstore.yang +++ b/integration-test/src/test/resources/data/bookstore/bookstore.yang @@ -15,6 +15,34 @@ module stores { } } + list invoice { + key "ProductID"; + leaf ProductID { + type uint64; + mandatory "true"; + description + "Unique product ID. Example: 001"; + } + leaf ProductName { + type string; + mandatory "true"; + description + "Name of the Product"; + } + leaf price { + type uint64; + mandatory "true"; + description + "Price of book"; + } + leaf stock { + type boolean; + default "false"; + description + "Book in stock or not. Example value: true"; + } + } + container bookstore { leaf bookstore-name { diff --git a/integration-test/src/test/resources/data/bookstore/bookstoreData.json b/integration-test/src/test/resources/data/bookstore/bookstoreData.json index 12df20e55b..41d5a03a19 100644 --- a/integration-test/src/test/resources/data/bookstore/bookstoreData.json +++ b/integration-test/src/test/resources/data/bookstore/bookstoreData.json @@ -1,4 +1,12 @@ { + "multiple-data-tree:invoice": [ + { + "ProductID": "1", + "ProductName": "Apple", + "price": "100", + "stock": false + } + ], "bookstore": { "bookstore-name": "Easons", "premises": { |