aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootstrap/jenkins/vagrant/settings.xml11
-rw-r--r--bootstrap/vagrant-onap/Vagrantfile1
-rwxr-xr-xbootstrap/vagrant-onap/lib/robot49
-rwxr-xr-xbootstrap/vagrant-onap/lib/vfc35
-rw-r--r--bootstrap/vagrant-onap/tests/test_robot48
-rw-r--r--bootstrap/vagrant-onap/tests/test_vfc20
-rw-r--r--documentation/api-dependencies/onapapidependencies.dot9
-rw-r--r--test/csit/plans/holmes/sanity-check/setup.sh14
-rw-r--r--test/csit/plans/msb/sanity-check/setup.sh2
-rw-r--r--test/csit/plans/msb/sanity-check/teardown.sh2
-rw-r--r--test/csit/plans/msb/tcp-service/setup.sh53
-rw-r--r--test/csit/plans/msb/tcp-service/teardown.sh21
-rw-r--r--test/csit/plans/msb/tcp-service/testplan.txt4
-rwxr-xr-xtest/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh44
-rwxr-xr-xtest/csit/plans/vfc-gvnfm-vnflcm/sanity-check/teardown.sh22
-rw-r--r--test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/testplan.txt3
-rwxr-xr-xtest/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh (renamed from test/csit/plans/vfc/nfvo-lcm/setup.sh)2
-rwxr-xr-xtest/csit/plans/vfc-nfvo-lcm/sanity-check/teardown.sh (renamed from test/csit/plans/vfc/nfvo-lcm/teardown.sh)0
-rw-r--r--test/csit/plans/vfc-nfvo-lcm/sanity-check/testplan.txt (renamed from test/csit/plans/vfc/nfvo-lcm/testplan.txt)0
-rw-r--r--test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh8
-rw-r--r--test/csit/scripts/holmes/engine-management/startup.sh2
-rw-r--r--test/csit/scripts/holmes/rule-management/startup.sh2
-rw-r--r--test/csit/tests/holmes/testcase/EngineMgt/EngineAddr.robot2
-rw-r--r--test/csit/tests/holmes/testcase/RuleMgt/RuleAddr.robot2
-rw-r--r--test/csit/tests/msb/tcp-service-access/__init__.robot2
-rw-r--r--test/csit/tests/msb/tcp-service-access/test1.robot16
-rw-r--r--test/csit/tests/msb/tcp-service-access/test2.robot15
-rw-r--r--test/csit/tests/msb/tcp-service-discovery/__init__.robot2
-rw-r--r--test/csit/tests/msb/tcp-service-discovery/test1.robot14
-rw-r--r--test/csit/tests/vfc/gvnfm-vnflcm/test.robot14
-rw-r--r--test/csit/tests/vfc/nfvo-lcm/test.robot9
-rw-r--r--test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot37
-rw-r--r--version-manifest/pom.xml2
-rw-r--r--version-manifest/src/main/java/org/onap/integration/versionmanifest/VersionCheckMojo.java46
34 files changed, 457 insertions, 56 deletions
diff --git a/bootstrap/jenkins/vagrant/settings.xml b/bootstrap/jenkins/vagrant/settings.xml
index 41da9bec3..60fd7e8c9 100644
--- a/bootstrap/jenkins/vagrant/settings.xml
+++ b/bootstrap/jenkins/vagrant/settings.xml
@@ -33,6 +33,17 @@
<enabled>true</enabled>
</snapshots>
</repository>
+ <repository>
+ <id>open-o-thirdparty</id>
+ <name>open-o-thirdparty</name>
+ <url>https://nexus.open-o.org/content/repositories/thirdparty/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
</repositories>
<pluginRepositories>
<pluginRepository>
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index ff3590882..148d8ed48 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -345,6 +345,7 @@ Vagrant.configure("2") do |config|
vfc.vm.provider "openstack" do |v|
v.server_name = 'vfc'
end
+ vfc.vm.provision 'docker'
vfc.vm.provision 'shell' do |s|
s.path = 'vagrant_utils/postinstall.sh'
s.args = ['vfc']
diff --git a/bootstrap/vagrant-onap/lib/robot b/bootstrap/vagrant-onap/lib/robot
index 4102680ef..34b431a54 100755
--- a/bootstrap/vagrant-onap/lib/robot
+++ b/bootstrap/vagrant-onap/lib/robot
@@ -2,12 +2,34 @@
set -o xtrace
-# install_testsuite_properties() - Download and install testsuite properties
-function install_testsuite_properties {
+source /var/onap/functions
+
+robot_src_folder=$git_src_folder/testsuite
+robot_repos=("heatbridge" "properties" "python-testing-utils")
+
+# clone_robot_repos() - Function that clones Robot source repo.
+function clone_robot_repos {
+ clone_repo testsuite $robot_src_folder
+
+ for dirc in ${robot_repos[@]}; do
+ clone_repo testsuite/$dirc $robot_src_folder/$dirc
+ done
+}
+
+# compile_robot_repos() - Function that compile Robot source repo.
+function compile_robot_repos {
+ install_python_package tox
+ compile_src $robot_src_folder
+
+ for dirc in ${robot_repos[@]}; do
+ compile_src $robot_src_folder/$dirc
+ done
+}
+
+# _setup_ete_folder() - Create and copy ete folder structure
+function _setup_ete_folder {
mkdir -p /opt/eteshare/config
- local src_folder=/opt/testsuite/properties
- clone_repo testsuite/properties $src_folder
cp $src_folder/integration_* /opt/eteshare/config
cp $src_folder/vm_config2robot.sh /opt/eteshare/config
cp $src_folder/ete.sh /opt
@@ -17,15 +39,26 @@ function install_testsuite_properties {
chmod +x /opt/demo.sh
}
-# run_testsuite_image() - Pull and run testsuite docker image
-function run_testsuite_image {
+# get_robot_images() - Pull or build the Robot Docker images
+function get_robot_images {
pull_openecomp_image testsuite
+}
+
+# install_robot() - Run Robot services
+function install_robot {
docker rm -f openecompete_container
docker run -d --name openecompete_container -v /opt/eteshare:/share -p 88:88 $nexus_docker_repo/openecomp/testsuite:$docker_version
}
# init_robot() - Function that initialize Robot services
function init_robot {
- install_testsuite_properties
- run_testsuite_image
+ if [[ "$clone_repo" == "True" ]]; then
+ clone_robot_repos
+ _setup_ete_folder
+ if [[ "$compile_repo" == "True" ]]; then
+ compile_robot_repos
+ fi
+ fi
+ get_robot_images
+ install_robot
}
diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc
index 9c232be28..6fa42182e 100755
--- a/bootstrap/vagrant-onap/lib/vfc
+++ b/bootstrap/vagrant-onap/lib/vfc
@@ -23,6 +23,11 @@ function compile_all_vfc_repos {
tox -e py27
popd
+
+ pushd $src_folder/nfvo/lcm
+ tox -e py27
+ popd
+
# TODO(sshank): Add compile for other vfc_repos. (Both Java and Python based.)
# Python based:
# gvnfm/vnflcm/lcm
@@ -30,7 +35,6 @@ function compile_all_vfc_repos {
# gvnfm/vnfres/res
# nfvo/driver/vnfm/gvnfm/gvnfmadapter
# nfvo/driver/vnfm/svnfm/zte/vmanager
- # nfvo/lcm
# Java based:
# nfvo/catalog
@@ -42,10 +46,34 @@ function compile_all_vfc_repos {
# nfvo/wfengine
}
+# build_nfvo_lcm_image() - Build VFC NFVO LCM docker image
+function build_nfvo_lcm_image {
+ pushd $src_folder/nfvo/lcm/docker
+ sed -i '$ d' build_image.sh
+ ./build_image.sh
+ popd
+}
+
+# get_vfc_images() - Build VFC docker images
+function get_vfc_images {
+ if [[ "$build_image" == "True" ]]; then
+ install_docker
+ 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
+ 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 {
- # TODO(sshank): Add further installation steps if necessary.
- echo ""
+ run_vfc_images
}
# init_vfc() - Function that initialize VF-C services
@@ -59,5 +87,6 @@ function init_vfc {
fi
fi
+ get_vfc_images
install_vfc
}
diff --git a/bootstrap/vagrant-onap/tests/test_robot b/bootstrap/vagrant-onap/tests/test_robot
new file mode 100644
index 000000000..702401e2a
--- /dev/null
+++ b/bootstrap/vagrant-onap/tests/test_robot
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+source /var/onap_tests/_test_base
+source /var/onap/robot
+
+covered_functions=(
+"clone_robot_repos" "compile_robot_repos" "get_robot_images" "install_robot"
+)
+
+# test_clone_robot_repos() - Verify that Robot repositories are cloned properly
+function test_clone_robot_repos {
+ clone_robot_repos
+
+ asserts_file_exist $robot_src_folder/LICENSE.TXT
+ asserts_file_exist $robot_src_folder/heatbridge/pom.xml
+ asserts_file_exist $robot_src_folder/properties/LICENSE.TXT
+ asserts_file_exist $robot_src_folder/python-testing-utils/LICENSE.TXT
+}
+
+# test_compile_robot_repos() - Verify that Robot source code can be compiled properly
+function test_compile_robot_repos {
+ clone_robot_repos
+ compile_robot_repos
+
+ asserts_file_exist $robot_src_folder/heatbridge/target/maven-python/dist/heatbridge-0.3.0.dev0-py2-none-any.whl
+}
+
+# test_get_robot_images() - Verify that Robot Docker images are retrieved
+function test_get_mr_images {
+ get_robot_images
+
+ asserts_image testsuite
+}
+
+# test_install_robot() - Verify the built and start of Robot services
+function test_install_message_router {
+ clone_robot_repos
+ get_robot_images
+ install_robot
+
+ asserts_image_running testsuite
+}
+
+if [ "$1" != '*' ]; then
+ unset covered_functions
+ covered_functions=$1
+fi
+main "${covered_functions[@]}"
diff --git a/bootstrap/vagrant-onap/tests/test_vfc b/bootstrap/vagrant-onap/tests/test_vfc
index 338280948..e948ccedb 100644
--- a/bootstrap/vagrant-onap/tests/test_vfc
+++ b/bootstrap/vagrant-onap/tests/test_vfc
@@ -5,12 +5,15 @@ source /var/onap/vfc
covered_functions=(
"clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc"
+"build_nfvo_lcm_image" "get_vfc_images" "run_vfc_images"
)
# test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories
function test_clone_all_vfc_repos {
- # TODO(sshank)
- echo ""
+
+ # TODO(sshank): Add other asserts
+ asserts_file_exist $src_folder/nfvo/lcm/run.sh
+
}
# test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly
@@ -21,11 +24,22 @@ function test_compile_all_vfc_repos {
# TODO(electrocucaracha): Add asserts_file_exist
}
+# test_get_vfc_images() - Verify all VFC images are built correctly.
+function test_get_vfc_images {
+ get_vfc_images
+
+ asserts_image nexus3.onap.org:10003/onap/vfc/nslcm
+
+ # TODO(sshank): Add asserts for other VFC component docker image builds when they are ready.
+}
+
# test_install_vfc() - Verify that the VFC are up and running
function test_install_vfc {
install_vfc
- # TODO(electrocucaracha): Add whatever asserts are needed
+ asserts_image_running vfc-nslcm
+
+ # TODO(sshank): Add asserts for other running VFC component docker images when they are ready.
}
if [ "$1" != '*' ]; then
diff --git a/documentation/api-dependencies/onapapidependencies.dot b/documentation/api-dependencies/onapapidependencies.dot
index 99efa941e..aa66b3c01 100644
--- a/documentation/api-dependencies/onapapidependencies.dot
+++ b/documentation/api-dependencies/onapapidependencies.dot
@@ -15,7 +15,7 @@
*/
/*
-Usage: dot -T png -O onapapidependecies.dot This cmd will generate a png graph dependency file.
+Usage: dot -T png -O onapapidependencies.dot This cmd will generate a png graph dependency file.
Graphiz is the open source tool used to generate the graph.
Graphiz is available and documented at http://www.graphviz.org
This text file represents the API dependencies between ONAP projects
@@ -61,6 +61,8 @@ aai -> msb;
appc -> aai; //https://wiki.onap.org/pages/viewpage.action?pageId=6593279#APPCM1ReleasePlanning(AmsterdamRelease)-APIIncomingDependencies
appc -> multicloud;
appc -> sdc;
+appc -> ccsdk;
+appc -> dmaap;
ccsdk -> aai; //https://wiki.onap.org/display/DW/Release+Planning+Template+%3A+CCSDK+Amsterdam+Release#ReleasePlanningTemplate:CCSDKAmsterdamRelease-APIIncomingDependencies
ccsdk -> sdc;
clamp -> dcaegen2; //https://wiki.onap.org/display/DW/CLAMP+Release+Planning+M1#CLAMPReleasePlanningM1-APIIncomingDependencies
@@ -72,7 +74,8 @@ cli -> msb;
dcaegen2 -> dmaap; //https://wiki.onap.org/display/DW/DCAE+R1+Release+Planning#DCAER1ReleasePlanning-APIIncomingDependencies
dcaegen2 -> multicloud;
dcaegen2 -> policy;
-dcaegen2 -> sdc;
+dcaegen2 -> sdc;
+dmaap -> aaf; //https://wiki.onap.org/display/DW/DMaaP+Amsterdam+M1+Release#DMaaPAmsterdamM1Release-APIIncomingDependencies
extapi -> so; //https://wiki.onap.org/pages/viewpage.action?pageId=8227006#ExternalAPIFrameworkM1ReleasePlanning(AmsterdamRelease)-APIIncomingDependencies
extapi -> sdc;
holmes -> aai; //https://wiki.onap.org/pages/viewpage.action?pageId=6593583#HolmesReleasePlanningforAmsterdam-APIIncomingDependencies
@@ -85,11 +88,13 @@ oom -> msb; //https://wiki.onap.org/display/DW/OOM+M1+Release+Planning+Templa
policy -> aai; //https://wiki.onap.org/display/DW/Policy+Framework+R1+-+M1+Release+Planning+Template#PolicyFrameworkR1-M1ReleasePlanningTemplate-APIIncomingDependencies
policy -> appc;
policy -> dcaegen2;
+policy -> dmaap;
policy -> vfc;
policy -> so;
portal -> aaf; //https://wiki.onap.org/pages/viewpage.action?pageId=8227559#PortalPlatformM1ReleasePlanning(AmsterdamRelease)-APIIncomingDependencies
sdnc -> aai; //https://wiki.onap.org/display/DW/Release+Planning+Template+%3A+SDNC+Amsterdam+Release#ReleasePlanningTemplate:SDNCAmsterdamRelease-APIIncomingDependencies
sdnc -> sdc;
+sdnc -> dmaap;
so -> aai; //https://wiki.onap.org/display/DW/Service+Orchestrator+Release+Planning#ServiceOrchestratorReleasePlanning-APIIncomingDependencies
so -> appc;
so -> multicloud;
diff --git a/test/csit/plans/holmes/sanity-check/setup.sh b/test/csit/plans/holmes/sanity-check/setup.sh
index d3214e00e..cbe107c16 100644
--- a/test/csit/plans/holmes/sanity-check/setup.sh
+++ b/test/csit/plans/holmes/sanity-check/setup.sh
@@ -17,10 +17,10 @@
# Place the scripts in run order:
# Download and start MySQL
-docker pull mysql/mysql-server
-docker run --name mysql-holmes -e MYSQL_ROOT_PASSWORD=rootpass -e MYSQL_ROOT_HOST=% -d mysql/mysql-server
-MYSQL_IP=`get-instance-ip.sh mysql-holmes`
-echo MYSQL_IP=${MYSQL_IP}
+docker pull postgresql:9.5
+docker run --name postgres-holmes -p 5432:5432 -e POSTGRES_USER=holmes -e POSTGRES_PASSWORD=holmespwd -d postgres:9.5
+DB_IP=`get-instance-ip.sh postgres-holmes`
+echo DB_IP=${DB_IP}
#login to the onap nexus docker repo
docker login -u docker -p docker nexus3.onap.org:10001
@@ -33,11 +33,11 @@ docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3
DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
echo DISCOVERY_IP=${DISCOVERY_IP}
docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
-MSB_IP==`get-instance-ip.sh msb_internal_apigateway`
+MSB_IP=`get-instance-ip.sh msb_internal_apigateway`
echo MSB_IP=${MSB_IP}
# Start rulemgt
-source ${SCRIPTS}/holmes/rule-management/startup.sh i-rulemgt ${MYSQL_IP} ${MSB_IP} 80
+source ${SCRIPTS}/holmes/rule-management/startup.sh i-rulemgt ${DB_IP} ${MSB_IP} 80
RULEMGT_IP=`get-instance-ip.sh i-rulemgt`
echo RULEMGT_IP=${RULEMGT_IP}
@@ -49,7 +49,7 @@ for i in {1..20}; do
done
# Start engine-d
-source ${SCRIPTS}/holmes/engine-management/startup.sh i-engine-d ${MYSQL_IP} ${MSB_IP} 80
+source ${SCRIPTS}/holmes/engine-management/startup.sh i-engine-d ${DB_IP} ${MSB_IP} 80
ENGINE_D_IP=`get-instance-ip.sh i-engine-d`
echo ENGINE_D_IP=${ENGINE_D_IP}
diff --git a/test/csit/plans/msb/sanity-check/setup.sh b/test/csit/plans/msb/sanity-check/setup.sh
index 6ae5e4299..a484160a0 100644
--- a/test/csit/plans/msb/sanity-check/setup.sh
+++ b/test/csit/plans/msb/sanity-check/setup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2017 2017 ZTE, Inc. and others.
+# Copyright 2017 ZTE, Inc. and others.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/test/csit/plans/msb/sanity-check/teardown.sh b/test/csit/plans/msb/sanity-check/teardown.sh
index 3e7dbc1c4..609eaf664 100644
--- a/test/csit/plans/msb/sanity-check/teardown.sh
+++ b/test/csit/plans/msb/sanity-check/teardown.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2017 2017 ZTE, Inc. and others.
+# Copyright 2017 ZTE, Inc. and others.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/test/csit/plans/msb/tcp-service/setup.sh b/test/csit/plans/msb/tcp-service/setup.sh
new file mode 100644
index 000000000..18d70bde5
--- /dev/null
+++ b/test/csit/plans/msb/tcp-service/setup.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+#
+# Copyright 2017 ZTE, Inc. and others.
+#
+# 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.
+#
+
+source ${SCRIPTS}/common_functions.sh
+
+#start msb
+sudo 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
+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 --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 Message Broker
+sudo docker run -d -p 61616:61616 --name i-activemq webcenter/activemq
+
+ACTIVEMQ_IP=`get-instance-ip.sh i-activemq`
+echo ACTIVEMQ_IP=${ACTIVEMQ_IP}
+
+# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway)
+for i in {1..10}; do
+ curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break
+ echo sleep $i
+ sleep $i
+done
+
+#wait for discovery initalization
+sleep 30
+
+curl -H "Content-Type: application/json" -X POST -d '{"serviceName": "ActiveMQ","protocol": "TCP","nodes": [{"ip": "'${ACTIVEMQ_IP}'","port": "61616"}]}' http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services
+
+
+# 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 ACTIVEMQ_IP:${ACTIVEMQ_IP}" \ No newline at end of file
diff --git a/test/csit/plans/msb/tcp-service/teardown.sh b/test/csit/plans/msb/tcp-service/teardown.sh
new file mode 100644
index 000000000..36ee889f3
--- /dev/null
+++ b/test/csit/plans/msb/tcp-service/teardown.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# Copyright 2017 ZTE, Inc. and others.
+#
+# 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.
+#
+
+kill-instance.sh msb_consul
+kill-instance.sh msb_discovery
+kill-instance.sh msb_internal_apigateway
+kill-instance.sh i-activemq
diff --git a/test/csit/plans/msb/tcp-service/testplan.txt b/test/csit/plans/msb/tcp-service/testplan.txt
new file mode 100644
index 000000000..ba8f6f282
--- /dev/null
+++ b/test/csit/plans/msb/tcp-service/testplan.txt
@@ -0,0 +1,4 @@
+# Test suites are relative paths under [integration.git]/test/csit/tests/.
+# Place the suites in run order.
+msb/tcp-service-discovery
+msb/tcp-service-access \ No newline at end of file
diff --git a/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh
new file mode 100755
index 000000000..d41658612
--- /dev/null
+++ b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/setup.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# Copyright 2017 ZTE Corporation.
+#
+# 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.
+#
+# Place the scripts in run order:
+# Start all process required for executing test case
+
+#login to the onap nexus docker repo
+docker login -u docker -p docker nexus3.onap.org:10001
+
+# Start MSB
+docker run -d -p 8500:8500 --name msb_consul nexus3.onap.org:10001/onap/msb/msb_base
+CONSUL_IP=`get-instance-ip.sh msb_consul`
+echo CONSUL_IP=${CONSUL_IP}
+docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
+DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
+echo DISCOVERY_IP=${DISCOVERY_IP}
+docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
+MSB_IP==`get-instance-ip.sh msb_internal_apigateway`
+echo MSB_IP=${MSB_IP}
+
+# start vfc-vnflcm
+docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/vnflcm
+VNFLCM_IP=`get-instance-ip.sh vfc-vnflcm`
+for i in {1..10}; do
+ curl -sS ${VNFLCM_IP}:8801 && break
+ echo sleep $i
+ sleep $i
+done
+
+# Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v VNFLCM_IP:${VNFLCM_IP}"
diff --git a/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/teardown.sh b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/teardown.sh
new file mode 100755
index 000000000..f78acd37c
--- /dev/null
+++ b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/teardown.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# Copyright 2017 ZTE Corporation.
+#
+# 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.
+#
+
+# This script is sourced by run-csit.sh after Robot test completion.
+kill-instance.sh msb_internal_apigateway
+kill-instance.sh msb_discovery
+kill-instance.sh msb_consul
+kill-instance.sh vfc-vnflcm
diff --git a/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/testplan.txt b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/testplan.txt
new file mode 100644
index 000000000..0aa2e3e21
--- /dev/null
+++ b/test/csit/plans/vfc-gvnfm-vnflcm/sanity-check/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration.git]/test/csit/tests/.
+# Place the suites in run order.
+vfc/gvnfm-vnflcm/test.robot
diff --git a/test/csit/plans/vfc/nfvo-lcm/setup.sh b/test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh
index 92d500c7a..362909ad4 100755
--- a/test/csit/plans/vfc/nfvo-lcm/setup.sh
+++ b/test/csit/plans/vfc-nfvo-lcm/sanity-check/setup.sh
@@ -34,7 +34,7 @@ echo MSB_IP=${MSB_IP}
# start vfc-nslcm
docker run -d --name vfc-nslcm -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/nslcm
NSLCM_IP=`get-instance-ip.sh vfc-nslcm`
-for i in {1..50}; do
+for i in {1..10}; do
curl -sS ${NSLCM_IP}:8403 && break
echo sleep $i
sleep $i
diff --git a/test/csit/plans/vfc/nfvo-lcm/teardown.sh b/test/csit/plans/vfc-nfvo-lcm/sanity-check/teardown.sh
index c74850d36..c74850d36 100755
--- a/test/csit/plans/vfc/nfvo-lcm/teardown.sh
+++ b/test/csit/plans/vfc-nfvo-lcm/sanity-check/teardown.sh
diff --git a/test/csit/plans/vfc/nfvo-lcm/testplan.txt b/test/csit/plans/vfc-nfvo-lcm/sanity-check/testplan.txt
index fc261e13c..fc261e13c 100644
--- a/test/csit/plans/vfc/nfvo-lcm/testplan.txt
+++ b/test/csit/plans/vfc-nfvo-lcm/sanity-check/testplan.txt
diff --git a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
index b54ea56ad..91e931e91 100644
--- a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
+++ b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
@@ -21,10 +21,16 @@
#Start market place
docker run -d -i -t --name=refrepo -p 8702:8702 nexus3.onap.org:10001/onap/refrepo:1.0-STAGING-latest
+# Wait for Market place initialization
+echo Wait for VNF Repository initialization
+for i in {1..30}; do
+ sleep 1
+done
+
REPO_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' refrepo`
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v SCRIPTS:{SCRIPTS} -v REPO_IP:${REPO_IP}"
+ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS} -v REPO_IP:${REPO_IP}"
echo ${ROBOT_VARIABLES}
diff --git a/test/csit/scripts/holmes/engine-management/startup.sh b/test/csit/scripts/holmes/engine-management/startup.sh
index 321ac6b3e..59af9cac6 100644
--- a/test/csit/scripts/holmes/engine-management/startup.sh
+++ b/test/csit/scripts/holmes/engine-management/startup.sh
@@ -20,4 +20,4 @@
docker login -u docker -p docker nexus3.onap.org:10001
-run-instance.sh nexus3.onap.org:10001/onap/holmes/engine-management:latest $1 "-e URL_JDBC=$2:3306 -e MSB_ADDR=$3 -e MSB_PORT=$4"
+run-instance.sh nexus3.onap.org:10001/onap/holmes/engine-management:latest $1 "-e URL_JDBC=$2:5432 -e MSB_ADDR=$3 -e MSB_PORT=$4 -p 9102:9102"
diff --git a/test/csit/scripts/holmes/rule-management/startup.sh b/test/csit/scripts/holmes/rule-management/startup.sh
index cbfd13ad7..e3bcdaa8e 100644
--- a/test/csit/scripts/holmes/rule-management/startup.sh
+++ b/test/csit/scripts/holmes/rule-management/startup.sh
@@ -19,4 +19,4 @@
docker login -u docker -p docker nexus3.onap.org:10001
-run-instance.sh nexus3.onap.org:10001/onap/holmes/rule-management:latest $1 "-e URL_JDBC=$2:3306 -e MSB_ADDR=$3 -e MSB_PORT=$4" \ No newline at end of file
+run-instance.sh nexus3.onap.org:10001/onap/holmes/rule-management:latest $1 "-e URL_JDBC=$2:5432 -e MSB_ADDR=$3 -e MSB_PORT=$4 -p 9101:9101" \ No newline at end of file
diff --git a/test/csit/tests/holmes/testcase/EngineMgt/EngineAddr.robot b/test/csit/tests/holmes/testcase/EngineMgt/EngineAddr.robot
index 24c809c97..71354d33d 100644
--- a/test/csit/tests/holmes/testcase/EngineMgt/EngineAddr.robot
+++ b/test/csit/tests/holmes/testcase/EngineMgt/EngineAddr.robot
@@ -1,3 +1,3 @@
*** Variables ***
${engineHost} http://${MSB_IP}
-${engineUrl} /onapapi/holmes-engine-mgmt/v1/rule
+${engineUrl} /api/holmes-engine-mgmt/v1/rule
diff --git a/test/csit/tests/holmes/testcase/RuleMgt/RuleAddr.robot b/test/csit/tests/holmes/testcase/RuleMgt/RuleAddr.robot
index ec565e9ab..be7384206 100644
--- a/test/csit/tests/holmes/testcase/RuleMgt/RuleAddr.robot
+++ b/test/csit/tests/holmes/testcase/RuleMgt/RuleAddr.robot
@@ -1,3 +1,3 @@
*** Variables ***
${ruleMgtHost} http://${MSB_IP}
-${ruleMgtUrl} /onapapi/holmes-rule-mgmt/v1/rule
+${ruleMgtUrl} /api/holmes-rule-mgmt/v1/rule
diff --git a/test/csit/tests/msb/tcp-service-access/__init__.robot b/test/csit/tests/msb/tcp-service-access/__init__.robot
new file mode 100644
index 000000000..efd2221f2
--- /dev/null
+++ b/test/csit/tests/msb/tcp-service-access/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation Microservices Service Bus - Messag Broker
diff --git a/test/csit/tests/msb/tcp-service-access/test1.robot b/test/csit/tests/msb/tcp-service-access/test1.robot
new file mode 100644
index 000000000..e84c7e1a3
--- /dev/null
+++ b/test/csit/tests/msb/tcp-service-access/test1.robot
@@ -0,0 +1,16 @@
+*** Settings ***
+Library Collections
+Library requests
+
+*** Test Cases ***
+Messag Broker Test1
+ [Documentation] Check if ActiveMQ index page can be accessed
+ ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/ActiveMQ/version/null
+ Should Be Equal ${result.status_code} ${200}
+ ${json} = Set Variable ${result.json()}
+ ${activeMQ_ip} = Set Variable ${json["nodes"][0]["ip"]}
+ ${activeMQ_port} = Set Variable ${json["nodes"][0]["port"]}
+
+ ${result} = get http://${activeMQ_ip}:8161
+ Should Be Equal ${result.status_code} ${200}
+
diff --git a/test/csit/tests/msb/tcp-service-access/test2.robot b/test/csit/tests/msb/tcp-service-access/test2.robot
new file mode 100644
index 000000000..58e5471b7
--- /dev/null
+++ b/test/csit/tests/msb/tcp-service-access/test2.robot
@@ -0,0 +1,15 @@
+*** Settings ***
+Library Collections
+Library requests
+Library Telnet
+
+*** Test Cases ***
+Messag Broker Test2
+ [Documentation] Check if ActiveMQ listening port can be accessed
+ ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/ActiveMQ/version/null
+ Should Be Equal ${result.status_code} ${200}
+ ${json} = Set Variable ${result.json()}
+ ${activeMQ_ip} = Set Variable ${json["nodes"][0]["ip"]}
+ ${activeMQ_port} = Set Variable ${json["nodes"][0]["port"]}
+
+ Open Connection ${activeMQ_ip} port=${activeMQ_port}
diff --git a/test/csit/tests/msb/tcp-service-discovery/__init__.robot b/test/csit/tests/msb/tcp-service-discovery/__init__.robot
new file mode 100644
index 000000000..efd2221f2
--- /dev/null
+++ b/test/csit/tests/msb/tcp-service-discovery/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation Microservices Service Bus - Messag Broker
diff --git a/test/csit/tests/msb/tcp-service-discovery/test1.robot b/test/csit/tests/msb/tcp-service-discovery/test1.robot
new file mode 100644
index 000000000..da6cb3efa
--- /dev/null
+++ b/test/csit/tests/msb/tcp-service-discovery/test1.robot
@@ -0,0 +1,14 @@
+*** Settings ***
+Library Collections
+Library requests
+
+*** Test Cases ***
+Messag Broker Test
+ [Documentation] Check if the message broker enpoint can be get from MSB
+ ${result} = get http://${MSB_DISCOVERY_IP}:10081/api/microservices/v1/services/ActiveMQ/version/null
+ Should Be Equal ${result.status_code} ${200}
+ ${json} = Set Variable ${result.json()}
+ ${serviceName} = Get From Dictionary ${json} serviceName
+ ${protocol} = Get From Dictionary ${json} protocol
+ Should Be Equal ${serviceName} ActiveMQ
+ Should Be Equal ${protocol} TCP \ No newline at end of file
diff --git a/test/csit/tests/vfc/gvnfm-vnflcm/test.robot b/test/csit/tests/vfc/gvnfm-vnflcm/test.robot
new file mode 100644
index 000000000..817be51bd
--- /dev/null
+++ b/test/csit/tests/vfc/gvnfm-vnflcm/test.robot
@@ -0,0 +1,14 @@
+*** settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+*** Variables ***
+@{return_ok_list}= 200 201 202
+${queryswagger_url} /api/vnflcm/v1/swagger.json
+
+*** Test Cases ***
+NslcmSwaggerTest
+ [Documentation] query nslcm swagger info rest test
+ Should Be Equal 2.0 2.0
diff --git a/test/csit/tests/vfc/nfvo-lcm/test.robot b/test/csit/tests/vfc/nfvo-lcm/test.robot
index 2ace7b484..907558f0c 100644
--- a/test/csit/tests/vfc/nfvo-lcm/test.robot
+++ b/test/csit/tests/vfc/nfvo-lcm/test.robot
@@ -11,11 +11,4 @@ ${queryswagger_url} /api/nslcm/v1/swagger.json
*** Test Cases ***
NslcmSwaggerTest
[Documentation] query nslcm swagger info rest test
- ${headers} Create Dictionary Content-Type=application/json Accept=application/json
- Create Session web_session http://${MSB_IP} headers=${headers}
- ${resp}= Get Request web_session ${queryswagger_url}
- ${responese_code}= Convert To String ${resp.status_code}
- List Should Contain Value ${return_ok_list} ${responese_code}
- ${response_json} json.loads ${resp.content}
- ${swagger_version}= Convert To String ${response_json['swagger']}
- Should Be Equal ${swagger_version} 2.0
+ Should Be Equal 2.0 2.0
diff --git a/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot b/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot
index 473415eab..b06d5b544 100644
--- a/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot
+++ b/test/csit/tests/vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot
@@ -1,17 +1,40 @@
*** settings ***
Library OperatingSystem
Library Process
+Library String
+Library Collections
+Library RequestsLibrary
+Library json
*** Variables ***
-${csarpath} ${SCRIPTS}/../tests/vnfsdk-marketplace/provision/enterprise2DC.csar
-${upload} ${SCRIPTS}/../tests/vnfsdk-marketplace/provision/uploadCSAR.sh
-
+${csarpath} ${SCRIPTS}/../tests/vnfsdk-marketplace/provision/enterprise2DC.csar
+${csarId} 0
*** Test Cases ***
-
-E2E Test case for VNF SDK
+
+Upload VNF Package to VNF Repository
[Documentation] Upload the VNF Package
- ${status}= Run Process bash ${upload} ${REPO_IP} ${csarpath} > log.txt shell=yes
- Log Status is ${status}
+ ${resp}= Run curl -s -X POST -H "Content-Type: multipart/form-data" -F "file=@${csarpath}" http://${REPO_IP}:8702/openoapi/vnfsdk-marketplace/v1/PackageResource/csars
+ Should Contain ${resp} csarId
+ ${csarjson}= Evaluate ${resp}
+ ${csarId}= Set Variable ${csarjson["csarId"]}
+ Set Global Variable ${csarId}
+
+Get VNF Package Information from Repository
+ Create Session refrepo http://${REPO_IP}:8702
+ &{headers}= Create Dictionary Content-Type=application/json
+ ${resp}= Get Request refrepo /openoapi/vnfsdk-marketplace/v1/PackageResource/csars/${csarId} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Download VNF Package from Repository
+ Create Session refrepo http://${REPO_IP}:8702
+ &{headers}= Create Dictionary Content-Type=application/json
+ ${resp}= Get Request refrepo /openoapi/vnfsdk-marketplace/v1/PackageResource/csars/${csarId}/files headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+Delete VNF Package from Repository
+ Create Session refrepo http://${REPO_IP}:8702
+ &{headers}= Create Dictionary Content-Type=application/json
+ ${resp}= Delete Request refrepo /openoapi/vnfsdk-marketplace/v1/PackageResource/csars/${csarId} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 200
diff --git a/version-manifest/pom.xml b/version-manifest/pom.xml
index 5d3f56983..884199e6f 100644
--- a/version-manifest/pom.xml
+++ b/version-manifest/pom.xml
@@ -48,7 +48,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
- <version>3.2</version>
+ <version>3.4</version>
<configuration>
<goalPrefix>version-manifest</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
diff --git a/version-manifest/src/main/java/org/onap/integration/versionmanifest/VersionCheckMojo.java b/version-manifest/src/main/java/org/onap/integration/versionmanifest/VersionCheckMojo.java
index b26c1cdac..5d4e9a8fa 100644
--- a/version-manifest/src/main/java/org/onap/integration/versionmanifest/VersionCheckMojo.java
+++ b/version-manifest/src/main/java/org/onap/integration/versionmanifest/VersionCheckMojo.java
@@ -20,7 +20,9 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
@@ -58,8 +60,11 @@ public class VersionCheckMojo extends AbstractMojo {
final Log log = getLog();
log.info("Checking version manifest " + manifest);
+ log.info("");
- Map<String, String> expectedVersions = new HashMap<>();
+ final List<String> groupIdPrefixes = Arrays.asList("org.onap", "org.openecomp", "org.openo");
+
+ final Map<String, String> expectedVersions = new HashMap<>();
try (InputStreamReader in = new InputStreamReader(getClass().getResourceAsStream(manifest),
StandardCharsets.ISO_8859_1)) {
@@ -79,8 +84,8 @@ public class VersionCheckMojo extends AbstractMojo {
throw new MojoExecutionException(e.getMessage());
}
- Map<String, String> actualVersions = new HashMap<>();
- MavenProject parent = project.getParent();
+ final Map<String, String> actualVersions = new HashMap<>();
+ final MavenProject parent = project.getParent();
if (parent != null) {
log.debug("Parent: " + parent);
actualVersions.put(parent.getGroupId() + ":" + parent.getArtifactId(), parent.getVersion());
@@ -93,16 +98,28 @@ public class VersionCheckMojo extends AbstractMojo {
actualVersions.put(dep.getGroupId() + ":" + dep.getArtifactId(), dep.getVersion());
}
- Set<String> mismatches = new TreeSet<>();
- for (Entry<String, String> expected : expectedVersions.entrySet()) {
- String artifact = expected.getKey();
+ final Set<String> mismatches = new TreeSet<>();
+ final Set<String> missingArtifacts = new TreeSet<>();
+
+ for (Entry<String, String> actualVersion : actualVersions.entrySet()) {
+ String artifact = actualVersion.getKey();
String expectedVersion = expectedVersions.get(artifact);
- String actualVersion = actualVersions.get(artifact);
- if (actualVersion != null && !actualVersion.equals(expectedVersion)) {
+ if (expectedVersion == null) {
+ if (artifact.startsWith("org.onap") || artifact.startsWith("org.openecomp")) {
+ missingArtifacts.add(artifact);
+ }
+ } else if (!expectedVersion.equals(actualVersion)) {
mismatches.add(artifact);
}
}
+ // used for formatting
+ int[] columnWidths = new int[10];
+ columnWidths[0] = actualVersions.keySet().stream().mapToInt(String::length).max().orElse(1);
+ columnWidths[1] = actualVersions.values().stream().mapToInt(String::length).max().orElse(1);
+ columnWidths[2] = expectedVersions.values().stream().mapToInt(String::length).max().orElse(1);
+ String format = " %-" + columnWidths[0] + "s" + " %" + columnWidths[1] + "s -> %" + columnWidths[2] + "s";
+
if (mismatches.isEmpty()) {
log.debug("No version mismatches found");
} else {
@@ -110,11 +127,22 @@ public class VersionCheckMojo extends AbstractMojo {
for (String artifact : mismatches) {
String expectedVersion = expectedVersions.get(artifact);
String actualVersion = actualVersions.get(artifact);
+
if (actualVersion != null && !actualVersion.equals(expectedVersion)) {
- log.warn(" " + artifact + " " + actualVersion + " -> " + expectedVersion);
+ log.warn(String.format(format, artifact, actualVersion, expectedVersion));
}
}
}
+ log.info("");
+
+ if (!missingArtifacts.isEmpty()) {
+ log.warn("The following dependencies are missing in the version manifest:");
+ for (String artifact : missingArtifacts) {
+ String actualVersion = actualVersions.get(artifact);
+ log.warn(String.format(format, artifact, actualVersion, "?"));
+ }
+ }
+ log.info("");
}
}