Fix SDNC and CCSDK CSIT issues 33/37133/5
authorTimoney, Dan (dt5972) <dt5972@att.com>
Tue, 20 Mar 2018 14:23:53 +0000 (10:23 -0400)
committerTimoney, Dan (dt5972) <dt5972@att.com>
Tue, 20 Mar 2018 20:55:03 +0000 (16:55 -0400)
Fixed CCSDK and SDNC setup.sh scripts to use karaf client without
-u arg (change for karaf 4), and to fix versions of containers
used by SDNC CSIT script.

Change-Id: I292e25d04b54d3e12696dab09ca007c97e632555
Issue-ID: SDNC-277
Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
test/csit/plans/ccsdk/healthcheck/health_check.sh
test/csit/plans/ccsdk/healthcheck/setup.sh
test/csit/plans/ccsdk/healthcheck/teardown.sh
test/csit/plans/sdnc/healthcheck/setup.sh

index ffc766f..99f717a 100644 (file)
@@ -19,7 +19,7 @@ echo $SCRIPTS
 
 unset http_proxy https_proxy
 
-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-ccsdk" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8383/restconf/operations/SLI-API:healthcheck )
+response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46YWRtaW4=" -X POST -H "X-FromAppId: csit-sdnc" -H "X-TransactionId: csit-ccsdk" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8383/restconf/operations/SLI-API:healthcheck )
 
 if [ "$response" == "200" ]; then
     echo "CCSDK health check passed."
index 0be8bef..2b7424c 100644 (file)
@@ -63,7 +63,7 @@ TIME_OUT=500
 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-ccsdk" -H "X-TransactionId: csit-ccsdk" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8383/restconf/operations/SLI-API:healthcheck ); echo $response
+  response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46YWRtaW4=" -X POST -H "X-FromAppId: csit-ccsdk" -H "X-TransactionId: csit-ccsdk" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8383/restconf/operations/SLI-API:healthcheck ); echo $response
 
   if [ "$response" == "200" ]; then
     echo CCSDK started in $TIME seconds
@@ -86,8 +86,10 @@ INTERVAL=60
 TIME=0
 while [ "$TIME" -lt "$TIME_OUT" ]; do
 
-response=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
-num_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
+docker exec ccsdk_odlsli_container rm -f /opt/opendaylight/current/etc/host.key
+response=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client system:start-level)
+docker exec ccsdk_odlsli_container rm -f /opt/opendaylight/current/etc/host.key
+num_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
 
   if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 333 ]; then
     echo CCSDK karaf started in $TIME seconds
@@ -103,13 +105,13 @@ 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 ccsdk_odlsli_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
-num_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
+response=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client system:start-level)
+num_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
 
   if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 333 ]; then
-    num_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
-    num_failed_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure | wc -l)
-    failed_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure)
+    num_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
+    num_failed_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | grep Failure | wc -l)
+    failed_bundles=$(docker exec ccsdk_odlsli_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
 
index fbc0dfa..5682078 100644 (file)
@@ -19,7 +19,6 @@
 
 kill-instance.sh ccsdk_db_container
 kill-instance.sh ccsdk_dgbuilder_container
-kill-instance.sh ccsdk_bareodl_container
 kill-instance.sh ccsdk_odlsli_container
 
 # $WORKSPACE/archives/appc deleted with archives folder when tests starts so we keep it at the end for debugging
index f2d7f6e..0b906f4 100644 (file)
@@ -24,8 +24,8 @@ export NEXUS_USERNAME=docker
 export NEXUS_PASSWD=docker
 export NEXUS_DOCKER_REPO=nexus3.onap.org:10001
 export DMAAP_TOPIC=AUTO
-export DOCKER_IMAGE_VERSION=1.2-STAGING-latest
-export CCSDK_DOCKER_IMAGE_VERSION=0.1-STAGING-latest
+export DOCKER_IMAGE_VERSION=1.3-STAGING-latest
+export CCSDK_DOCKER_IMAGE_VERSION=0.2-STAGING-latest
 
 export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
 
@@ -94,8 +94,10 @@ INTERVAL=60
 TIME=0
 while [ "$TIME" -lt "$TIME_OUT" ]; do
 
-response=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
-num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
+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
+num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
 
   if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 333 ]; then
     echo SDNC karaf started in $TIME seconds
@@ -111,13 +113,13 @@ 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 -u karaf system:start-level)
-num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
+response=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client system:start-level)
+num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
 
   if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 333 ]; then
-    num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
-    num_failed_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure | wc -l)
-    failed_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure)
+    num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
+    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