diff options
Diffstat (limited to 'plans')
21 files changed, 240 insertions, 47 deletions
diff --git a/plans/modeling-toscaparsers-genericparser/sanity-check/setup.sh b/plans/modeling-toscaparsers-genericparser/sanity-check/setup.sh new file mode 100644 index 00000000..1ca35bef --- /dev/null +++ b/plans/modeling-toscaparsers-genericparser/sanity-check/setup.sh @@ -0,0 +1,68 @@ +#!/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 consul:0.9.3 +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 -e "ROUTE_LABELS=visualRange:1" --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} + +docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql nexus3.onap.org:10001/onap/vfc/db +VFC_DB_IP=`get-instance-ip.sh vfc-db` +echo VFC_DB_IP=${VFC_DB_IP} + +# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway) +for i in {1..10}; do + curl -sS -m 1 ${CONSUL_IP}:8500 && curl -sS -m 1 ${DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IP}:80 && break + echo sleep $i + sleep $i +done + +# Wait for initialization(3306 DB) +for i in {1..3}; do + curl -sS -m 1 ${VFC_DB_IP}:3306 && break + echo sleep $i + sleep $i +done + +# Need some time so service info can be synced from discovery to api gateway +echo sleep 60 +sleep 60 + +# start modeling-genericparser +docker run -d --name modeling-genericparser -v /var/lib/mysql -e MSB_ADDR=${DISCOVERY_IP}:10081 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/catalog +GenericParser_IP=`get-instance-ip.sh modeling-genericparser` +for i in {1..10}; do + curl -sS -m 1 ${GenericParser_IP}:8806 && 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 GenericParser_IP:${GenericParser_IP} -v MSB_DISCOVERY_IP:${DISCOVERY_IP}" diff --git a/plans/modeling-toscaparsers-genericparser/sanity-check/teardown.sh b/plans/modeling-toscaparsers-genericparser/sanity-check/teardown.sh new file mode 100644 index 00000000..3982a1ef --- /dev/null +++ b/plans/modeling-toscaparsers-genericparser/sanity-check/teardown.sh @@ -0,0 +1,23 @@ +#!/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-db +kill-instance.sh modeling-genericparser diff --git a/plans/modeling-toscaparsers-genericparser/sanity-check/testplan.txt b/plans/modeling-toscaparsers-genericparser/sanity-check/testplan.txt new file mode 100644 index 00000000..13456aed --- /dev/null +++ b/plans/modeling-toscaparsers-genericparser/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration/csit.git]/tests/. +# Place the suites in run order. +modeling-toscaparsers-genericparser/test.robot diff --git a/plans/policy/drools-applications/setup.sh b/plans/policy/drools-applications/setup.sh new file mode 100755 index 00000000..24422a63 --- /dev/null +++ b/plans/policy/drools-applications/setup.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# ============LICENSE_START======================================================= +# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +echo "Uninstall docker-py and reinstall docker." +pip uninstall -y docker-py +pip uninstall -y docker +pip install -U docker==2.7.0 + +docker login -u docker -p docker nexus3.onap.org:10001 + +# Adding this waiting container to avoid race condition between api and mariadb containers. +docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools-apps.yml run --rm start_dependencies +docker logs mariadb +docker container ls -a + +docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools-apps.yml up -d +sleep 1m + +docker logs mariadb +docker logs drools +docker container ls -a + +POLICY_DROOLS_IP=`get-instance-ip.sh drools` +MARIADB_IP=`get-instance-ip.sh mariadb` + +echo DROOLS IP IS ${POLICY_DROOLS_IP} +echo MARIADB IP IS ${MARIADB_IP} + +# Wait for initialization +for i in {1..10}; do + curl -sS ${MARIADB_IP}:3306 && break + echo sleep $i + sleep $i +done + +for i in {1..10}; do + curl -sS ${POLICY_DROOLS_IP}:6969 && break + echo sleep $i + sleep $i +done + +ROBOT_VARIABLES="-v POLICY_DROOLS_IP:${POLICY_DROOLS_IP}" diff --git a/plans/policy/drools-applications/teardown.sh b/plans/policy/drools-applications/teardown.sh new file mode 100755 index 00000000..48ab171d --- /dev/null +++ b/plans/policy/drools-applications/teardown.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Copyright 2019 AT&T Intellectual Property. All rights reserved. +# +# 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 drools +kill-instance.sh mariadb diff --git a/plans/policy/drools-applications/testplan.txt b/plans/policy/drools-applications/testplan.txt new file mode 100644 index 00000000..3878a4e2 --- /dev/null +++ b/plans/policy/drools-applications/testplan.txt @@ -0,0 +1,3 @@ +# Test suites are relative paths under [integration/csit.git]/tests/. +# Place the suites in run order. +policy/drools-applications diff --git a/plans/policy/drools-pdp/setup.sh b/plans/policy/drools-pdp/setup.sh index a7ed4408..459805be 100755 --- a/plans/policy/drools-pdp/setup.sh +++ b/plans/policy/drools-pdp/setup.sh @@ -17,25 +17,10 @@ # Place the scripts in run order: source ${SCRIPTS}/common_functions.sh -docker run --name i-mock -d jamesdbloom/mockserver -MOCK_IP=`get-instance-ip.sh i-mock` -echo ${MOCK_IP} - -docker inspect i-mock - -# Wait for initialization -for i in {1..10}; do - curl -sS ${MOCK_IP}:1080 && break - echo sleep $i - sleep $i -done - -${WORKSPACE}/scripts/policy/mock-hello.sh ${MOCK_IP} - source ${WORKSPACE}/scripts/policy/drools-pdp-script.sh # Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v MOCK_IP:${MOCK_IP} -v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}" +ROBOT_VARIABLES="-v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}" export PDP_IP=${PDP_IP} export POLICY_IP=${POLICY_IP} export DOCKER_IP=${DOCKER_IP} diff --git a/plans/policy/drools-pdp/teardown.sh b/plans/policy/drools-pdp/teardown.sh index f1f0b21c..303ccff1 100755 --- a/plans/policy/drools-pdp/teardown.sh +++ b/plans/policy/drools-pdp/teardown.sh @@ -24,7 +24,6 @@ docker rm -v "${name}" mkdir -p "${WORKSPACE}"/archives -kill_instance i-mock kill_instance drools kill_instance pdp kill_instance brmsgw diff --git a/plans/policy/health/setup.sh b/plans/policy/health/setup.sh index 890df9b4..c99af3fa 100755 --- a/plans/policy/health/setup.sh +++ b/plans/policy/health/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2017 AT&T Intellectual Property. All rights reserved. +# Copyright 2017, 2019 AT&T Intellectual Property. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,25 +17,10 @@ # Place the scripts in run order: source ${SCRIPTS}/common_functions.sh -docker run --name i-mock -d jamesdbloom/mockserver -MOCK_IP=`get-instance-ip.sh i-mock` -echo ${MOCK_IP} - -docker inspect i-mock - -# Wait for initialization -for i in {1..10}; do - curl -sS ${MOCK_IP}:1080 && break - echo sleep $i - sleep $i -done - -${WORKSPACE}/scripts/policy/mock-hello.sh ${MOCK_IP} - -source ${WORKSPACE}/scripts/policy/script1.sh +source ${WORKSPACE}/scripts/policy/engine.sh # Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v MOCK_IP:${MOCK_IP} -v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}" +ROBOT_VARIABLES="-v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}" export PDP_IP=${PDP_IP} export POLICY_IP=${POLICY_IP} export DOCKER_IP=${DOCKER_IP} diff --git a/plans/policy/health/teardown.sh b/plans/policy/health/teardown.sh index f1f0b21c..303ccff1 100755 --- a/plans/policy/health/teardown.sh +++ b/plans/policy/health/teardown.sh @@ -24,7 +24,6 @@ docker rm -v "${name}" mkdir -p "${WORKSPACE}"/archives -kill_instance i-mock kill_instance drools kill_instance pdp kill_instance brmsgw diff --git a/plans/policy/health/testplan.txt b/plans/policy/health/testplan.txt index ab8a5b08..6bad34fc 100644 --- a/plans/policy/health/testplan.txt +++ b/plans/policy/health/testplan.txt @@ -1,3 +1,3 @@ # Test suites are relative paths under [integration/csit.git]/tests/. # Place the suites in run order. -policy/suite1 +policy/engine diff --git a/plans/policy/pap/setup.sh b/plans/policy/pap/setup.sh index 2d31b9c4..d1ba20c2 100644 --- a/plans/policy/pap/setup.sh +++ b/plans/policy/pap/setup.sh @@ -27,10 +27,14 @@ docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-pap.yml run --rm st docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-pap.yml up -d sleep 3 +unset http_proxy https_proxy + POLICY_PAP_IP=`get-instance-ip.sh policy-pap` +POLICY_API_IP=`get-instance-ip.sh policy-api` MARIADB_IP=`get-instance-ip.sh mariadb` echo PAP IP IS ${POLICY_PAP_IP} +echo API IP IS ${POLICY_API_IP} echo MARIADB IP IS ${MARIADB_IP} # Wait for initialization for i in {1..10}; do @@ -43,9 +47,29 @@ for i in {1..10}; do echo sleep $i sleep $i done +for i in {1..10}; do + curl -sS ${POLICY_API_IP}:6969 && break + echo sleep $i + sleep $i +done #Configure the database docker exec -it mariadb chmod +x /docker-entrypoint-initdb.d/db.sh docker exec -it mariadb /docker-entrypoint-initdb.d/db.sh +#Add policy type and policy to the database via the Policy Api +AUTH="healthcheck:zb!XztG34" +CONTYPE="Content-Type: application/json" +URL=https://${POLICY_API_IP}:6969/policy/api/v1/policytypes +CONFIGDIR=${WORKSPACE}/scripts/policy/config/pap +POLTYPE=onap.policies.monitoring.cdap.tca.hi.lo.app + +SRCFILE=${CONFIGDIR}/${POLTYPE}.json +curl -sS -k --user "${AUTH}" -H "${CONTYPE}" -d @${SRCFILE} $URL + +URL2=${URL}/${POLTYPE}/versions/1.0.0/policies +SRCFILE=${CONFIGDIR}/vCPE.policy.monitoring.input.tosca.json +curl -sS -k --user "${AUTH}" -H "${CONTYPE}" -d @${SRCFILE} $URL2 + + ROBOT_VARIABLES="-v POLICY_PAP_IP:${POLICY_PAP_IP}" diff --git a/plans/policy/pap/teardown.sh b/plans/policy/pap/teardown.sh index 87986979..f05d3af9 100644 --- a/plans/policy/pap/teardown.sh +++ b/plans/policy/pap/teardown.sh @@ -18,5 +18,6 @@ # ============LICENSE_END========================================================= kill-instance.sh policy-pap +kill-instance.sh policy-api kill-instance.sh mariadb kill-instance.sh policy-wait diff --git a/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh b/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh index 28be1842..22dd8ae3 100755 --- a/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh +++ b/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh @@ -75,5 +75,11 @@ for i in {1..10}; do sleep $i done +docker cp vfc-vnfmgr:/service/vfc/gvnfm/vnfmgr/mgr/mgr/pub/config/config.py ./ +cat config.py + +docker cp vfc-vnfmgr:/service/vfc/gvnfm/vnfmgr/mgr/logs/runtime_mgr.log ./ +cat runtime_mgr.log + # Pass any variables required by Robot test suites in ROBOT_VARIABLES ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v VNFMGR_IP:${VNFMGR_IP} -v SCRIPTS:${SCRIPTS}" diff --git a/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh b/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh index 8ca66766..cce8998b 100755 --- a/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh +++ b/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh @@ -15,6 +15,10 @@ # limitations under the License. # +# print log for vnfmgr +docker cp vfc-vnfmgr:/service/vfc/gvnfm/vnfmgr/mgr/logs/runtime_mgr.log ./ +cat runtime_mgr.log + # This script is sourced by run-csit.sh after Robot test completion. kill-instance.sh msb_internal_apigateway kill-instance.sh msb_discovery diff --git a/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh b/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh index 34be3c21..11b86c78 100755 --- a/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh +++ b/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh @@ -75,5 +75,11 @@ for i in {1..10}; do sleep $i done +docker cp vfc-vnfres:/service/vfc/gvnfm/vnfres/res/res/pub/config/config.py ./ +cat config.py + +docker cp vfc-vnfres:/service/vfc/gvnfm/vnfres/res/logs/runtime_res.log ./ +cat runtime_res.log + # Pass any variables required by Robot test suites in ROBOT_VARIABLES ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v VNFRES_IP:${VNFRES_IP} -v SCRIPTS:${SCRIPTS}" diff --git a/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh b/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh index 8ca66766..4bc59849 100755 --- a/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh +++ b/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh @@ -15,6 +15,10 @@ # limitations under the License. # +# print log for vnfres +docker cp vfc-vnfres:/service/vfc/gvnfm/vnfres/res/logs/runtime_res.log ./ +cat runtime_res.log + # This script is sourced by run-csit.sh after Robot test completion. kill-instance.sh msb_internal_apigateway kill-instance.sh msb_discovery diff --git a/plans/vfc-nfvo-catalog/sanity-check/setup.sh b/plans/vfc-nfvo-catalog/sanity-check/setup.sh index d839fa55..e6221731 100644 --- a/plans/vfc-nfvo-catalog/sanity-check/setup.sh +++ b/plans/vfc-nfvo-catalog/sanity-check/setup.sh @@ -64,5 +64,8 @@ for i in {1..10}; do sleep $i done +docker cp vfc-catalog:/service/vfc/nfvo/catalog/logs/runtime_catalog.log ./ +cat runtime_catalog.log + # Pass any variables required by Robot test suites in ROBOT_VARIABLES ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v CATALOG_IP:${CATALOG_IP} -v MSB_DISCOVERY_IP:${DISCOVERY_IP}" diff --git a/plans/vfc-nfvo-catalog/sanity-check/teardown.sh b/plans/vfc-nfvo-catalog/sanity-check/teardown.sh index d498e34c..cfccb3ff 100644 --- a/plans/vfc-nfvo-catalog/sanity-check/teardown.sh +++ b/plans/vfc-nfvo-catalog/sanity-check/teardown.sh @@ -15,6 +15,10 @@ # limitations under the License. # +# print log file for catalog +docker cp vfc-catalog:/service/vfc/nfvo/catalog/logs/runtime_catalog.log ./ +cat runtime_catalog.log + # This script is sourced by run-csit.sh after Robot test completion. kill-instance.sh msb_internal_apigateway kill-instance.sh msb_discovery diff --git a/plans/vfc-nfvo-lcm/sanity-check/setup.sh b/plans/vfc-nfvo-lcm/sanity-check/setup.sh index 7a739bad..c206c0b0 100755 --- a/plans/vfc-nfvo-lcm/sanity-check/setup.sh +++ b/plans/vfc-nfvo-lcm/sanity-check/setup.sh @@ -50,11 +50,11 @@ for i in {1..3}; do sleep $i done -docker ps > 1.txt -cat 1.txt +docker ps > ps.txt +cat ps.txt echo "****************************" -docker logs -f vfc-db > 2.txt & -cat 2.txt +docker logs -f vfc-db > db.txt & +cat db.txt # Need some time so service info can be synced from discovery to api gateway echo sleep 60 @@ -71,15 +71,11 @@ for i in {1..10}; do sleep $i done -curl http://${NSLCM_IP}:8403/api/nslcm/v1/swagger.json - -docker logs -f vfc-nslcm > 3.txt & -cat 3.txt +docker logs -f vfc-nslcm > dockerlogs.txt & +cat dockerlogs.txt docker cp vfc-nslcm:/service/vfc/nfvo/lcm/logs/runtime_lcm.log ./ cat runtime_lcm.log - - # Pass any variables required by Robot test suites in ROBOT_VARIABLES ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v NSLCM_IP:${NSLCM_IP} -v SCRIPTS:${SCRIPTS}" diff --git a/plans/vfc-nfvo-lcm/sanity-check/teardown.sh b/plans/vfc-nfvo-lcm/sanity-check/teardown.sh index 6ddf7557..5fa01069 100755 --- a/plans/vfc-nfvo-lcm/sanity-check/teardown.sh +++ b/plans/vfc-nfvo-lcm/sanity-check/teardown.sh @@ -15,6 +15,10 @@ # limitations under the License. # +# print logs of lcm +docker cp vfc-nslcm:/service/vfc/nfvo/lcm/logs/runtime_lcm.log ./ +cat runtime_lcm.log + # This script is sourced by run-csit.sh after Robot test completion. kill-instance.sh msb_internal_apigateway kill-instance.sh msb_discovery |