X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=csit%2Fplans%2Fcps%2Fsetup.sh;fp=csit%2Fplans%2Fcps%2Fsetup.sh;h=80829eba14f2738edaa7ab99bf84d1e7febc73b0;hb=cb853790e186fa66487b1a22042345af7163ce34;hp=c4e5c153d95ef19381cd128a667a039aee84c397;hpb=183a22c664b4cd11072901ea3854c56e9256facc;p=cps.git diff --git a/csit/plans/cps/setup.sh b/csit/plans/cps/setup.sh index c4e5c153d..80829eba1 100755 --- a/csit/plans/cps/setup.sh +++ b/csit/plans/cps/setup.sh @@ -72,53 +72,6 @@ source $WORKSPACE/plans/cps/sdnc/sdnc_setup.sh ###################### setup pnfsim ##################################### docker-compose -f $WORKSPACE/plans/cps/pnfsim/docker-compose.yml up -d -# Allow time for netconf-pnp-simulator & SDNC to come up fully -sleep 30s - -###################### mount pnf-sim as PNFDemo ########################## -SDNC_TIME_OUT=250 -SDNC_INTERVAL=10 -SDNC_TIME=0 - -while [ "$SDNC_TIME" -le "$SDNC_TIME_OUT" ]; do - - # Mount netconf node - curl --location --request PUT 'http://'$SDNC_HOST:$SDNC_PORT'/restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo' \ - --header 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "node": [ - { - "node-id": "PNFDemo", - "netconf-node-topology:protocol": { - "name": "TLS" - }, - "netconf-node-topology:host": "'$LOCAL_IP'", - "netconf-node-topology:key-based": { - "username": "netconf", - "key-id": "ODL_private_key_0" - }, - "netconf-node-topology:port": 6512, - "netconf-node-topology:tcp-only": false, - "netconf-node-topology:max-connection-attempts": 5 - } - ] - }' - - # Verify node has been mounted - - RESPONSE=$( curl --location --request GET 'http://'$SDNC_HOST:$SDNC_PORT'/restconf/config/network-topology:network-topology/topology/topology-netconf' --header 'Authorization: basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==') - - if [[ "$RESPONSE" == *"PNFDemo"* ]]; then - echo "Node mounted in $SDNC_TIME" - break; - fi - - sleep $SDNC_INTERVAL - SDNC_TIME=$((SDNC_TIME + SDNC_INTERVAL)) - -done - ###################### verify ncmp-cps health ########################## check_health $CPS_CORE_HOST:$CPS_CORE_PORT 'cps-ncmp'