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

Add support for persisting of top level list nodes

XMLWordPrintable

      Persisting a list element to a parent list 

      Sample data:

      Sample return:

       

      Analysis: 

      Curl commands:

      curl --location --request POST 'http://localhost:8883/cps/api/v2/dataspaces?dataspace-name=my-store' \
      --header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \
      --header 'Cookie: JSESSIONID=node01bdg502yw663e1kgvpn7a3p0yu0.node0'

       

      curl --location --request POST 'http://localhost:8883/cps/api/v1/dataspaces/my-store/schema-sets?schema-set-name=stores-module' \
      --header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \
      --header 'Cookie: JSESSIONID=node01bdg502yw663e1kgvpn7a3p0yu0.node0' \
      --form 'file=@"/C:/Users/LukeGleeson/Documents/bookstoreTopList.yang"'

       

      curl --location --request POST 'http://localhost:8883/cps/api/v1/dataspaces/my-store/anchors/bookstore-anchor-list/nodes' \
      --header 'Content-Type: application/json' \
      --header 'Cookie: JSESSIONID=node01bdg502yw663e1kgvpn7a3p0yu0.node0' \
      --data-raw '{
          "bookstore":{
              "bookstores": [
                 

      {                 "bookstore-name": "Books"             }

      ,
                 

      {                 "bookstore-name": "Stories"             }

              ]
          }
      }'

       

      curl --location --request GET 'http://localhost:8883/cps/api/v2/dataspaces/my-store/anchors/bookstore-anchor/node?xpath=/&descendants=5' \
      --header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \
      --header 'Cookie: JSESSIONID=node01bdg502yw663e1kgvpn7a3p0yu0.node0'

       

      A/C:

      1. Demo expected returns
      2. Update documentations to note supporting of top list elements

        1. bookstoreTopList.yang
          0.3 kB
          lukegleeson
        2. image-2023-04-03-13-54-04-313.png
          52 kB
          Lee Anjella Macabuhay
        3. image-2023-04-03-13-55-11-073.png
          30 kB
          Lee Anjella Macabuhay
        4. image-2023-04-03-13-56-17-508.png
          30 kB
          Lee Anjella Macabuhay
        5. image-2023-04-03-13-58-25-666.png
          27 kB
          Lee Anjella Macabuhay
        6. parent-list.json
          0.2 kB
          anupriya63

            anupriya63 anupriya63
            lukegleeson lukegleeson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: