Merge "Update sfc-driver csit setup.sh"
diff --git a/bootstrap/vagrant-onap/README.md b/bootstrap/vagrant-onap/README.md
index 08c5a57..c48190a 100644
--- a/bootstrap/vagrant-onap/README.md
+++ b/bootstrap/vagrant-onap/README.md
@@ -56,6 +56,7 @@
 | vid        | Virtual Infrastructure Development  |
 | vfc        | Virtual Function Controller         |
 | multicloud | Multi Cloud                         |
+| ccsdk      | Common Controller SDK               |
 | all_in_one | All ONAP services in a VM           |
 | testing    | Unit Test VM                        |
 
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index 148d8ed..8417cc9 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -160,7 +160,7 @@
       end
       all_in_one.vm.provision 'shell' do |s|
         s.path = 'vagrant_utils/postinstall.sh'
-        s.args = ['mr', 'sdc', 'aai', 'mso', 'robot', 'vid', 'sdnc', 'portal', 'dcae', 'policy', 'appc', 'vfc']
+        s.args = ['mr', 'sdc', 'aai', 'mso', 'robot', 'vid', 'sdnc', 'portal', 'dcae', 'policy', 'appc', 'vfc', 'ccsdk']
         s.env = conf
       end
     end
@@ -366,6 +366,19 @@
       end
     end
 
+    config.vm.define :ccsdk do |ccsdk|
+      ccsdk.vm.hostname = 'ccsdk'
+      ccsdk.vm.network :private_network, ip: '192.168.50.17'
+      ccsdk.vm.provider "openstack" do |v|
+        v.server_name = 'ccsdk'
+      end
+      ccsdk.vm.provision 'shell' do |s|
+        s.path = 'vagrant_utils/postinstall.sh'
+        s.args = ['ccsdk']
+        s.env = conf
+      end
+    end
+
   when 'testing'
 
     config.vm.define :testing do |testing|
diff --git a/bootstrap/vagrant-onap/lib/_onap_functions b/bootstrap/vagrant-onap/lib/_onap_functions
index 9e06010..18a4659 100755
--- a/bootstrap/vagrant-onap/lib/_onap_functions
+++ b/bootstrap/vagrant-onap/lib/_onap_functions
@@ -28,6 +28,15 @@
     docker logout
 }
 
+# pull_onap_image() - Pull Docker container image from a Docker Registry Hub
+function pull_onap_image {
+    local image=$1
+    local tag=$2
+    docker_openecomp_login
+    pull_docker_image $nexus_docker_repo/onap/${image}:$docker_version $tag
+    docker logout
+}
+
 # configure_bind()- Configure bind utils
 function configure_bind {
     _install_bind
diff --git a/bootstrap/vagrant-onap/lib/ccsdk b/bootstrap/vagrant-onap/lib/ccsdk
new file mode 100755
index 0000000..d115eaa
--- /dev/null
+++ b/bootstrap/vagrant-onap/lib/ccsdk
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+set -o xtrace
+
+source /var/onap/functions
+
+ccsdk_src_folder=$git_src_folder/ccsdk
+ccsdk_repos=("dashboard" "distribution" "parent" "platform/blueprints" "platform/nbapi" "platform/plugins" "sli" "sli/adaptors" "sli/core" "sli/northbound" "sli/plugins" "storage" "storage/esaas" "storage/pgaas" "utils")
+
+# clone_ccsdk_repos() - Function that clones the CCSDK repositories
+function clone_ccsdk_repos {
+    clone_repo ccsdk $ccsdk_src_folder
+
+    for dirc in ${ccsdk_repos[@]}; do
+        clone_repo ccsdk/$dirc $ccsdk_src_folder/$dirc
+    done
+}
+
+# compile_ccsdk_repos() - 
+function compile_ccsdk_repos {
+    compile_src ccsdk $ccsdk_src_folder
+
+    for dirc in ${ccsdk_repos[@]}; do
+        compile_src $ccsdk_src_folder/$dirc
+    done
+}
+
+# _build_ccsdk_images() - Build CCSDK Docker images from source code
+function _build_ccsdk_images {
+    install_package unzip
+    compile_src $ccsdk_src_folder/distribution
+    clone_repo ccsdk/distribution $ccsdk_src_folder/distribution
+    for image in ubuntu opendaylight odlsli dgbuilder-docker; do
+        build_docker_image $ccsdk_src_folder/distribution/$image docker
+    done
+}
+
+# get_ccsdk_images() - Get CCSDK Docker images
+function get_ccsdk_images {
+    if [[ "$build_image" == "True" ]]; then
+        _build_ccsdk_images
+    else
+        for image in ubuntu odl dgbuilder; do
+            pull_onap_image ccsdk-$image-image
+        done
+    fi
+
+}
+
+# install_ccsdk() - 
+function install_ccsdk {
+    echo "pass"
+}
+
+# init_ccsdk() - Function that initialize Multi Cloud services
+function init_ccsdk {
+    if [[ "$clone_repo" == "True" ]]; then
+        clone_ccsdk_repos
+        if [[ "$compile_repo" == "True" ]]; then
+            compile_ccsdk_repos
+        fi
+    fi
+    install_ccsdk
+}
diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc
index 6fa4218..2b0634b 100755
--- a/bootstrap/vagrant-onap/lib/vfc
+++ b/bootstrap/vagrant-onap/lib/vfc
@@ -61,19 +61,15 @@
         build_nfvo_lcm_image
         # TODO(sshank): Add other VFC component docker image builds when they are ready.
     else
-        pull_docker_image nexus3.onap.org:10003/onap/vfc/nslcm latest
+        pull_onap_image vfc/nslcm
     fi
 }
 
