aboutsummaryrefslogtreecommitdiffstats
path: root/plans/usecases/config-over-netconf/setup.sh
diff options
context:
space:
mode:
authortragait <rahul.tyagi@est.tech>2020-02-05 17:02:20 +0000
committerRahul Tyagi <rahul.tyagi@est.tech>2020-02-06 15:42:03 +0000
commitcd8b66ce89c095f7dc17f6a58f271a1f0b897362 (patch)
treeab10788a680998992a20d99d2718e55f8131e2e0 /plans/usecases/config-over-netconf/setup.sh
parent6cf91854a31f9562de405d009224b6f20a855936 (diff)
fix for CSIT config-over-netconf 5G-bulkpm
Issue-ID: INT-1430 Issue-ID: INT-1428 Change-Id: Ic38607d9376b9ebb39bc0ebe18b23f5a73cb1b16 Signed-off-by: tragait <rahul.tyagi@est.tech>
Diffstat (limited to 'plans/usecases/config-over-netconf/setup.sh')
-rw-r--r--plans/usecases/config-over-netconf/setup.sh41
1 files changed, 4 insertions, 37 deletions
diff --git a/plans/usecases/config-over-netconf/setup.sh b/plans/usecases/config-over-netconf/setup.sh
index 9e87b041..713d57d1 100644
--- a/plans/usecases/config-over-netconf/setup.sh
+++ b/plans/usecases/config-over-netconf/setup.sh
@@ -44,6 +44,8 @@ HOST_IP_ADDR=localhost
cd $SDNC_DOCKER_PATH
unset http_proxy https_proxy
+docker pull $NETOPEER_DOCKER_REPO:$NETOPEER_IMAGE_TAG
+docker tag $NETOPEER_DOCKER_REPO:$NETOPEER_IMAGE_TAG $NETOPEER_DOCKER_REPO:latest
#sed -i "s/DMAAP_TOPIC_ENV=.*/DMAAP_TOPIC_ENV="AUTO"/g" diocker-compose.yml
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
@@ -72,7 +74,8 @@ TIME_OUT=1000
INTERVAL=30
TIME=0
while [ "$TIME" -lt "$TIME_OUT" ]; do
- response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-sdnc" -H "X-TransactionId: csit-sdnc" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8282/restconf/operations/SLI-API:healthcheck ); echo $response
+ response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-sdnc" -H "X-TransactionId: csit-sdnc" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8282/restconf/operations/SLI-API:healthcheck );
+ echo $response
if [ "$response" == "200" ]; then
echo SDNC started in $TIME seconds
@@ -108,42 +111,6 @@ sed -i "s/reskey/$RES_KEY/g" $REQUEST_DATA_PATH/config-assign.json
#########################check if server is up gracefully ######################################
-TIME_OUT=1500
-INTERVAL=60
-TIME=0
-while [ "$TIME" -lt "$TIME_OUT" ]; do
-docker exec sdnc_controller_container rm -f /opt/opendaylight/current/etc/host.key
-response=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client system:start-level)
-docker exec sdnc_controller_container rm -f /opt/opendaylight/current/etc/host.key
-
- if [ "$response" == "Level 100" ] ; then
- echo SDNC karaf started in $TIME seconds
- break;
- fi
-
- echo Sleep: $INTERVAL seconds before testing if SDNC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
- sleep $INTERVAL
- TIME=$(($TIME+$INTERVAL))
-done
-
-if [ "$TIME" -ge "$TIME_OUT" ]; then
- echo TIME OUT: karaf session not started in $TIME_OUT seconds... Could cause problems for testing activities...
-fi
-
-response=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client system:start-level)
-
- if [ "$response" == "Level 100" ] ; then
- num_failed_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | grep Failure | wc -l)
- failed_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | grep Failure)
- echo There is/are $num_failed_bundles failed bundles out of $num_bundles installed bundles.
- fi
-
-if [ "$num_failed_bundles" -ge 1 ]; then
- echo "The following bundle(s) are in a failed state: "
- echo " $failed_bundles"
-fi
-
-
# Sleep additional 3 minutes (180 secs) to give application time to finish
sleep 150