Upgrade SDNC image 57/141257/6
authormpriyank <priyank.maheshwari@est.tech>
Thu, 12 Jun 2025 11:05:47 +0000 (12:05 +0100)
committerPriyank Maheshwari <priyank.maheshwari@est.tech>
Tue, 15 Jul 2025 10:52:58 +0000 (10:52 +0000)
- upgrade SDNC image from 2.2.3 to 3.0.2
- upgraded SDNC image doesnt have support of application/yang.patch+json
  so converted the request to equivalent application/json patch which is
  supported
- updates to healthcheck url and node mount url as per the upgraded
  version

Issue-ID: CPS-2849
Change-Id: Ia7c5f1a99955c61d5fd07b8f0a40293b40a4ffed
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
csit/data/ncmp/bookstorePatchExample.json
csit/tests/ncmp-passthrough/ncmp-passthrough.robot
docker-compose/config/sdnc/check_sdnc_mount_node.sh
docker-compose/dmi-services.yml

index 039ea4b..661fe32 100644 (file)
@@ -1,58 +1,35 @@
 {
-  "ietf-restconf:yang-patch":{
-    "patch-id":"patch-1",
-    "edit":[
+  "bookstore": {
+    "categories": [
       {
-        "edit-id":"edit1",
-        "operation":"merge",
-        "target":"/",
-        "value":{
-          "bookstore": {
-            "categories": [
-              {
-                "code": "100",
-                "books": [
-                  {
-                    "title": "A new book in a new category",
-                    "pub_year": "2019",
-                    "authors": [
-                      "Rahul"
-                    ],
-                    "lang": "English",
-                    "price": "2011"
-                  }
-                ],
-                "name": "Category100"
-              }
-            ]
+        "code": "100",
+        "books": [
+          {
+            "title": "A new book in a new category",
+            "pub_year": "2019",
+            "authors": [
+              "Rahul"
+            ],
+            "lang": "English",
+            "price": "2011"
           }
-        }
+        ],
+        "name": "Category100"
       },
       {
-        "edit-id":"edit2",
-        "operation":"merge",
-        "target":"/",
-        "value":{
-          "bookstore": {
-            "categories": [
-              {
-                "code": "02",
-                "name": "Horror",
-                "books": [
-                  {
-                    "title": "A New book in existing category",
-                    "lang": "English",
-                    "authors": [
-                      "Joe & Rahul"
-                    ],
-                    "pub_year": "2003",
-                    "price": "2000"
-                  }
-                ]
-              }
-            ]
+        "code": "02",
+        "name": "Horror",
+        "books": [
+          {
+            "title": "A New book in existing category",
+            "lang": "English",
+            "authors": [
+              "Joe & Rahul"
+            ],
+            "pub_year": "2003",
+            "price": "2000"
           }
-        }
+        ]
       }
     ]
   }
index fbfbc4d..86e7203 100644 (file)
@@ -114,7 +114,7 @@ Verify delete to bookstore using passthrough-running removed only category 01
 
 Patch will add new category with new book and add a new book to an existing category
     ${uri}=              Set Variable       ${ncmpBasePath}/v1/ch/ietfYang-PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore
-    ${headers}=          Create Dictionary  Content-Type=application/yang.patch+json
+    ${headers}=          Create Dictionary  Content-Type=application/json
     ${jsonData}=         Get Binary File    ${DATADIR_NCMP}${/}bookstorePatchExample.json
     ${response}=         PATCH On Session   CPS_URL   ${uri}   headers=${headers}   data=${jsonData}
     Should Be Equal As Strings              ${response.status_code}   200
index 8fa4bee..8c83268 100644 (file)
@@ -26,7 +26,7 @@ PNF_SIM_PORT=${PNF_SIM_PORT:-6513}
 NODE_ID=${NODE_ID:-'ietfYang-PNFDemo'}
 
 echo "Attempting to mount node with id '$NODE_ID' to SDNC using RestConf"
-curl --request PUT "http://$SDNC_HOST:$SDNC_PORT/restconf/config/network-topology:network-topology/topology/topology-netconf/node/$NODE_ID" \
+curl --request PUT "http://$SDNC_HOST:$SDNC_PORT/rests/data/network-topology:network-topology/topology=topology-netconf/node=$NODE_ID" \
 --silent --location \
 --header "$SDNC_AUTH_HEADER" \
 --header 'Content-Type: application/json' \
@@ -50,7 +50,7 @@ curl --request PUT "http://$SDNC_HOST:$SDNC_PORT/restconf/config/network-topolog
 }'
 
 # Verify node has been mounted
-RESPONSE=$(curl --silent --location --request GET "http://$SDNC_HOST:$SDNC_PORT/restconf/config/network-topology:network-topology/topology/topology-netconf" --header "$SDNC_AUTH_HEADER")
+RESPONSE=$(curl --silent --location --request GET "http://$SDNC_HOST:$SDNC_PORT/rests/data/network-topology:network-topology/topology=topology-netconf?content=config" --header "$SDNC_AUTH_HEADER")
 
 if echo "$RESPONSE" | grep -q "$NODE_ID"; then
   echo "Node mounted successfully"
index 6e323c1..6c68442 100644 (file)
@@ -36,7 +36,7 @@ services:
 
   sdnc:
     container_name: sdnc
-    image: onap/sdnc-image:${SDNC_VERSION:-2.2.3}
+    image: onap/sdnc-image:${SDNC_VERSION:-3.0.2}
     entrypoint: /opt/onap/sdnc/bin/startODL.sh
     ports:
       - 8181:8181
@@ -64,7 +64,7 @@ services:
       - ./config/sdnc/certs/certs.properties:/opt/opendaylight/certs/certs.properties
       - ./config/sdnc/certs/keys0.zip:/opt/opendaylight/certs/keys0.zip
     healthcheck:
-      test: "wget -q -O - --header 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' http://localhost:8181/restconf/operational/network-topology:network-topology || exit 1"
+      test: "wget -q -O - --header 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' http://localhost:8181/rests/operations/SLI-API:healthcheck || exit 1"
       interval: 10s
       timeout: 10s
       retries: 6