-# run_vfc_images() - Run VFC docker images
-function run_vfc_images() {
-    docker run -d --name vfc-nslcm -p 3306:3306 -p 8403:8403 -e MSB_ADDR=127.0.0.1 nexus3.onap.org:10003/onap/vfc/nslcm
-    # TODO(sshank): Run other VFC component docker images when they are ready.
-}
-
 # install_vfc() - Download and install vfc service from source code
 function install_vfc {
-    run_vfc_images
+    nslcm_image=`docker images | grep nslcm | grep latest| awk '{print $1 ":" $2}'`
+    docker run -d --name vfc-nslcm -p 3306:3306 -p 8403:8403 -e MSB_ADDR=127.0.0.1 $nslcm_image
+    # TODO(sshank): Run other VFC component docker images when they are ready.
 }
 
 # init_vfc() - Function that initialize VF-C services
diff --git a/bootstrap/vagrant-onap/tests/test_ccsdk b/bootstrap/vagrant-onap/tests/test_ccsdk
new file mode 100644
index 0000000..2d2b87a
--- /dev/null
+++ b/bootstrap/vagrant-onap/tests/test_ccsdk
@@ -0,0 +1,89 @@
+#!/bin/bash
+
+source /var/onap_tests/_test_base
+source /var/onap/ccsdk
+
+covered_functions=(
+"clone_ccsdk_repos" "compile_ccsdk_repos" "get_ccsdk_images"
+)
+
+# test_clone_ccsdk_repos() - Verify that CCSDL repositories are retrieved properly
+function test_clone_ccsdk_repos {
+    clone_ccsdk_repos
+
+    asserts_file_exist $ccsdk_src_folder/dashboard/pom.xml
+    asserts_file_exist $ccsdk_src_folder/distribution/pom.xml
+    asserts_file_exist $ccsdk_src_folder/parent/pom.xml
+    asserts_file_exist $ccsdk_src_folder/platform/blueprints/pom.xml
+    asserts_file_exist $ccsdk_src_folder/platform/nbapi/pom.xml
+    asserts_file_exist $ccsdk_src_folder/platform/plugins/pom.xml
+    asserts_file_exist $ccsdk_src_folder/sli/adaptors/pom.xml
+    asserts_file_exist $ccsdk_src_folder/sli/core/pom.xml
+    asserts_file_exist $ccsdk_src_folder/sli/northbound/pom.xml
+    asserts_file_exist $ccsdk_src_folder/sli/plugins/pom.xml
+    asserts_file_exist $ccsdk_src_folder/storage/esaas/pom.xml
+    asserts_file_exist $ccsdk_src_folder/storage/pgaas/pom.xml
+    asserts_file_exist $ccsdk_src_folder/utils/pom.xml
+}
+
+# test_compile_ccsdk_repos() - Verify the compilation of CCSDK repositories
+function compile_ccsdk_repos {
+    clone_ccsdk_repos
+    compile_ccsdk_repos
+
+    asserts_file_exist $ccsdk_src_folder/dashboard/oom-app-common/target/oom-app-common-1.1.0-SNAPSHOT.jar
+    asserts_file_exist $ccsdk_src_folder/dashboard/oom-app-os/target/oom-app-os-1.1.0-SNAPSHOT.war
+    asserts_file_exist $ccsdk_src_folder/dashboard/oom-app-overlay/target/oom-app-overlay-1.1.0-SNAPSHOT.war
+    asserts_file_exist $ccsdk_src_folder/distribution/dgbuilder/target/dgbuilder.0.1.0-SNAPSHOT.zip
+    asserts_file_exist $ccsdk_src_folder/distribution/platform-logic/installer/target/platform-logic-installer-0.1.0-SNAPSHOT.zip
+    asserts_file_exist $ccsdk_src_folder/platform/nbapi/target/commonnbapi-0.0.3.war
+
+    for adaptor in aai-service mdsal-resource resource-assignment sql-resource; do
+        for component in features provider; do
+            asserts_file_exist $ccsdk_src_folder/sli/adaptors/$adaptor/$component/target/$adaptor-$component-0.1.0-SNAPSHOT.jar
+        done
+        asserts_file_exist $ccsdk_src_folder/sli/adaptors/$adaptor/installer/target/sdnc-$adaptor-0.1.0-SNAPSHOT-installer.zip
+    done
+
+    for core in dblib filters sli sliapi sliPluginUtils; do
+        for component in features provider; do
+            asserts_file_exist $ccsdk_src_folder/sli/core/$core/$component/target/$core-$component-0.1.2-SNAPSHOT.jar
+        done
+        asserts_file_exist $ccsdk_src_folder/sli/core/$core/installer/target/sdnc-$core-0.1.2-SNAPSHOT-installer.zip
+    done
+    asserts_file_exist $ccsdk_src_folder/sli/core/sli/common/target/sli-common-0.1.2-SNAPSHOT.jar
+    asserts_file_exist $ccsdk_src_folder/sli/core/sli/recording/target/sli-recording-0.1.2-SNAPSHOT.jar
+    asserts_file_exist $ccsdk_src_folder/sli/core/sliapi/model/target/sliapi-model-0.1.2-SNAPSHOT.jar
+
+    for northbound in asdcApi dataChange; do
+        for component in features model provider; do
+            asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/$component/target/$northbound-$component-0.1.0-SNAPSHOT.jar
+        done
+        asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/installer/target/sdnc-$northbound-0.1.0-SNAPSHOT-installer.zip
+    done
+    asserts_file_exist $ccsdk_src_folder/sli/northbound/dmaap-listener/target/dmaap-listener-0.1.0-SNAPSHOT.jar
+    asserts_file_exist $ccsdk_src_folder/sli/northbound/ueb-listener/target/ueb-listener-0.1.0-SNAPSHOT.jar
+
+    for plugin in properties-node restapi-call-node; do
+        for component in features provider; do
+            asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/$component/target/$plugin-$component-0.1.0-SNAPSHOT.jar
+        done
+        asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/installer/target/sdnc-$plugin-0.1.0-SNAPSHOT-installer.zip
+    done
+}
+
+# test_get_ccsdk_images() - Verify that CCSDK images are retrieved or built properly
+function test_get_ccsdk_images {
+    clone_ccsdk_repos
+    get_ccsdk_images
+
+    for image in dgbuilder odlsli odl ubuntu; do
+        asserts_image onap/ccsdk-$image-image
+    done
+}
+
+if [ "$1" != '*' ]; then
+    unset covered_functions
+    covered_functions=$1
+fi
+main "${covered_functions[@]}"
diff --git a/bootstrap/vagrant-onap/tools/Run.ps1 b/bootstrap/vagrant-onap/tools/Run.ps1
index 103dfee..8e6c94f 100644
--- a/bootstrap/vagrant-onap/tools/Run.ps1
+++ b/bootstrap/vagrant-onap/tools/Run.ps1
@@ -25,7 +25,7 @@
 #>
 
 Param(
-    [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "testing")]
+    [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "testing")]
     [Parameter(Mandatory=$True,Position=0)]
     [ValidateNotNullOrEmpty()]
     [String]
