From: mpriyank Date: Thu, 12 Jun 2025 11:05:47 +0000 (+0100) Subject: Upgrade SDNC image X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=2ae1f7f6996577247717bb4797c00b7932d6166a;p=cps.git Upgrade SDNC image - 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 --- diff --git a/csit/data/ncmp/bookstorePatchExample.json b/csit/data/ncmp/bookstorePatchExample.json index 039ea4bcdd..661fe32907 100644 --- a/csit/data/ncmp/bookstorePatchExample.json +++ b/csit/data/ncmp/bookstorePatchExample.json @@ -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" } - } + ] } ] } diff --git a/csit/tests/ncmp-passthrough/ncmp-passthrough.robot b/csit/tests/ncmp-passthrough/ncmp-passthrough.robot index fbfbc4dbe4..86e7203175 100644 --- a/csit/tests/ncmp-passthrough/ncmp-passthrough.robot +++ b/csit/tests/ncmp-passthrough/ncmp-passthrough.robot @@ -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 diff --git a/docker-compose/config/sdnc/check_sdnc_mount_node.sh b/docker-compose/config/sdnc/check_sdnc_mount_node.sh index 8fa4bee8cf..8c83268f84 100644 --- a/docker-compose/config/sdnc/check_sdnc_mount_node.sh +++ b/docker-compose/config/sdnc/check_sdnc_mount_node.sh @@ -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" diff --git a/docker-compose/dmi-services.yml b/docker-compose/dmi-services.yml index 6e323c167f..6c68442e29 100644 --- a/docker-compose/dmi-services.yml +++ b/docker-compose/dmi-services.yml @@ -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