diff --git a/bootstrap/vagrant-onap/tools/run.sh b/bootstrap/vagrant-onap/tools/run.sh
index 094577f..08eae01 100755
--- a/bootstrap/vagrant-onap/tools/run.sh
+++ b/bootstrap/vagrant-onap/tools/run.sh
@@ -12,7 +12,7 @@
         Test case to use in testing mode.
 Commands:
     all_in_one  Deploy in all-in-one mode.
-    dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|multicloud  Deploy chosen service.
+    dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|multicloud|ccsdk  Deploy chosen service.
     testing  Deploy in testing mode.
 EOF
 }
@@ -55,7 +55,7 @@
     "all_in_one" )
         export DEPLOY_MODE='all-in-one'
         ;;
-    "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "multicloud" )
+    "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "multicloud" | "ccsdk" )
         export DEPLOY_MODE='individual'
         ;;
     "testing" )
diff --git a/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh b/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh
index b0e64ad..89a69dd 100755
--- a/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh
+++ b/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh
@@ -6,7 +6,6 @@
 
 create_configuration_files
 install_dev_tools
-install_java
 configure_bind
 
 for serv in $@; do
diff --git a/test/csit/plans/aai/resources/setup.sh b/test/csit/plans/aai/resources/setup.sh
index ee20460..30b4b29 100644
--- a/test/csit/plans/aai/resources/setup.sh
+++ b/test/csit/plans/aai/resources/setup.sh
@@ -24,16 +24,14 @@
 NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
 DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
 DOCKER_REGISTRY=${NEXUS_DOCKER_REPO}
-DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
-
-docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+DOCKER_IMAGE_VERSION=1.1-STAGING-latest
 
 function wait_for_container() {
 
     CONTAINER_NAME="$1";
     START_TEXT="$2";
 
-    TIMEOUT=160
+    TIMEOUT=240
 
     # wait for the real startup
     AMOUNT_STARTUP=$(docker logs ${CONTAINER_NAME} 2>&1 | grep "$START_TEXT" | wc -l)
@@ -43,6 +41,7 @@
         AMOUNT_STARTUP=$(docker logs ${CONTAINER_NAME} 2>&1 | grep "$START_TEXT" | wc -l)
         if [ "$TIMEOUT" = "0" ];
         then
+            docker logs ${CONTAINER_NAME};
             echo "ERROR: $CONTAINER_NAME deployment failed."
             exit 1
         fi
@@ -54,6 +53,7 @@
 DOCKER_COMPOSE_CMD="docker-compose";
 export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1);
 export DOCKER_REGISTRY="nexus3.onap.org:10001";
+export AAI_HAPROXY_IMAGE="${AAI_HAPROXY_IMAGE:-aaionap/haproxy}";
 export HBASE_IMAGE="${HBASE_IMAGE:-harisekhon/hbase}";
 
 docker pull ${DOCKER_REGISTRY}/openecomp/aai-resources:${DOCKER_IMAGE_VERSION};
@@ -74,9 +74,10 @@
 # Start the resources microservice
 RESOURCES_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-resources.api.simpledemo.openecomp.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1);
 wait_for_container ${RESOURCES_CONTAINER_NAME} '0.0.0.0:8447';
+docker logs ${CONTAINER_NAME};
 
 # Start the traversal microservice
-GRAPH_CONTAINER_NAME=$($DOCKER_COMPOSE_CMD up -d aai-traversal.api.simpledemo.openecomp.org 2>&1 | grep 'Creating' | awk '{ print $2; }' | head -1);
+GRAPH_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-traversal.api.simpledemo.openecomp.org 2>&1 | grep 'Creating' | awk '{ print $2; }' | head -1);
 wait_for_container ${GRAPH_CONTAINER_NAME} '0.0.0.0:8446';
 
 # Start the haproxy to route requests between resources and traversal
@@ -84,12 +85,11 @@
 
 echo "A&AI Microservices, resources and traversal, are up and running along with HAProxy";
 
-docker exec -it $GRAPH_CONTAINER_NAME "/opt/app/aai-traversal/scripts/install/updateQueryData.sh" && {
+docker exec $GRAPH_CONTAINER_NAME "/opt/app/aai-traversal/scripts/install/updateQueryData.sh" && {
 	echo "Successfully loaded the widget related data into db";
 } || {
 	echo "Unable to load widget related data into db";
 }
 
-HAPROXY_IP=$(${SCRIPTS}/get-instance-ip.sh ${HAPROXY_CONTAINER_NAME});
 # Set the host ip for robot from the haproxy
-ROBOT_VARIABLES="-v HOST_IP:${HAPROXY_IP}"
+ROBOT_VARIABLES="-v HOST_IP:`ip addr show docker0 | head -3 | tail -1 | cut -d' ' -f6 | cut -d'/' -f1`"
diff --git a/test/csit/plans/appc/healthcheck/db_query.sh b/test/csit/plans/appc/healthcheck/db_query.sh
new file mode 100755
index 0000000..87e0ac3
--- /dev/null
+++ b/test/csit/plans/appc/healthcheck/db_query.sh
@@ -0,0 +1,66 @@
+#!/usr/bin/env bash
+###############################################################################
+# Copyright 2017 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+echo $SCRIPTS
+
+sdnctl_num_tables=$(docker exec -i sdnc_db_container mysql -s -D sdnctl -u sdnctl -pgamma <<<'show tables;' 2>/dev/null | grep -v ERROR | wc -l)
+
+appcctl_num_tables=$(docker exec -i sdnc_db_container mysql -s -D appcctl -u appcctl -pappcctl <<<'show tables;' 2>/dev/null | grep -v ERROR | wc -l)
+
+
+
+docker exec -i sdnc_db_container mysql -s -D sdnctl -u sdnctl -pgamma <<<"show tables" 2>/dev/null | ( while read table_name; do 
+export $table_name="$(docker exec -i sdnc_db_container mysql -s -D sdnctl -u sdnctl -pgamma <<<"select count(*) from $table_name" 2>/dev/null)"
+done 
+
+if [ "$sdnctl_num_tables" -ge "1" ]; then
+  echo "There are $sdnctl_num_tables tables in the sdnctl database. "
+else
+  echo "Database sdnctl is not available."
+  exit 1;
+fi
+
+if [ "$appcctl_num_tables" -ge "1" ]; then
+  echo "There is $appcctl_num_tables table in the appcctl database. "
+else
+  echo "Database appcctl is not available."
+  exit 1;
+fi
+
+if [ "$NODE_TYPES" -eq "0" ]; then
+  echo "There is no data in table NODE_TYPES. "
+  exit 1;
+fi
+
+if [ "$SVC_LOGIC" -eq "0" ] ; then
+  echo "There is no data in table SVC_LOGIC. "
+  exit 1;
+fi
+
+if [ "$VNF_DG_MAPPING" -eq "0" ]; then
+  echo "There is no data in table VNF_DG_MAPPING. "
+  exit 1;
+fi 
+
+echo "Expected table data is present."
+exit 0 )
+
+if [ "$?" -eq "1" ]; then
+  exit 1;
+fi
+
+exit 0
diff --git a/test/csit/plans/appc/healthcheck/setup.sh b/test/csit/plans/appc/healthcheck/setup.sh
index b91baa3..3c57cef 100755
--- a/test/csit/plans/appc/healthcheck/setup.sh
+++ b/test/csit/plans/appc/healthcheck/setup.sh
@@ -22,6 +22,10 @@
 
 export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
 
+if [ "$MTU" == "" ]; then
+	  export MTU="1450"
+fi
+
 
 # Clone APPC repo to get docker-compose for APPC
 mkdir -p $WORKSPACE/archives/appc
@@ -42,7 +46,7 @@
 docker tag nexus3.onap.org:10001/openecomp/dgbuilder-sdnc-image:1.1-STAGING-latest openecomp/dgbuilder-sdnc-image:latest
 
 # start APPC containers with docker compose and configuration from docker-compose.yml
-/opt/docker/docker-compose up -d
+docker-compose up -d
 
 # WAIT 5 minutes maximum and test every 5 seconds if APPC is up using HealthCheck API
 TIME_OUT=500
diff --git a/test/csit/plans/msb/rest-service/setup.sh b/test/csit/plans/msb/rest-service/setup.sh
index 18b17ff..9682cde 100644
--- a/test/csit/plans/msb/rest-service/setup.sh
+++ b/test/csit/plans/msb/rest-service/setup.sh
@@ -18,20 +18,20 @@
 source ${SCRIPTS}/common_functions.sh
 
 #start msb
-sudo docker run -d -p 8500:8500  --name msb_consul consul
+docker run -d -p 8500:8500  --name msb_consul consul
 MSB_CONSUL_IP=`get-instance-ip.sh msb_consul`
 echo MSB_CONSUL_IP=${MSB_CONSUL_IP}
 
-sudo docker run -d  -p 10081:10081  -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
+docker run -d  -p 10081:10081  -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
 MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
 echo DISCOVERY_IP=${MSB_DISCOVERY_IP}
 
-sudo docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
+docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
 MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
 echo MSB_IAG_IP=${MSB_IAG_IP}
 
 # Start rest example service
-sudo docker run -d -p 9090:9090 --name i-rest-example zhaohuabing/rest-example
+docker run -d -p 9090:9090 --name i-rest-example zhaohuabing/rest-example
 REST_EXAMPLE_IP=`get-instance-ip.sh i-rest-example`
 echo REST_EXAMPLE_IP=${REST_EXAMPLE_IP}
 
@@ -43,7 +43,7 @@
     sleep $i
 done
 
-#Need some time so service info can be synced from discovery to api gateway
+#Need some time for the initialization of MSB services
 sleep 60
 
 curl -X POST \
diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/setup.sh
index c5c9f12..2a364a4 100644
--- a/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/setup.sh
+++ b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/setup.sh
@@ -45,30 +45,23 @@
 docker run -d --name vfc-gvnfmdriver -e MSB_ADDR=${MSB_DISCOVERY_IP}:10081 nexus3.onap.org:10001/onap/vfc/gvnfmdriver
 GVNFMDRIVER_IP=`get-instance-ip.sh vfc-gvnfmdriver`
 
-docker logs -f vfc-gvnfmdriver > vfc-gvnfmdriver &
 # Wait for initialization
 for i in {1..10}; do
     curl -sS ${GVNFMDRIVER_IP}:8484 && break
     echo sleep $i
     sleep $i
 done
-cat vfc-gvnfmdriver.log
 
-echo "================================================"
-docker cp vfc-gvnfmdriver:/service/vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/docker/docker-entrypoint.sh ./
-cat docker-entrypoint.sh
+# start vfc-jujudriver
+docker run -d --name vfc-jujudriver -e MSB_ADDR=${MSB_DISCOVERY_IP}:10081 nexus3.onap.org:10001/onap/vfc/jujudriver
+JUJUDRIVER_IP=`get-instance-ip.sh vfc-jujudriver`
 
-echo "================================================"
-docker cp vfc-gvnfmdriver:/service/vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/docker/instance_config.sh ./
-cat instance_config.sh
-
-echo "================================================"
-docker cp vfc-gvnfmdriver:/service/vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/docker/instance_init.sh ./
-cat instance_init.sh
-
-echo "================================================"
-docker cp vfc-gvnfmdriver:/service/vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/docker/instance_run.sh ./
-cat instance_run.sh
+# Wait for initialization
+for i in {1..10}; do
+    curl -sS ${JUJUDRIVER_IP}:8483 && break
+    echo sleep $i
+    sleep $i
+done
 
 # Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v MSB_DISCOVERY_IP:${MSB_DISCOVERY_IP} -v GVNFMDRIVER_IP:${GVNFMDRIVER_IP}"
+ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v MSB_DISCOVERY_IP:${MSB_DISCOVERY_IP} -v GVNFMDRIVER_IP:${GVNFMDRIVER_IP} -v JUJUDRIVER_IP:${JUJUDRIVER_IP}"
diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/teardown.sh b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/teardown.sh
index a550502..78d7c5a 100644
--- a/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/teardown.sh
+++ b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/teardown.sh
@@ -21,4 +21,4 @@
 kill-instance.sh msb_consul
 kill-instance.sh  vfc-gvnfmdriver
 
-# kill-instance.sh vfc-jujudriver
+kill-instance.sh vfc-jujudriver
diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/testplan.txt b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/testplan.txt
index 7cca2fb..e7bee51 100644
--- a/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/testplan.txt
+++ b/test/csit/plans/vfc-nfvo-driver-vnfm-gvnfm/sanity-check/testplan.txt
@@ -3,4 +3,4 @@
 
 vfc/nfvo-driver-gvnfm/gvnfmdriver.robot
 
-# vfc/nfvo-driver-gvnfm/jujudriver.robot
+vfc/nfvo-driver-gvnfm/jujudriver.robot
diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh
index de4fbd2..8eb205b 100644
--- a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh
+++ b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh
@@ -41,34 +41,27 @@
 # wait for container initalization
 echo sleep 60
 sleep 60
+
 # start vfc-ztevmanagerdriver
 docker run -d --name vfc-ztevmanagerdriver -e MSB_ADDR=${MSB_DISCOVERY_IP}:10081 nexus3.onap.org:10001/onap/vfc/ztevmanagerdriver
 ZTEVMANAGERDRIVER_IP=`get-instance-ip.sh vfc-ztevmanagerdriver`
 
-docker logs -f vfc-ztevmanagerdriver > vfc-ztevmanagerdriver &
 # Wait for initialization
 for i in {1..10}; do
     curl -sS ${ZTEVMANAGERDRIVER_IP}:8410 && break
     echo sleep $i
     sleep $i
 done
-cat vfc-ztevmanagerdriver.log
 
-echo "================================================"
-docker cp vfc-ztevmanagerdriver:/service/vfc/nfvo/driver/vnfm/svnfm/zte/vmanager/docker/docker-entrypoint.sh ./
-cat docker-entrypoint.sh
 
-echo "================================================"
-docker cp vfc-ztevmanagerdriver:/service/vfc/nfvo/driver/vnfm/svnfm/zte/vmanager/docker/instance_config.sh ./
-cat instance_config.sh
-
-echo "================================================"
-docker cp vfc-ztevmanagerdriver:/service/vfc/nfvo/driver/vnfm/svnfm/zte/vmanager/docker/instance_init.sh ./
-cat instance_init.sh
-
-echo "================================================"
-docker cp vfc-ztevmanagerdriver:/service/vfc/nfvo/driver/vnfm/svnfm/zte/vmanager/docker/instance_run.sh ./
-cat instance_run.sh
+# Start svnfm-huawei
+docker run -d --name vfc-svnfm-huawei -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/nfvo/svnfm/huawei
+SERVICE_IP=`get-instance-ip.sh vfc-svnfm-huawei`
+for i in {1..10}; do
+    curl -sS ${SERVICE_IP}:8482 && break
+    echo sleep $i
+    sleep $i
+done
 
 # Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v MSB_DISCOVERY_IP:${MSB_DISCOVERY_IP} -v ZTEVMANAGERDRIVER_IP:${ZTEVMANAGERDRIVER_IP}"
+ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v MSB_DISCOVERY_IP:${MSB_DISCOVERY_IP} -v ZTEVMANAGERDRIVER_IP:${ZTEVMANAGERDRIVER_IP} -v MSB_IP:${MSB_IAG_IP} -v SERVICE_IP:${SERVICE_IP}"
diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/teardown.sh b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/teardown.sh
index 1020cf1..e440068 100644
--- a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/teardown.sh
+++ b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/teardown.sh
@@ -21,4 +21,4 @@
 kill-instance.sh msb_consul
 kill-instance.sh  vfc-ztevmanagerdriver
 
-# kill-instance.sh vfc-svnfm-huawei
+kill-instance.sh vfc-svnfm-huawei
diff --git a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/testplan.txt b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/testplan.txt
index e5691f4..7eb861e 100644
--- a/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/testplan.txt
+++ b/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/testplan.txt
@@ -3,4 +3,4 @@
 
 vfc/nfvo-driver-svnfm/ztevmanager.robot
 
-# vfc/nfvo-driver-svnfm/huawei.robot
+vfc/nfvo-driver-svnfm/huawei.robot
diff --git a/test/csit/tests/aai/resources/suite1/pserver.robot b/test/csit/tests/aai/resources/suite1/pserver.robot
index 5a1d9d3..55e57bc 100644
--- a/test/csit/tests/aai/resources/suite1/pserver.robot
+++ b/test/csit/tests/aai/resources/suite1/pserver.robot
@@ -5,62 +5,61 @@
 Library       Collections
 
 *** Variables ***
-${TARGETURL}  https://${HOST_IP}:8443/v11/cloud-infrastructure/pservers/pserver/pserver-test1
+${TARGETURL}  https://${HOST_IP}:8443/aai/v11/cloud-infrastructure/pservers/pserver/pserver-test1
 ${PSERVERDATA}  {"hostname": "pserver-test1"}
 
 *** Test Cases ***
 
 Run AAI Put Pserver
-    [Documentation]             Create an index and verify success
+    [Documentation]             Create an pserver object
     ${resp}=                    PutWithCert              ${TARGETURL}              ${PSERVERDATA}
+    log                         ${TARGETURL}
+    log                         ${resp.text}
     Should Be Equal As Strings  ${resp.status_code}      201
 
 Run AAI Get Pserver
-    [Documentation]             Get the document that was just created
+    [Documentation]             Get the pserver object just created
     ${resp}                     GetWithCert              ${TARGETURL}
-    ${content}=                 Evaluate                 $resp.json()
+    log                         ${resp}
+    log                         ${resp.json()}
     Should Be Equal As Strings  ${resp.status_code}      200
-    ${resource_version}=        Evaluate                 $resp.json()['resource-version']
+    ${resource_version}=        Evaluate                 $resp.json().get('resource-version')
+    Set Global Variable			${resource_version}
 
 Run AAI Delete Pserver
-    [Documentation]             Delete the index
+    [Documentation]             Delete the pserver just created
     ${resp}=                    DeleteWithCert           ${TARGETURL}?resource-version=${resource_version}
+    log                         ${resp.text}
     Should Be Equal As Strings  ${resp.status_code}      204
 
 *** Keywords ***
 PutWithCert
     [Arguments]      ${url}      ${data}
-    ${auth}=         Create List  AAI AAI
-    ${uuid}=         Generate UUID
-    ${headers}=      Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${uuid}    X-FromAppId=integration-aai
+    ${headers}=      Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=integration-aai    X-FromAppId=integration-aai   Authorization=Basic QUFJOkFBSQ==
     ${certinfo}=     Evaluate    ('${CURDIR}/aai.crt', '${CURDIR}/aai.key')
-    ${resp}=         Evaluate    requests.put('${url}', data='${data}', auth=${auth}, headers=${headers}, cert=${certinfo}, verify=False)    requests
+    ${resp}=         Evaluate    requests.put('${url}', data='${data}', headers=${headers}, cert=${certinfo}, verify=False)    requests
     [return]         ${resp}
 
 PostWithCert
     [Arguments]      ${url}      ${data}
     ${auth}=         Create List  AAI AAI
-    ${uuid}=         Generate UUID
-    ${headers}=      Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${uuid}    X-FromAppId=integration-aai
+    ${headers}=      Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=integration-aai    X-FromAppId=integration-aai   Authorization=Basic QUFJOkFBSQ==
     ${certinfo}=     Evaluate    ('${CURDIR}/aai.crt', '${CURDIR}/aai.key')
-    ${resp}=         Evaluate    requests.post('${url}', data='${data}', auth=${auth}, headers=${headers}, cert=${certinfo}, verify=False)    requests
+    ${resp}=         Evaluate    requests.post('${url}', data='${data}', headers=${headers}, cert=${certinfo}, verify=False)    requests
     [return]         ${resp}
 
 GetWithCert
     [Arguments]      ${url}
-    ${auth}=         Create List  AAI AAI
-    ${uuid}=         Generate UUID
-    ${headers}=      Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${uuid}    X-FromAppId=integration-aai
+    ${headers}=      Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=integration-aai    X-FromAppId=integration-aai   Authorization=Basic QUFJOkFBSQ==
     ${certinfo}=     Evaluate    ('${CURDIR}/aai.crt', '${CURDIR}/aai.key')
-    ${resp}=         Evaluate    requests.get('${url}', auth=${auth}, headers=${headers}, cert=${certinfo}, verify=False)    requests
+    ${resp}=         Evaluate    requests.get('${url}', headers=${headers}, cert=${certinfo}, verify=False)    requests
     [return]         ${resp}
 
 DeleteWithCert
     [Arguments]      ${url}
     ${auth}=         Create List  AAI AAI
-    ${uuid}=         Generate UUID
-    ${headers}=      Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=${uuid}    X-FromAppId=integration-aai
+    ${headers}=      Create Dictionary     Accept=application/json    Content-Type=application/json    X-TransactionId=integration-aai    X-FromAppId=integration-aai   Authorization=Basic QUFJOkFBSQ==
     ${certinfo}=     Evaluate    ('${CURDIR}/aai.crt', '${CURDIR}/aai.key')
-    ${resp}=         Evaluate    requests.delete('${url}', auth=${auth}, headers=${headers}, cert=${certinfo}, verify=False)    requests
+    ${resp}=         Evaluate    requests.delete('${url}', headers=${headers}, cert=${certinfo}, verify=False)    requests
     [return]         ${resp}
     
diff --git a/test/csit/tests/appc/healthcheck/test1.robot b/test/csit/tests/appc/healthcheck/test1.robot
index 05eee5b..8bd4986 100644
--- a/test/csit/tests/appc/healthcheck/test1.robot
+++ b/test/csit/tests/appc/healthcheck/test1.robot
@@ -6,6 +6,7 @@
 
 ${bundle_query}    ${SCRIPTS}/bundle_query.sh
 ${health_check}    ${SCRIPTS}/health_check.sh
+${db_query}    ${SCRIPTS}/db_query.sh
 
 
 *** Test Cases ***
@@ -19,4 +20,8 @@
     ${result_bq}=    Run Process   bash ${bundle_query} > log_bq.txt    shell=yes
     Should Be Equal As Integers    ${result_bq.rc}    0
 
+Query database test case for APPC
+    [Documentation]   Query database
+    ${result_db}=    Run Process   bash ${db_query} > log_db.txt    shell=yes
+    Should Be Equal As Integers    ${result_db.rc}    0
 
diff --git a/test/csit/tests/cli/startup/startup_check.robot b/test/csit/tests/cli/startup/startup_check.robot
index a104670..053a6d1 100644
--- a/test/csit/tests/cli/startup/startup_check.robot
+++ b/test/csit/tests/cli/startup/startup_check.robot
@@ -20,7 +20,7 @@
     ${cli_cmd_output}=    Run Process   ${cli_exec} --help    shell=yes
     Log    ${cli_cmd_output.stdout}
     Should Be Equal As Strings    ${cli_cmd_output.rc}    0
-    Should Contain    ${cli_cmd_output.stdout}    ONAP Command-line interface
+    Should Contain    ${cli_cmd_output.stdout}    CLI version
 
 Check Cli Version Default
     [Documentation]    check cli default version
diff --git a/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot b/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot
index 8b13789..d571ee9 100644
--- a/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot
+++ b/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot
@@ -1 +1,16 @@
+*** settings ***
+Library     Collections
+Library     RequestsLibrary
+Library     simplejson
+Library     OperatingSystem
+Library     json
+Library     HttpLibrary.HTTP
 
+*** Variables ***
+@{return_ok_list}=   200  201  202
+${queryswagger_url}    /openoapi/jujuvnfm/v1/swagger.json
+
+*** Test Cases ***
+SwaggerFuncTest
+    [Documentation]    query swagger info rest test
+    Should Be Equal    2.0    2.0