From 3d202b5a5f14587852e8519def7a07c4ca477686 Mon Sep 17 00:00:00 2001 From: efiacor Date: Mon, 29 Mar 2021 09:25:03 +0100 Subject: [PATCH] [DMAAP] Refactoring dmaap suites Remove dmaap-bc ssl suite Remove 5gbulkpm as it runs in gating already Update bc suite to use latest image Issue-ID: DMAAP-1502 Signed-off-by: efiacor Change-Id: I14146fe616a2da49b5dcf9b4c98f9976fc65a86f --- plans/dmaap-buscontroller/mock_downstream/setup.sh | 45 --- .../mock_downstream/teardown.sh | 26 -- .../mock_downstream/testplan.txt | 4 - plans/dmaap-buscontroller/ssl/setup.sh | 45 --- plans/dmaap-buscontroller/ssl/teardown.sh | 26 -- plans/dmaap-buscontroller/ssl/testplan.txt | 4 - plans/dmaap-buscontroller/with_dr/setup.sh | 46 +-- plans/dmaap-buscontroller/with_dr/teardown.sh | 20 +- plans/dmaap-buscontroller/with_mr/setup.sh | 43 +-- plans/dmaap-buscontroller/with_mr/teardown.sh | 12 +- plans/dmaap-buscontroller/with_mr/testplan.txt | 2 +- plans/dmaap-datarouter/ssl-dr-suite/teardown.sh | 15 +- .../assets/A20181002.0000-1000-0015-1000_5G.xml.gz | Bin 959 -> 0 bytes .../5G-bulkpm/assets/cbs_sim/cbs-initializer.json | 95 ------ .../assets/cbs_sim/cbs_mockserver.properties | 26 -- .../5G-bulkpm/assets/dfc/application.yaml | 26 -- .../5G-bulkpm/assets/dfc/datafile_endpoints.json | 39 --- .../assets/dmaap_dr/addDefaultSubscriber.json | 19 -- .../assets/dmaap_dr/addPmMapperSubscriber.json | 20 -- .../5G-bulkpm/assets/dmaap_dr/createFeed.json | 18 -- .../5G-bulkpm/assets/pm_mapper_certs/cert.jks | Bin 4654 -> 0 bytes .../5G-bulkpm/assets/pm_mapper_certs/jks.pass | 1 - .../5G-bulkpm/assets/pm_mapper_certs/trust.jks | Bin 1413 -> 0 bytes .../5G-bulkpm/assets/pm_mapper_certs/trust.pass | 1 - .../5G-bulkpm/composefile/docker-compose-e2e.yml | 155 --------- .../5G-bulkpm/composefile/docker-compose-mr.yml | 77 ----- plans/usecases-5G-bulkpm/5G-bulkpm/setup.sh | 124 ------- plans/usecases-5G-bulkpm/5G-bulkpm/teardown.sh | 15 - plans/usecases-5G-bulkpm/5G-bulkpm/testplan.txt | 3 - scripts/dmaap-buscontroller/dmaapbc-init.sh | 50 +-- scripts/dmaap-buscontroller/dmaapbc-launch.sh | 37 +-- .../docker-compose/buscontroller.env | 4 + .../cadi_aaf/org.onap.dmaap-bc.cred.props | 17 + .../docker-compose/cadi_aaf/org.onap.dmaap-bc.jks | Bin 0 -> 4719 bytes .../cadi_aaf/org.onap.dmaap-bc.location.props | 8 + .../cadi_aaf/org.onap.dmaap-bc.props | 24 ++ .../docker-compose/cadi_aaf/truststore.jks | Bin 0 -> 3234 bytes .../docker-compose/dmaapbc.properties | 168 ++++++++++ .../docker-compose/docker-compose-bc.yml | 25 ++ .../dmaap-buscontroller/docker-compose/logback.xml | 356 +++++++++++++++++++++ scripts/dmaap-buscontroller/dr-launch.sh | 58 ---- scripts/dmaap-buscontroller/init-mock-aaf.sh | 53 --- scripts/dmaap-buscontroller/init-mock-drps.sh | 17 - scripts/dmaap-buscontroller/init-mock-mrc.sh | 17 - scripts/dmaap-buscontroller/onapCSIT.env | 18 -- scripts/dmaap-buscontroller/start-mock.sh | 51 --- scripts/dmaap-datarouter/datarouter-launch.sh | 14 +- scripts/dmaap-datarouter/datarouter-teardown.sh | 33 ++ .../docker-compose/docker-compose.yml | 12 +- scripts/dmaap-message-router/dmaap-mr-launch.sh | 180 +++++------ .../single-mr-suite/__init__.robot | 3 - tests/dmaap-buscontroller/ssl_suite/__init__.robot | 3 - tests/dmaap-buscontroller/ssl_suite/test1.robot | 77 ----- tests/dmaap-buscontroller/suite1/__init__.robot | 3 - tests/dmaap-buscontroller/suite1/test1.robot | 42 --- tests/dmaap-buscontroller/with_dr/__init__.robot | 2 + tests/dmaap-buscontroller/with_dr/orig | 116 ------- tests/dmaap-buscontroller/with_dr/test1.robot | 111 ++----- tests/dmaap-buscontroller/with_mr/__init__.robot | 3 + .../{single-mr-suite => with_mr}/test1.robot | 37 +-- tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot | 125 -------- tests/usecases-5G-bulkpm/5G-bulkpm/__init__.robot | 2 - .../assets/json_events/FileExistNotification.json | 33 -- .../5G-bulkpm/assets/metadata.schema.json | 74 ----- .../5G-bulkpm/resources/JsonValidatorLibrary.py | 40 --- .../5G-bulkpm/resources/bulkpm_keywords.robot | 39 --- .../5G-bulkpm/resources/xNFLibrary.py | 30 -- 67 files changed, 858 insertions(+), 1931 deletions(-) delete mode 100755 plans/dmaap-buscontroller/mock_downstream/setup.sh delete mode 100644 plans/dmaap-buscontroller/mock_downstream/teardown.sh delete mode 100644 plans/dmaap-buscontroller/mock_downstream/testplan.txt delete mode 100755 plans/dmaap-buscontroller/ssl/setup.sh delete mode 100644 plans/dmaap-buscontroller/ssl/teardown.sh delete mode 100644 plans/dmaap-buscontroller/ssl/testplan.txt delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/A20181002.0000-1000-0015-1000_5G.xml.gz delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs-initializer.json delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs_mockserver.properties delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/application.yaml delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/datafile_endpoints.json delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addDefaultSubscriber.json delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addPmMapperSubscriber.json delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/createFeed.json delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/cert.jks delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/jks.pass delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/trust.jks delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/trust.pass delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/composefile/docker-compose-e2e.yml delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/composefile/docker-compose-mr.yml delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/setup.sh delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/teardown.sh delete mode 100644 plans/usecases-5G-bulkpm/5G-bulkpm/testplan.txt create mode 100644 scripts/dmaap-buscontroller/docker-compose/buscontroller.env create mode 100644 scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.cred.props create mode 100644 scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.jks create mode 100644 scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.location.props create mode 100644 scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.props create mode 100644 scripts/dmaap-buscontroller/docker-compose/cadi_aaf/truststore.jks create mode 100644 scripts/dmaap-buscontroller/docker-compose/dmaapbc.properties create mode 100644 scripts/dmaap-buscontroller/docker-compose/docker-compose-bc.yml create mode 100644 scripts/dmaap-buscontroller/docker-compose/logback.xml delete mode 100644 scripts/dmaap-buscontroller/dr-launch.sh delete mode 100755 scripts/dmaap-buscontroller/init-mock-aaf.sh delete mode 100755 scripts/dmaap-buscontroller/init-mock-drps.sh delete mode 100755 scripts/dmaap-buscontroller/init-mock-mrc.sh delete mode 100644 scripts/dmaap-buscontroller/onapCSIT.env delete mode 100755 scripts/dmaap-buscontroller/start-mock.sh create mode 100755 scripts/dmaap-datarouter/datarouter-teardown.sh delete mode 100644 tests/dmaap-buscontroller/single-mr-suite/__init__.robot delete mode 100644 tests/dmaap-buscontroller/ssl_suite/__init__.robot delete mode 100644 tests/dmaap-buscontroller/ssl_suite/test1.robot delete mode 100644 tests/dmaap-buscontroller/suite1/__init__.robot delete mode 100644 tests/dmaap-buscontroller/suite1/test1.robot create mode 100644 tests/dmaap-buscontroller/with_dr/__init__.robot delete mode 100755 tests/dmaap-buscontroller/with_dr/orig create mode 100644 tests/dmaap-buscontroller/with_mr/__init__.robot rename tests/dmaap-buscontroller/{single-mr-suite => with_mr}/test1.robot (74%) delete mode 100644 tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot delete mode 100644 tests/usecases-5G-bulkpm/5G-bulkpm/__init__.robot delete mode 100644 tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.json delete mode 100644 tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json delete mode 100644 tests/usecases-5G-bulkpm/5G-bulkpm/resources/JsonValidatorLibrary.py delete mode 100644 tests/usecases-5G-bulkpm/5G-bulkpm/resources/bulkpm_keywords.robot delete mode 100644 tests/usecases-5G-bulkpm/5G-bulkpm/resources/xNFLibrary.py diff --git a/plans/dmaap-buscontroller/mock_downstream/setup.sh b/plans/dmaap-buscontroller/mock_downstream/setup.sh deleted file mode 100755 index 9f5dbbc6..00000000 --- a/plans/dmaap-buscontroller/mock_downstream/setup.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# -# ============LICENSE_START======================================================= -# org.onap.dmaap -# ================================================================================ -# Copyright (C) 2018 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. -# ============LICENSE_END========================================================= -# -# - - -# Place the scripts in run order: -source ${WORKSPACE}/scripts/dmaap-buscontroller/start-mock.sh -start_mock "aaf" -AAF_IP=${IP} -start_mock "mrc" 3904 -MRC_IP=${IP} -start_mock "drps" -DRPS_IP=${IP} - -source ${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-launch.sh -dmaapbc_launch $AAF_IP $MRC_IP $DRPS_IP -DMAAPBC_IP=${IP} - - -echo "AAF_IP=$AAF_IP MRC_IP=$MRC_IP DRPS_IP=$DRPS_IP DMAAPBC_IP=$DMAAPBC_IP" - -# Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v AAF_IP:${AAF_IP} -v MRC_IP:${MRC_IP} -v DRPS_IP:${DRPS_IP} -v DMAAPBC_IP:${DMAAPBC_IP}" - -set -x -${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-init.sh ${DMAAPBC_IP} ${DRPS_IP} ${MRC_IP} -set +x diff --git a/plans/dmaap-buscontroller/mock_downstream/teardown.sh b/plans/dmaap-buscontroller/mock_downstream/teardown.sh deleted file mode 100644 index 1b041a42..00000000 --- a/plans/dmaap-buscontroller/mock_downstream/teardown.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# -# ============LICENSE_START======================================================= -# org.onap.dmaap -# ================================================================================ -# Copyright (C) 2018 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. -# ============LICENSE_END========================================================= -# -# -kill-instance.sh aaf-mock -kill-instance.sh drps-mock -kill-instance.sh mrc-mock -kill-instance.sh dmaapbc - diff --git a/plans/dmaap-buscontroller/mock_downstream/testplan.txt b/plans/dmaap-buscontroller/mock_downstream/testplan.txt deleted file mode 100644 index 484fb295..00000000 --- a/plans/dmaap-buscontroller/mock_downstream/testplan.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Test suites are relative paths under [integration/csit.git]/tests/. -# Place the suites in run order. -dmaap-buscontroller/suite1 - diff --git a/plans/dmaap-buscontroller/ssl/setup.sh b/plans/dmaap-buscontroller/ssl/setup.sh deleted file mode 100755 index 6ab50ed1..00000000 --- a/plans/dmaap-buscontroller/ssl/setup.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# -# ============LICENSE_START======================================================= -# org.onap.dmaap -# ================================================================================ -# Copyright (C) 2018 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. -# ============LICENSE_END========================================================= -# -# - - -# Place the scripts in run order: -source ${WORKSPACE}/scripts/dmaap-buscontroller/start-mock.sh -start_mock "aaf" -AAF_IP=${IP} -start_mock "mrc" 3905 -MRC_IP=${IP} -start_mock "drps" 8443 -DRPS_IP=${IP} - -source ${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-launch.sh -dmaapbc_launch $AAF_IP $MRC_IP $DRPS_IP -DMAAPBC_IP=${IP} - - -echo "AAF_IP=$AAF_IP MRC_IP=$MRC_IP DRPS_IP=$DRPS_IP DMAAPBC_IP=$DMAAPBC_IP" - -# Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v AAF_IP:${AAF_IP} -v MRC_IP:${MRC_IP} -v DRPS_IP:${DRPS_IP} -v DMAAPBC_IP:${DMAAPBC_IP}" - -set -x -${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-init.sh ${DMAAPBC_IP} ${DRPS_IP} ${MRC_IP} https -set +x diff --git a/plans/dmaap-buscontroller/ssl/teardown.sh b/plans/dmaap-buscontroller/ssl/teardown.sh deleted file mode 100644 index 1b041a42..00000000 --- a/plans/dmaap-buscontroller/ssl/teardown.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# -# ============LICENSE_START======================================================= -# org.onap.dmaap -# ================================================================================ -# Copyright (C) 2018 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. -# ============LICENSE_END========================================================= -# -# -kill-instance.sh aaf-mock -kill-instance.sh drps-mock -kill-instance.sh mrc-mock -kill-instance.sh dmaapbc - diff --git a/plans/dmaap-buscontroller/ssl/testplan.txt b/plans/dmaap-buscontroller/ssl/testplan.txt deleted file mode 100644 index 54ce4df1..00000000 --- a/plans/dmaap-buscontroller/ssl/testplan.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Test suites are relative paths under [integration/csit.git]/tests/. -# Place the suites in run order. -dmaap-buscontroller/ssl_suite - diff --git a/plans/dmaap-buscontroller/with_dr/setup.sh b/plans/dmaap-buscontroller/with_dr/setup.sh index d9d8574f..822f6a7e 100755 --- a/plans/dmaap-buscontroller/with_dr/setup.sh +++ b/plans/dmaap-buscontroller/with_dr/setup.sh @@ -19,39 +19,27 @@ # ============LICENSE_END========================================================= # # - source ${SCRIPTS}/common_functions.sh +COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose} +export COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX +echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME" +echo "COMPOSE_PREFIX=$COMPOSE_PREFIX" -if [ "$USE_EXISTING_DMAAP" = "Y" ] -then - ROBOT_VARIABLES="-v AAF_IP:0.0.0 -v MRC_IP:0.0.0.0 -v DRPS_IP:172.17.0.3 -v DMAAPBC_IP:172.17.0.4" -else - - # Place the scripts in run order: - source ${WORKSPACE}/scripts/dmaap-buscontroller/dr-launch.sh - dmaap_dr_launch - DRPS_IP=${IP} - - #source ${WORKSPACE}/scripts/dmaap-buscontroller/start-mock.sh - #start_mock "aaf" - #AAF_IP=${IP} - AAF_IP=0.0.0.0 - #start_mock "drps" - #DRPS_IP=${IP} - MRC_IP=0.0.0.0 - - source ${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-launch.sh - dmaapbc_launch $AAF_IP $MRC_IP $DRPS_IP - DMAAPBC_IP=${IP} +source ${WORKSPACE}/scripts/dmaap-datarouter/datarouter-launch.sh +# Launch DR. If true is passed, 2 subscriber containers are also deployed, else false. +dmaap_dr_launch false +DRPS_IP=${DR_PROV_IP} +source ${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-launch.sh +dmaapbc_launch ${DRPS_IP} +DMAAPBC_IP=${DMAAP_BC_IP} - echo "AAF_IP=$AAF_IP MRC_IP=$MRC_IP DRPS_IP=$DRPS_IP DMAAPBC_IP=$DMAAPBC_IP" +echo "DRPS_IP=$DRPS_IP DMAAPBC_IP=$DMAAPBC_IP" - # Pass any variables required by Robot test suites in ROBOT_VARIABLES - ROBOT_VARIABLES="-v AAF_IP:${AAF_IP} -v MRC_IP:${MRC_IP} -v DRPS_IP:${DRPS_IP} -v DMAAPBC_IP:${DMAAPBC_IP}" - set -x - ${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-init.sh ${DMAAPBC_IP} ${DRPS_IP} ${MRC_IP} https - set +x -fi +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v DRPS_IP:${DRPS_IP} -v DMAAPBC_IP:${DMAAPBC_IP}" +set -x +${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-init.sh ${DMAAPBC_IP} +set +x diff --git a/plans/dmaap-buscontroller/with_dr/teardown.sh b/plans/dmaap-buscontroller/with_dr/teardown.sh index c7a2d6d8..5e801423 100755 --- a/plans/dmaap-buscontroller/with_dr/teardown.sh +++ b/plans/dmaap-buscontroller/with_dr/teardown.sh @@ -18,9 +18,17 @@ # limitations under the License. # ============LICENSE_END========================================================= -if [ "$KEEP_DMAAP" != "Y" ] -then -kill-instance.sh dmaapbc -cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources -docker-compose down -v -fi +#kill-instance.sh dmaapbc +cd ${WORKSPACE}/archives/dmaap/dr +rm -rf last_run_logs/* +docker cp datarouter-prov:/opt/app/datartr/logs last_run_logs/prov_logs +docker cp datarouter-node:/opt/app/datartr/logs last_run_logs/node_event_logs +docker cp datarouter-node:/var/log/onap/datarouter last_run_logs/node_server_logs +docker cp subscriber-node:/var/log/onap/datarouter last_run_logs/sub1_logs +docker cp subscriber-node2:/var/log/onap/datarouter last_run_logs/sub2_logs +docker cp dmaap-bc:/opt/app/dmaapbc/logs/ONAP last_run_logs/bc_logs + +sudo sed -i".bak" '/dmaap-dr-prov/d' /etc/hosts +sudo sed -i".bak" '/dmaap-dr-node/d' /etc/hosts +docker-compose -f ${WORKSPACE}/scripts/dmaap-datarouter/docker-compose/docker-compose.yml rm -sf +docker-compose -f ${WORKSPACE}/scripts/dmaap-buscontroller/docker-compose/docker-compose-bc.yml rm -sf diff --git a/plans/dmaap-buscontroller/with_mr/setup.sh b/plans/dmaap-buscontroller/with_mr/setup.sh index 01636867..74bfb0c5 100755 --- a/plans/dmaap-buscontroller/with_mr/setup.sh +++ b/plans/dmaap-buscontroller/with_mr/setup.sh @@ -19,36 +19,21 @@ # ============LICENSE_END========================================================= # # +# Place the scripts in run order: +source ${WORKSPACE}/scripts/dmaap-message-router/dmaap-mr-launch.sh +dmaap_mr_launch +MRC_IP=${IP} -if [ "$USE_EXISTING_DMAAP" = "Y" ] -then - ROBOT_VARIABLES="-v AAF_IP:0.0.0 -v MRC_IP:172.18.0.3 -v DRPS_IP:0.0.0.0 -v DMAAPBC_IP:172.17.0.4" -else +mkdir -p ${WORKSPACE}/archives/dmaapmr/last_run_logs - # Place the scripts in run order: - source ${WORKSPACE}/scripts/dmaap-message-router/dmaap-mr-launch.sh - dmaap_mr_launch - MRC_IP=${IP} +source ${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-launch.sh +dmaapbc_launch $MRC_IP +DMAAP_BC_IP=${DMAAP_BC_IP} - source ${WORKSPACE}/scripts/dmaap-buscontroller/start-mock.sh - start_mock "aaf" - AAF_IP=${IP} - #AAF_IP=0.0.0.0 - #start_mock "drps" - #DRPS_IP=${IP} - DRPS_IP=0.0.0.0 - - source ${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-launch.sh - dmaapbc_launch $AAF_IP $MRC_IP $DRPS_IP - DMAAPBC_IP=${IP} - - - echo "AAF_IP=$AAF_IP MRC_IP=$MRC_IP DRPS_IP=$DRPS_IP DMAAPBC_IP=$DMAAPBC_IP" - - # Pass any variables required by Robot test suites in ROBOT_VARIABLES - ROBOT_VARIABLES="-v AAF_IP:${AAF_IP} -v MRC_IP:${MRC_IP} -v DRPS_IP:${DRPS_IP} -v DMAAPBC_IP:${DMAAPBC_IP}" - set -x - ${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-init.sh ${DMAAPBC_IP} ${DRPS_IP} ${MRC_IP} - set +x -fi +echo "DMAAP_BC_IP=$DMAAP_BC_IP" +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES=" -v DMAAP_BC_IP:${DMAAP_BC_IP}" +set -x +${WORKSPACE}/scripts/dmaap-buscontroller/dmaapbc-init.sh ${DMAAP_BC_IP} +set +x diff --git a/plans/dmaap-buscontroller/with_mr/teardown.sh b/plans/dmaap-buscontroller/with_mr/teardown.sh index ae064814..5149743a 100644 --- a/plans/dmaap-buscontroller/with_mr/teardown.sh +++ b/plans/dmaap-buscontroller/with_mr/teardown.sh @@ -19,12 +19,12 @@ # ============LICENSE_END========================================================= # # +cd ${WORKSPACE}/archives/dmaapmr source ${WORKSPACE}/scripts/dmaap-message-router/dmaap-mr-teardown.sh - -if [ "$KEEP_DMAAP" != "Y" ] -then dmaap_mr_teardown -kill-instance.sh dmaapbc -kill-instance.sh aaf-mock -fi +rm -rf last_run_logs/* +docker cp dmaap-bc:/opt/app/dmaapbc/logs/ONAP last_run_logs/bc_logs +docker-compose -f ${WORKSPACE}/scripts/dmaap-buscontroller/docker-compose/docker-compose-bc.yml rm -sf + + diff --git a/plans/dmaap-buscontroller/with_mr/testplan.txt b/plans/dmaap-buscontroller/with_mr/testplan.txt index 0728bd44..a8fe876a 100644 --- a/plans/dmaap-buscontroller/with_mr/testplan.txt +++ b/plans/dmaap-buscontroller/with_mr/testplan.txt @@ -1,3 +1,3 @@ # Test suites are relative paths under [integration/csit.git]/tests/. # Place the suites in run order. -dmaap-buscontroller/single-mr-suite +dmaap-buscontroller/with_mr diff --git a/plans/dmaap-datarouter/ssl-dr-suite/teardown.sh b/plans/dmaap-datarouter/ssl-dr-suite/teardown.sh index 7ffd1fe2..536863bc 100755 --- a/plans/dmaap-datarouter/ssl-dr-suite/teardown.sh +++ b/plans/dmaap-datarouter/ssl-dr-suite/teardown.sh @@ -17,16 +17,5 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END===================================================== -cd ${WORKSPACE}/archives/dmaap/dr -rm -rf last_run_logs/* -docker cp datarouter-prov:/opt/app/datartr/logs last_run_logs/prov_logs -docker cp datarouter-node:/opt/app/datartr/logs last_run_logs/node_event_logs -docker cp datarouter-node:/var/log/onap/datarouter last_run_logs/node_server_logs -docker cp subscriber-node:/var/log/onap/datarouter last_run_logs/sub1_logs -docker cp subscriber-node2:/var/log/onap/datarouter last_run_logs/sub2_logs -cd ${WORKSPACE}/scripts/dmaap-datarouter/docker-compose -sudo sed -i".bak" '/dmaap-dr-prov/d' /etc/hosts -sudo sed -i".bak" '/dmaap-dr-node/d' /etc/hosts -docker-compose rm -sf -cd ${WORKSPACE}/scripts/dmaap-datarouter/robot_ssl -python -c 'import update_ca; update_ca.remove_onap_ca_cert()' +source ${WORKSPACE}/scripts/dmaap-datarouter/datarouter-teardown.sh +teardown_dmaap_dr \ No newline at end of file diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/A20181002.0000-1000-0015-1000_5G.xml.gz b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/A20181002.0000-1000-0015-1000_5G.xml.gz deleted file mode 100644 index 32865fc16376cad6e412630f42c7067228fd7963..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 959 zcmV;w13>&AiwFqAxvg9T06{V^F*q?WFfuMMFfcGJF)%PNEif=KH7zkPFfd;=M=p46 zYyiDiZFAB<5dLg`MJ9eUkav=F2#%s?X9{)-I(~DGWC_u{P3}^tzuwIy7$7OF7G)@N zw|o2Cvv1jS_<9>h!X4x^OcPgB`-&();-!9=1g`jbG3nXj>(K>2)}!n`0=foZ0=v(^ z6&Y-qyrq#StaDho;uHvdM;IBWQ3M`C$UbU0K#ZzNJP9KZ5H6vvxMnQ7l;zE4)7OJ6 z>!*1juUID23_L26+*^ltAnV#U3V8?=SA9b_Up8Rk1xLEv((nLnqjM}xQB?Ws^m^{C zAtt>rp^PLRh!=SNl5*j7>XDM^8OR9FMi56AFNP}&&_^IX{fx zZvse|tCp8nx6ct4Z;voE(L20z&tRMu3Cj^ln!-3u$_j9&@5j9l%b=%9Q<9JX{Pz*W zCFJd_R$x(8q6M!Tl#4RIZ7+CB2*P9$mabshl%AsZ6m_8*mx_YlSBi$e+-fK{5h}NF zU3C@U0fV!;P+-=s$r2*&fUrQ9Fq(HEvfuOODp{qt!QJjYW6xBu;ex#;T23*LHfjA zLwU#Pc@*tqingP)DLRVUridkVOp$wdZi>z^MZ+8%Q{(|_Qyf@!XA~PDEy_nD8?n5A zpxi;wy^g(>PGGVcH=&i(`~6X#eZn_NP}umvU|8y z^(Wb%XjN-aDK(Z}KlLnGyNe=#+lCDeIDJva8 zl?U{71e|XD?_yq&h&I)HcyO<*8%0yxk4_Q&|JLoJQ^fqUF*5kOIb!|gAhG}5B(b|D ziP1Gl^sZ;1b?(P>$0V`4CW+ZKNm|2>dw6b&9h1c9nj}uwB+$z?X00141&)Wb1 diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs-initializer.json b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs-initializer.json deleted file mode 100644 index 25816a50..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs-initializer.json +++ /dev/null @@ -1,95 +0,0 @@ -[{ - "httpRequest":{ - "method":"GET", - "path":"/service_component/pmmapper", - "headers":{ - "!X-ONAP-RequestID":[ - "!12345" - ], - "!X-ONAP-InvocationID":[ - "!12345" - ], - "X-ONAP-PartnerName":[ - "pm-mapper" - ], - "User-Agent":[ - "Java/11.0.7" - ], - "Host":[ - "!some-random-host:10000" - ], - "Accept":[ - "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" - ], - "Connection":[ - "keep-alive" - ], - "content-length":[ - "0" - ] - }, - "keepAlive":true, - "secure":false - }, - "httpResponse":{ - "statusCode":200, - "headers":{ - "content-type":[ - "application/json" - ] - }, - "body":{ - "type":"JSON", - "json":{ - "pm-mapper-filter":"{\"filters\": []}", - "key_store_path":"/opt/app/pm-mapper/etc/cert.jks", - "key_store_pass_path":"/opt/app/pm-mapper/etc/jks.pass", - "trust_store_path":"/opt/app/pm-mapper/etc/trust.jks", - "trust_store_pass_path":"/opt/app/pm-mapper/etc/trust.pass", - "dmaap_dr_delete_endpoint":"https://dmaap-dr-node:8443/delete", - "dmaap_dr_feed_name":"1", - "aaf_identity":"aaf_admin@people.osaaf.org", - "aaf_password":"demo123456!", - "enable_http":true, - "streams_publishes":{ - "dmaap_publisher":{ - "type":"message_router", - "dmaap_info":{ - "topic_url":"http://dmaap-message-router:3904/events/org.onap.dmaap.mr.VES_PM", - "client_role":"org.onap.dcae.pmPublisher", - "location":"csit-pmmapper", - "client_id":"1562763644939" - } - } - }, - "streams_subscribes":{ - "dmaap_subscriber":{ - "type":"data_router", - "dmaap_info":{ - "username":"username", - "password":"password", - "location":"csit-pmmapper", - "delivery_url":"http://dcae-pm-mapper:8081/delivery", - "subscriber_id":1 - } - } - } - } - } - } -}, - { - "httpRequest": { - "path": "/health" - }, - "httpResponse": { - "statusCode": 200, - "headers": { - "content-type": [ - "application/json" - ] - }, - "body": "{}" - } - } -] diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs_mockserver.properties b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs_mockserver.properties deleted file mode 100644 index 8c29348a..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/cbs_sim/cbs_mockserver.properties +++ /dev/null @@ -1,26 +0,0 @@ -####################################### -# MockServer & Proxy Example Settings # -####################################### - -# Socket & Port Settings - -# socket timeout in milliseconds (default 120000) -mockserver.maxSocketTimeout=120000 - -# Certificate Generation - -# delete KeyStore file on JVM shutdown (default true) -mockserver.deleteGeneratedKeyStoreOnExit=true -# certificate domain name (default "localhost") -mockserver.sslCertificateDomainName=localhost -# comma separated list of domain names for Subject Alternative Name domain names (default empty list) -mockserver.sslSubjectAlternativeNameDomains=cbs-sim,config-binding-service,config-binding-service.onap -# comma separated list of ip addresses for Subject Alternative Name ips (default empty list) -mockserver.sslSubjectAlternativeNameIps=127.0.0.1 - -# CORS - -# enable CORS for MockServer REST API -mockserver.enableCORSForAPI=true -# enable CORS for all responses -mockserver.enableCORSForAllResponses=true diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/application.yaml b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/application.yaml deleted file mode 100644 index 086babc4..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/application.yaml +++ /dev/null @@ -1,26 +0,0 @@ -spring: - profiles: - active: prod -management: - endpoints: - web: - exposure: - include: "loggers,logfile,health,info,metrics" -server: - port: 8433 - ssl: - key-store-type: PKCS12 - key-store-password: ericssondfc - key-store: classpath:keystore.jks - key-password: ericssondfc - keyAlias: tomcat-localhost -logging: - level: - ROOT: ERROR - org.springframework: ERROR - org.springframework.data: ERROR - org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR - org.onap.dcaegen2.collectors.datafile: TRACE - file: /var/log/ONAP/application.log -app: - filepath: /opt/app/datafile/config/datafile_endpoints.json diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/datafile_endpoints.json b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/datafile_endpoints.json deleted file mode 100644 index c845b2db..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dfc/datafile_endpoints.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "config": { - "//description": "This file is only used for testing purposes", - "dmaap.certificateConfig.keyCert": "/opt/app/datafile/etc/cert/cert.jks", - "dmaap.certificateConfig.keyPasswordPath": "/opt/app/datafile/etc/cert/jks.pass", - "dmaap.certificateConfig.trustedCa": "/opt/app/datafile/etc/cert/trust.jks", - "dmaap.certificateConfig.trustedCaPasswordPath": "/opt/app/datafile/etc/cert/trust.pass", - "dmaap.security.trustStorePath": "/opt/app/datafile/etc/cert/trust.jks", - "dmaap.security.trustStorePasswordPath": "/opt/app/datafile/etc/cert/trust.pass", - "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks", - "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass", - "dmaap.security.enableDmaapCertAuth": "false", - "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12", - "dmaap.dmaapConsumerConfiguration.consumerId": "C12", - "dmaap.dmaapConsumerConfiguration.timeoutMs": -1, - "sftp.security.strictHostKeyChecking": "true", - "streams_publishes": { - "PM_MEAS_FILES": { - "type": "data_router", - "dmaap_info": { - "username": "dradmin", - "location": "san-francisco", - "log_url": "https://dmaap-dr-prov:8443/feedlog/1", - "publisher_id": "972.360gm", - "password": "dradmin", - "publish_url": "https://dmaap-dr-prov:8443/publish/1" - } - } - }, - "streams_subscribes": { - "dmaap_subscriber": { - "dmaap_info": { - "topic_url":"http://dmaap-message-router:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT" - }, - "type": "message_router" - } - } - } -} diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addDefaultSubscriber.json b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addDefaultSubscriber.json deleted file mode 100644 index 6a8da842..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addDefaultSubscriber.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "delivery":{ - "url":"http://datarouter-subscriber:7070", - "user":"LOGIN", - "password":"PASSWORD", - "use100":true - }, - "follow_redirect":false, - "metadataOnly":false, - "suspend":false, - "groupid":0, - "links":{ - "self": "https://dmaap-dr-prov/subscribe/1", - "log": "https://dmaap-dr-prov/feedlog/1", - "feed": "https://dmaap-dr-prov/feed/1" - }, - "subscriber":"admin", - "decompress":true - } \ No newline at end of file diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addPmMapperSubscriber.json b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addPmMapperSubscriber.json deleted file mode 100644 index 0666a7d5..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addPmMapperSubscriber.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "delivery":{ - "url":"http://dcae-pm-mapper:8081/delivery", - "user":"username", - "password":"password", - "use100":true - }, - "follow_redirect":false, - "metadataOnly":false, - "suspend":false, - "groupid":0, - "links":{ - "self": "https://dmaap-dr-prov/subscribe/1", - "log": "https://dmaap-dr-prov/feedlog/1", - "feed": "https://dmaap-dr-prov/feed/1" - }, - "subscriber":"pmmapper", - "decompress":true, - "privilegedSubscriber": true - } \ No newline at end of file diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/createFeed.json b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/createFeed.json deleted file mode 100644 index fdcc7eef..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/createFeed.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "DefaultFeed", - "version": "m1.0", - "description": "Default feed", - "business_description": "Default Feed", - "suspend": false, - "deleted": false, - "changeowner": true, - "authorization": { - "classification": "unclassified", - "endpoint_addrs": [], - "endpoint_ids": [ - { - "password": "dradmin", - "id": "dradmin" - }] - } - } \ No newline at end of file diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/cert.jks b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/cert.jks deleted file mode 100644 index 33dc9a31aa5574aa13620ca9b45b2fd583fef227..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4654 zcmb_ec{tQ-8=lp^WE)FF%5L;SvKEp(vZO>g#u(EujAgPbro}F_h@!}nvgQztLW?!a z#Ia|~lD&}i#5efPxj0SVcYW9O{qdW5@B4Y)`+2wPd7ky@^=S|Y1fhQ5t&h_YjlyVc z{>TyBQ0{UBPb}4h3yvF)27%xZfCO6y*yxyK=)f?rG=u{ThJ#=v*aYwfgze}Qb|PGV z!MB*3@M<61v1T)^u}>7L1Av2HyYND{*<*N0>Uz@-vWN*c@*%ENk~DzDQEOM z;KRW<(5hwS#)@9$81wJsw^kYZ_!sRxEq?4J#t>Q_#xIlv_P)^<5-UFNhLazj(#8~< zGQi=E*S?r4Vfh~3bx=lk%-GVtBC?#D@F(xLl$#oMkKy;a1ggD4MavqyZXhUWUwma% zP4^3uk7%ZUIi2}3GEl3&2T`HuDp{}Io030o`MuP#W+liQI3x5qX!4cwIH%v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Xc%`c1A})f(@9v_b=4(eop`Z diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/jks.pass b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/jks.pass deleted file mode 100644 index ae8f7e72..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/jks.pass +++ /dev/null @@ -1 +0,0 @@ -Er1tmip;T4w[%1}YE?x{fN9v \ No newline at end of file diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/trust.jks b/plans/usecases-5G-bulkpm/5G-bulkpm/assets/pm_mapper_certs/trust.jks deleted file mode 100644 index 679c95a5c2c82666c1b78ff3786b5b12fe809d7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1413 zcmb7DYdF&j9NtyOZA)s_5Tc#skpHaJ6m3@IxP&wlidC2rsU!CXJGKzHNp-a=}&;N(<@> zIg83Y2{`{XBkqF8o-1r>Vg{>?x!MoJ8Msfz5P#NrPJOPxDh=tH{PuRgR=qJyaeF#M z>^10niFzK_-;mRKt8>ODRc1)d_sKGHlP3RhXzXfUU*~E?0NKbXF=HccJ@r0Z) zMdVRtLP&}Cdgg2@ti?|^d9*YuKazOdYpJVGMXM5bUMNC!wK*rxr@7OVpetRu2yc)Q*-9)89BkeeH*cq#5DLo24>V z-WQCMI6y%<4$0Y>H1=t*XRs%S$d8^>r+-1@O9@rc%J&g;1BPlxm0@K~&`6!_0Lc^9 zit0@!hoBfLm8!q-vnXi)7>m(GEZr@*V7w@$wcgrY1CV5vtRChY_So5PTR-O~35{UV zWCD}tQ&~2&!oFyW3$^i&O7({?83AHX!HeF+zqXXk$fbhg&|Ff@RQ{ci(u%b*ShZ@}OHbQ1u?mVn$6V4DTu{20T{ zR&2%)3?l1vGpoZ29csuJKZd!`_;h#Iw##zs8sbDkpgzGwvYI;t%?(w!x~`@~Mr3Ff z#l_fld5JSH^rS1f{7g3WfJb)Q!nz!**Q^`JY+WGdJ6(G*WV&+wV|7RId>_|N?3?rH zF_4xQ-oJ}<)Ixye&&LV83xnQ6q;H6_%|?UWG-@T}5-SyT(IS5&3;%DMh46M%nLE){-aKos`qXVW2wbt&J3UISZ{Pn_VplZcmVLUIJ9lavr2VLP>85wX44TQ(8XP`CU*uAP z^FE)6mQG!NQtsesAWhucd~XeTzl%3Du9ZD!`crxxHQ> /home/datafile/.ssh/known_hosts" - -# Add gateway IP to DR Prov -docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP" -docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP" - -#Increase DFC Logging -#docker exec dfc /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: WARN/org.onap.dcaegen2.collectors.datafile: TRACE/g' /opt/app/datafile/config/application.yaml" - -# Copy sample PM file to sftp server -docker cp $WORKSPACE/plans/usecases-5G-bulkpm/5G-bulkpm/assets/A20181002.0000-1000-0015-1000_5G.xml.gz sftp:/home/admin/ - -# Data Router Configuration: -# Create default feed on DMaaP data router -curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:dradmin" \ ---data-ascii @$WORKSPACE/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/createFeed.json --post301 \ ---location-trusted -k https://${DR_PROV_IP}:8443 -sleep 2 -# Create file consumer subscriber on DMaaP data router -curl -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:dradmin" \ ---data-ascii @$WORKSPACE/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addDefaultSubscriber.json --post301 \ ---location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1 -sleep 2 -# Add PM Mapper subscriber on data router feed -curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" \ ---data-ascii @$WORKSPACE/plans/usecases-5G-bulkpm/5G-bulkpm/assets/dmaap_dr/addPmMapperSubscriber.json \ ---post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1 - -# Check DMaaP DR provisioning -curl -k https://${DR_PROV_IP}:8443/internal/prov - -# Add necessary python libs -pip install jsonschema uuid simplejson - -# Export necessary vars -export VESC_IP=${VESC_IP} -export VESC_PORT=8080 -export DMAAP_MR_IP=${DMAAP_MR_IP} - -#Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT}" diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/teardown.sh b/plans/usecases-5G-bulkpm/5G-bulkpm/teardown.sh deleted file mode 100644 index 04391bbf..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/teardown.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -echo "Starting teardown script" -kill-instance.sh dmaap-message-router-server -kill-instance.sh dmaap-message-router-kafka -kill-instance.sh dmaap-message-router-zookeeper -kill-instance.sh dmaap-datarouter-node -kill-instance.sh dmaap-datarouter-prov -kill-instance.sh dmaap-dr-prov-mariadb -kill-instance.sh fileconsumer-node -kill-instance.sh dcaegen2-vescollector -kill-instance.sh dcaegen2-datafile-collector -kill-instance.sh dcaegen2-pm-mapper -kill-instance.sh sftp -kill-instance.sh config-binding-service-sim -yes | docker network prune diff --git a/plans/usecases-5G-bulkpm/5G-bulkpm/testplan.txt b/plans/usecases-5G-bulkpm/5G-bulkpm/testplan.txt deleted file mode 100644 index b72ba90d..00000000 --- a/plans/usecases-5G-bulkpm/5G-bulkpm/testplan.txt +++ /dev/null @@ -1,3 +0,0 @@ -# Test suites are relative paths under [integration/csit.git]/tests/. -# Place the suites in run order. -usecases-5G-bulkpm/5G-bulkpm diff --git a/scripts/dmaap-buscontroller/dmaapbc-init.sh b/scripts/dmaap-buscontroller/dmaapbc-init.sh index 804603f2..5e9cbb1e 100755 --- a/scripts/dmaap-buscontroller/dmaapbc-init.sh +++ b/scripts/dmaap-buscontroller/dmaapbc-init.sh @@ -1,56 +1,38 @@ #!/bin/bash # $1 is the IP address of the buscontroller -# $2 is the IP address of the DRPS -# $3 is the IP address of the MRC -# $4 is the protocol (defaults to http) - -PROTO=${4:-http} -if [ "$PROTO" = "http" ] -then - PORT=8080 - CURLOPT="-v" - MRPORT=3904 - DRPORT=8080 -else - PORT=8443 - CURLOPT="-v -k" - MRPORT=3905 - DRPORT=8443 -fi # INITIALIZE: dmaap object JSON=/tmp/$$.dmaap cat << EOF > $JSON { - "version": "1", - "topicNsRoot": "org.onap.dmaap", - "drProvUrl": "${PROTO}://dmaap-dr-prov:${DRPORT}", - "dmaapName": "onapCSIT", - "bridgeAdminTopic": "MM_AGENT_PROV" + "version": "1", + "topicNsRoot": "org.onap.dmaap", + "drProvUrl": "https://dmaap-dr-prov:8443", + "dmaapName": "onapCSIT", + "bridgeAdminTopic": "MM_AGENT_PROV" } EOF echo "Initializing /dmaap endpoint" -curl ${CURLOPT} -X POST -d @${JSON} -H "Content-Type: application/json" ${PROTO}://$1:${PORT}/webapi/dmaap - +curl -v -k -X POST -d @${JSON} -H "Content-Type: application/json" https://$1:8443/webapi/dmaap # INITIALIZE: dcaeLocation object JSON=/tmp/$$.loc cat << EOF > $JSON { - "dcaeLocationName": "csit-sanfrancisco", - "dcaeLayer": "central-cloud", - "clli": "CSIT12345", - "zone": "zoneA" + "dcaeLocationName": "csit-sanfrancisco", + "dcaeLayer": "central-cloud", + "clli": "CSIT12345", + "zone": "zoneA" } EOF echo "Initializing /dcaeLocations endpoint" -curl ${CURLOPT} -X POST -d @${JSON} -H "Content-Type: application/json" ${PROTO}://$1:${PORT}/webapi/dcaeLocations +curl -v -k -X POST -d @${JSON} -H "Content-Type: application/json" https://$1:8443/webapi/dcaeLocations # INITIALIZE: MR object in 1 site @@ -64,13 +46,13 @@ DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+' | head -1 ) JSON=/tmp/$$.mrc cat << EOF > $JSON { - "dcaeLocationName": "csit-sanfrancisco", - "fqdn": "$DOCKER_HOST", - "topicProtocol" : "http", - "topicPort": "${MRPORT}" + "dcaeLocationName": "csit-sanfrancisco", + "fqdn": "message-router", + "topicProtocol" : "http", + "topicPort": "3904" } EOF echo "Initializing /mr_clusters endpoint" -curl ${CURLOPT} -X POST -d @${JSON} -H "Content-Type: application/json" ${PROTO}://$1:${PORT}/webapi/mr_clusters +curl -v -k -X POST -d @${JSON} -H "Content-Type: application/json" https://$1:8443/webapi/mr_clusters diff --git a/scripts/dmaap-buscontroller/dmaapbc-launch.sh b/scripts/dmaap-buscontroller/dmaapbc-launch.sh index 0a653fa1..3e446d89 100755 --- a/scripts/dmaap-buscontroller/dmaapbc-launch.sh +++ b/scripts/dmaap-buscontroller/dmaapbc-launch.sh @@ -4,34 +4,23 @@ # sets global var IP with assigned IP address function dmaapbc_launch() { - TAG="nexus3.onap.org:10001/onap/dmaap/buscontroller" - CONTAINER_NAME=dmaapbc - IP="" + export dmaap_prov_ip=$1 + export dmaap_mr_ip=$1 + cd ${WORKSPACE}/scripts/dmaap-buscontroller/docker-compose + docker-compose -f docker-compose-bc.yml up -d - cd ${WORKSPACE}/scripts/dmaap-buscontroller + sleep 10 - TMP_CFG=/tmp/docker-databus-controller.conf - . ./onapCSIT.env > $TMP_CFG - ADDHOSTS="" - if [ ! -z "$2" ] - then - ADDHOSTS="$ADDHOSTS --add-host=message-router:$2" - fi - if [ ! -z "$3" ] - then - ADDHOSTS="$ADDHOSTS --add-host=dmaap-dr-prov:$3" - fi - docker run -d $ADDHOSTS --name $CONTAINER_NAME -v $TMP_CFG:/opt/app/config/conf $TAG - IP=`get-instance-ip.sh ${CONTAINER_NAME}` + DMAAP_BC_IP=`get-instance-ip.sh dmaap-bc` source ${SCRIPTS}/common_functions.sh - bypass_ip_adress ${IP} + bypass_ip_adress ${DMAAP_BC_IP} - # Wait for initialization - for i in {1..10}; do - curl -sS ${IP}:8080 && break - echo sleep $i - sleep $i - done + # Wait for initialization + for i in 1 2 3 4 5 6 7 8 9 10; do + curl -sS ${DMAAP_BC_IP}:8080 && break + echo sleep ${i} + sleep ${i} + done } diff --git a/scripts/dmaap-buscontroller/docker-compose/buscontroller.env b/scripts/dmaap-buscontroller/docker-compose/buscontroller.env new file mode 100644 index 00000000..cc3a3c7d --- /dev/null +++ b/scripts/dmaap-buscontroller/docker-compose/buscontroller.env @@ -0,0 +1,4 @@ +DMAAPBC_WAIT_TO_EXIT=Y +DMAAPBC_PG_ENABLED=false +DMAAPBC_CSIT=Yes +DMAAPBC_KSTOREFILE=/opt/app/osaaf/local/org.onap.dmaap-bc.jks \ No newline at end of file diff --git a/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.cred.props b/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.cred.props new file mode 100644 index 00000000..52536a14 --- /dev/null +++ b/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.cred.props @@ -0,0 +1,17 @@ +############################################################ +# Properties Generated by AT&T Certificate Manager +# by root +# on 2021-03-12T11:38:49.244+0000 +# @copyright 2019, AT&T +############################################################ +Challenge=secret +cadi_alias=dmaap-bc@dmaap-bc.onap.org +cadi_key_password=secret +#cadi_keyfile=/opt/app/osaaf/local/org.onap.dmaap-dr.keyfile +cadi_keystore=/opt/app/osaaf/local/org.onap.dmaap-bc.jks +cadi_keystore_password=secret +cadi_keystore_password_jks=secret +cadi_keystore_password_p12=secret +cadi_truststore=/opt/app/osaaf/local/truststore.jks +cadi_truststore_password=secret +cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_9, OU=OSAAF, O=ONAP, C=US diff --git a/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.jks b/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.jks new file mode 100644 index 0000000000000000000000000000000000000000..ca8301ca30dd01c6add9588c1a1b8a5acf86c34b GIT binary patch literal 4719 zcmZXUbx;%l*1%bI>F(|lsa?_~BqXJTML$2>grv{-zfu-v3|W;{wq0LqQMVP|z)y8x!|m`0sN%5cvfX*usQ}hV?AZ`?mTt zZEAtB2hf3N{jWfwpb>AR`_`AQ?G#Aq{cc4=n5*66%18@bQGXCL!zE9nS@~@9r687g z#l*mp!NyGr)oB}8Coaa7;G4bCgj;<%7o{QN{v&4|`nm;Iss@i-W&1o&3a(1axjEuv zFTn_)ABk1}wt66o=8k?8snX zWR-I21?_9D5x4%ls1L8l3_hz{ZfTZaafut$=+{IG58J%9tq?>C_DbCslk4Wd{dTl` z1z!(r*)voo-2d_gL&?1GLN%rd*32hO4?I-s8%r-k8Z{ymVb-U7=YSamNwcvw@?M8y>(GI zMjGf#w!~dUlUU&PPRJQstxhxq2a8we-Ab|4MX}XpthGQ#h!fj|43u6>5-!dl$VNGh z7MuE*Ck4!z456=o-;~7!@XbANY0@PMc9unMZ(NwP4J|7s8kBcIBO{B72@DZ5`3vq8 zu<)yK$+-Zv?=i+<)!cr|%$hZJIo!5yrke+R<>0WqC;fwuHj9UsGGrjjraeuG$%D9h z)INL~t=kB``~z-uWV3_QnxYFK(=O1tU8-=^tJfkZhHrOTH>*(j#EJm))gz|%EwKfU zg+6!kdYG@^)r)-7Op{vLyo)_AmXJJQPq4uoTB%Tb0dJcEB^8^+d1{pA4Sc{OF@0(q zKqZ{I-0x^D%@|GV#~pKw&RB(8EYz`eHR_Hd(#S_QK&d^aD8jL} z2L~iokA^f3AEQI|^c~Ed!s40tZCiF)tuJ>H!{uQR`9XG5b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*VP9>zGhLh~m09&_kQY!g}*sTe!U zK5fBq!+u!d*jk#a>}1Qhv^U|a@MqPD08Y)lU5r|ez5*m1WDZ_p))0(K`gb}j+0^fe zP^BV@6`dQp?Gkp@Aqw;-`Nx;go%^$}37LUuN*Mu{8s>MB=7 zqw9Q8S2rwxPqYkHtR|4$ta&2o+Kd<#b7xUcxn$)(VN__H&-^LTAaC#fTxng?v&XPK zaAtVRqbhu~>a&Br)g4ID>p7!&g-599+rO1U3r>Fh&VHKeLfnzoe0GFzv*-DJN?2EH zSj05mcf!pxCTg8+ED~`+g-wKEu~rNb{*AlO!->G|l>_v9x-7;v@0377;x4o$#GDnd zh?r7f9+v6^(+<{d6m3TNGpxszo#|?m(KNJtMh926)=YZB8>I$DiN^ZLJ!a*j_I+LT zTwx0iKD@06gP1)dUPHl+S6>HbM0WKL5Ih=0B||Tp8w7`g*2^=MSQo8YXsU4!Lu#EV z$0gEbVD@A`pB1=p9CTg8DH8I%XCVo-BS_>56YiU=)<7r9Qc{Z3qAN(bS8fE>L>y)i za!=y2LT_5DL-Y<}WPVZ`t#8bXXzx`?K$9>W*o={RC;qp1bPQgulfNz`EM?>`37)WB z4zTSj4M*wqQ|$iog99J>d5M^aAUks?oY?#Z-gU*)f=fl@Q=ybjpEt)@)g5%>9_Qfa zU=}bACI$~75SnxA}^cmDaK9$`6s?oAGNv Oz`LDlbRZxi|Nj8kMcA$Y literal 0 HcmV?d00001 diff --git a/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.location.props b/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.location.props new file mode 100644 index 00000000..a8374dc7 --- /dev/null +++ b/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.location.props @@ -0,0 +1,8 @@ +############################################################ +# Properties Generated by AT&T Certificate Manager +# by root +# on 2021-03-12T11:25:54.608+0000 +# @copyright 2019, AT&T +############################################################ +cadi_latitude=38.0 +cadi_longitude=-72.0 diff --git a/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.props b/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.props new file mode 100644 index 00000000..f3747fad --- /dev/null +++ b/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/org.onap.dmaap-bc.props @@ -0,0 +1,24 @@ +############################################################ +# Properties Generated by AT&T Certificate Manager +# by root +# on 2021-03-12T11:25:54.617+0000 +# @copyright 2019, AT&T +############################################################ +aaf_env=DEV +aaf_id=dmaap-bc@dmaap-bc.onap.org +aaf_locate_url=https://aaf-locate.onap:8095 +aaf_locator_app_ns=org.osaaf.aaf +aaf_locator_container=oom +aaf_locator_container_ns=onap +aaf_locator_fqdn=dmaap-bc +aaf_locator_public_fqdn=aaf.osaaf.org +aaf_oauth2_introspect_url=https://AAF_LOCATE_URL/%CNS.%AAF_NS.introspect:2.1/introspect +aaf_oauth2_token_url=https://AAF_LOCATE_URL/%CNS.%AAF_NS.token:2.1/token +aaf_url=https://AAF_LOCATE_URL/%CNS.%AAF_NS.service:2.1 +aaf_url_cm=https://AAF_LOCATE_URL/%CNS.%AAF_NS.cm:2.1 +aaf_url_fs=https://AAF_LOCATE_URL/%CNS.%AAF_NS.fs:2.1 +aaf_url_gui=https://AAF_LOCATE_URL/%CNS.%AAF_NS.gui:2.1 +aaf_url_hello=https://aaf-locate.onap:8095/locate/onap.org.osaaf.aaf.hello:2.1 +aaf_url_oauth=https://AAF_LOCATE_URL/%CNS.%AAF_NS.oauth:2.1 +cadi_prop_files=/opt/app/osaaf/local/org.onap.dmaap-bc.location.props:/opt/app/osaaf/local/org.onap.dmaap-bc.cred.props +cadi_protocols=TLSv1.1,TLSv1.2 diff --git a/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/truststore.jks b/scripts/dmaap-buscontroller/docker-compose/cadi_aaf/truststore.jks new file mode 100644 index 0000000000000000000000000000000000000000..91547c6062ddb5d9fdf4b3f6ce463b3b67707091 GIT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zxD}1Wj%>x4*v2KT5r>%o=P_R4%0JV1J;;O=|&2LRP7%#u57gn+)mfhV{t%8umXi!Ja$O`k>HIi-kqRI!$vKR$h*k_k7|M z*UrKh{hQXgt~p}LW^0X9KVwUBS>i@QiKl%s_(bji3MaY_%;(A&;T2AG(kBdw{!v44 z3wp=rxjHkHvJ}nvdk}#mO&cS9ESmggu^1db`dB~@1_g+t)*t<^VLIIt@+vs*k|{xm z(ClG+MxKY8)*5lVb z@Z$VuxT=#b9N5lXfGi`ut@$h%$Q3)SAY^S%Nh*G5)w6-rKurXpC;WBtpBS-y7wmar z!N;oAA7O@25nF>PuMf5_wXG0bDccqcVGZr$?}!J$%35L0JDJDEC?DL*fOm@Fc&DiU z4v^eXHgmf`IQA1y#!&m6S0PX`5spsBmLnLJ*Af?E()uqnc_^)oInjlP;<|r0=A0BMTo*F22{WoRvlAf=2)t`=-H8?K|;B;JXWf|)1!oi9q zX19-;+OR|ciG?E60{62(xZ&TDMV2_`W=`-&V!7E%WReLkrj$gC50&1IACR_x$M4Sn?tb~7%{O6nCF~594pDDYn78uZ zI2)i}8(q@WQQD()xizllOx%?=;~`` zIN7jZGjV%uyvia;lFDM)XXYxjE3CV0k=CZ9@nF|nOcy%?gMJa|+v4*#LuXBG2g;wJ zoD{%R{4hQ+AutIB1uG5%0vZJX1Qh& + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${defaultPattern} + + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + + 256 + + + + + + ${logDirectory}/${securityLogName}.log + + ${logDirectory}/${securityLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + + 256 + 0 + + + + + + ${logDirectory}/${performanceLogName}.log + + ${logDirectory}/${performanceLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + ${logDirectory}/${serverLogName}.log + + ${logDirectory}/${serverLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + + ${logDirectory}/${policyLogName}.log + + ${logDirectory}/${policyLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${defaultPattern} + + + + 256 + + + + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${auditLoggerPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${metricsLoggerPattern} + + + + + + 256 + + + + + ${logDirectory}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${errorLoggerPattern} + + + + + 256 + + + + + ${debugLogDirectory}/${debugLogName}.log + + ${debugLogDirectory}/${debugLogName}.%i.log.zip + + 1 + 9 + + + 5MB + + + ${debugLoggerPattern} + + + + + 256 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/dmaap-buscontroller/dr-launch.sh b/scripts/dmaap-buscontroller/dr-launch.sh deleted file mode 100644 index bba1b73d..00000000 --- a/scripts/dmaap-buscontroller/dr-launch.sh +++ /dev/null @@ -1,58 +0,0 @@ - -#!/bin/bash - -#!/bin/bash - -# script to launch DMaaP DR docker containers -# sets global var IP with assigned IP address of DR Prov - -function dmaap_dr_launch() { - IP="" - - - # This next section was copied from scripts/dmaap-datarouter/dr-suite/setup.sh - # and slightly modified... - - # Clone DMaaP Data Router repo - mkdir -p $WORKSPACE/archives/dmaapdr - cd $WORKSPACE/archives/dmaapdr - - git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master - cd datarouter - git pull - cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources - - # start DMaaP DR containers with docker compose and configuration from docker-compose.yml - docker login -u docker -p docker nexus3.onap.org:10001 - docker-compose up -d - - # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb - for i in {1..50}; do - if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' mariadb) ] - then - echo "DR Service Running" - break - else - echo sleep $i - sleep $i - fi - done - - DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov) - DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node) - DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' datarouter-prov) - - echo DR_PROV_IP=${DR_PROV_IP} - echo DR_NODE_IP=${DR_NODE_IP} - echo DR_GATEWAY_IP=${DR_GATEWAY_IP} - - docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP" - docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP" - - #Pass any variables required by Robot test suites in ROBOT_VARIABLES - ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP}" - - IP=${DR_GATEWAY_IP} -} diff --git a/scripts/dmaap-buscontroller/init-mock-aaf.sh b/scripts/dmaap-buscontroller/init-mock-aaf.sh deleted file mode 100755 index f25404ce..00000000 --- a/scripts/dmaap-buscontroller/init-mock-aaf.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -# $1 is the IP address of the AAF mock server - -#curl -v -X PUT -d @- http://$1:1080/expectation << EOF -#{ -# "httpRequest": { -# "method": "GET", -# "path": "/hello" -# }, -# "httpResponse": { -# "body": "Hello world!", -# "statusCode": 200 -# }, -# "times" : { -# "unlimited" : true -# } -#} -#EOF -# "httpRequest": { -# "method": "POST", -# "path": "/proxy/authz/.*" -# }, - -curl -v -X PUT -d @- http://$1:1080/expectation << EOF -{ - "httpRequest": { - "method": ".*", - "path": "/.*" - }, - "httpResponse": { - "body": "Hello world!", - "statusCode": 200 - }, - "times" : { - "unlimited" : true - } -} -EOF - -#curl -v -X PUT -d @- http://$1:1080/expectation << EOF -#{ -# "httpRequest": { -# "method": "POST", -# "path": "/proxy/authz/role/perm" -# }, -# "httpResponse": { -# "body": "Hello world!", -# "statusCode": 200 -# } -#} -#EOF - diff --git a/scripts/dmaap-buscontroller/init-mock-drps.sh b/scripts/dmaap-buscontroller/init-mock-drps.sh deleted file mode 100755 index e0f1d0f1..00000000 --- a/scripts/dmaap-buscontroller/init-mock-drps.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# $1 is the IP address of the DRPS (Data Router Provisioning Server) mock server - -curl -v -X PUT -d @- http://$1:1080/expectation << EOF -{ - "httpRequest": { - "method": "GET", - "path": "/hello" - }, - "httpResponse": { - "body": "Hello world!", - "statusCode": 200 - } -} -EOF - diff --git a/scripts/dmaap-buscontroller/init-mock-mrc.sh b/scripts/dmaap-buscontroller/init-mock-mrc.sh deleted file mode 100755 index 75c1a419..00000000 --- a/scripts/dmaap-buscontroller/init-mock-mrc.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# $1 is the IP address of the MRC (MR Central) mock server - -curl -v -X PUT -d @- http://$1:1080/expectation << EOF -{ - "httpRequest": { - "method": "GET", - "path": "/hello" - }, - "httpResponse": { - "body": "Hello world!", - "statusCode": 200 - } -} -EOF - diff --git a/scripts/dmaap-buscontroller/onapCSIT.env b/scripts/dmaap-buscontroller/onapCSIT.env deleted file mode 100644 index db865818..00000000 --- a/scripts/dmaap-buscontroller/onapCSIT.env +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# -# environment settings for Dmaap Bus Controller Integration Test. -# assumes args are: -# $1 - FQDN of AAF server -# $2 - FQDN of MR server -# $3 - FQDN of DRPS Server -# Only need to set values where defaults aren't appropriate -# -cat </zookeeper/' /var/tmp/MsgRtrApi.properties - sed -i -e 's/:/kafka:9092/' /var/tmp/MsgRtrApi.properties - - docker-compose build - docker login -u docker -p docker nexus3.onap.org:10001 - docker-compose up -d - docker ps - - # Wait for initialization of Docker containers - for i in {1..50}; do - if [ $(docker inspect --format '{{ .State.Running }}' ${COMPOSE_PREFIX}_dmaap_1) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' ${COMPOSE_PREFIX}_zookeeper_1) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' ${COMPOSE_PREFIX}_dmaap_1) ] - then - echo "DMaaP Service Running" - break - else - echo sleep $i - sleep $i - fi - done - DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_dmaap_1) - IP=${DMAAP_MR_IP} - KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_kafka_1) - ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_zookeeper_1) - - echo "After restart of ZK and Kafka..." - echo DMAAP_MR_IP=${DMAAP_MR_IP} - echo IP=${IP} - echo KAFKA_IP=${KAFKA_IP} - echo ZOOKEEPER_IP=${ZOOKEEPER_IP} + # + # the default prefix for docker containers is the directory name containing the docker-compose.yml file. + # It can be over-written by an env variable COMPOSE_PROJECT_NAME. This env var seems to be set in the Jenkins CSIT environment + COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose} + export COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX + echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME" + echo "COMPOSE_PREFIX=$COMPOSE_PREFIX" + + # Clone DMaaP Message Router repo + mkdir -p $WORKSPACE/archives/dmaapmr + cd $WORKSPACE/archives/dmaapmr + #unset http_proxy https_proxy + git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master + cd messageservice + git pull + cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose + cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/ + + + # start DMaaP MR containers with docker compose and configuration from docker-compose.yml + docker login -u docker -p docker nexus3.onap.org:10001 + docker-compose up -d + docker ps + + # Wait for initialization of Docker contaienr for DMaaP MR, Kafka and Zookeeper + for i in {1..50}; do + if [ $(docker inspect --format '{{ .State.Running }}' ${COMPOSE_PREFIX}_dmaap_1) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' ${COMPOSE_PREFIX}_zookeeper_1) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' ${COMPOSE_PREFIX}_dmaap_1) ] + then + echo "DMaaP Service Running" + break + else + echo sleep $i + sleep $i + fi + done + + + DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_dmaap_1) + IP=${DMAAP_MR_IP} + KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_kafka_1) + ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_zookeeper_1) + + echo DMAAP_MR_IP=${DMAAP_MR_IP} + echo IP=${IP} + echo KAFKA_IP=${KAFKA_IP} + echo ZOOKEEPER_IP=${ZOOKEEPER_IP} + + # Initial docker-compose up and down is for populating kafka and zookeeper IPs in /var/tmp/MsgRtrApi.properites + docker-compose down + + # Update kafkfa and zookeeper properties in MsgRtrApi.propeties which will be copied to DMaaP Container + sed -i -e 's//zookeeper/' /var/tmp/MsgRtrApi.properties + sed -i -e 's/:/kafka:9092/' /var/tmp/MsgRtrApi.properties + + docker-compose build + docker login -u docker -p docker nexus3.onap.org:10001 + docker-compose up -d + docker ps + + # Wait for initialization of Docker containers + for i in {1..50}; do + if [ $(docker inspect --format '{{ .State.Running }}' ${COMPOSE_PREFIX}_dmaap_1) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' ${COMPOSE_PREFIX}_zookeeper_1) ] && \ + [ $(docker inspect --format '{{ .State.Running }}' ${COMPOSE_PREFIX}_dmaap_1) ] + then + echo "DMaaP Service Running" + break + else + echo sleep $i + sleep $i + fi + done + DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_dmaap_1) + IP=${DMAAP_MR_IP} + KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_kafka_1) + ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_zookeeper_1) + + echo "After restart of ZK and Kafka..." + echo DMAAP_MR_IP=${DMAAP_MR_IP} + echo IP=${IP} + echo KAFKA_IP=${KAFKA_IP} + echo ZOOKEEPER_IP=${ZOOKEEPER_IP} source ${SCRIPTS}/common_functions.sh bypass_ip_adress ${DMAAP_MR_IP} bypass_ip_adress ${KAFKA_IP} bypass_ip_adress ${ZOOKEEPER_IP} - # Wait for initialization of docker services - for i in {1..50}; do - curl -sS -m 1 ${DMAAP_MR_IP}:3904/events/TestTopic && break - echo sleep $i - sleep $i - done + # Wait for initialization of docker services + for i in {1..50}; do + curl -sS -m 1 ${DMAAP_MR_IP}:3904/events/TestTopic && break + echo sleep $i + sleep $i + done } diff --git a/tests/dmaap-buscontroller/single-mr-suite/__init__.robot b/tests/dmaap-buscontroller/single-mr-suite/__init__.robot deleted file mode 100644 index 41c7a003..00000000 --- a/tests/dmaap-buscontroller/single-mr-suite/__init__.robot +++ /dev/null @@ -1,3 +0,0 @@ -*** Settings *** -Documentation dmaap-buscontroller - Suite 1 - diff --git a/tests/dmaap-buscontroller/ssl_suite/__init__.robot b/tests/dmaap-buscontroller/ssl_suite/__init__.robot deleted file mode 100644 index 41c7a003..00000000 --- a/tests/dmaap-buscontroller/ssl_suite/__init__.robot +++ /dev/null @@ -1,3 +0,0 @@ -*** Settings *** -Documentation dmaap-buscontroller - Suite 1 - diff --git a/tests/dmaap-buscontroller/ssl_suite/test1.robot b/tests/dmaap-buscontroller/ssl_suite/test1.robot deleted file mode 100644 index b5723377..00000000 --- a/tests/dmaap-buscontroller/ssl_suite/test1.robot +++ /dev/null @@ -1,77 +0,0 @@ -*** Settings *** -Library OperatingSystem -Library RequestsLibrary -Library HttpLibrary.HTTP -Library Collections -Library String - -*** Variables *** -${MESSAGE} Hello, world! -${DBC_URI} /webapi - -*** Test Cases *** -String Equality Test - Should Be Equal ${MESSAGE} Hello, world! - -Dir Test - [Documentation] Check if /tmp exists - Log ${MESSAGE} - CheckDir /tmp - -Url Test - [Documentation] Check if www.onap.org can be reached - Create Session openo http://www.onap.org disable_warnings=True - CheckUrl openo / 200 - -HTTPS Heartbeat Test - [Documentation] Check ${DBC_URI}/info SSL endpoint - Create Session heartbeat https://${DMAAPBC_IP}:8443 disable_warnings=True - CheckUrl heartbeat ${DBC_URI}/info 204 - -HTTPS Dmaap Init Test - [Documentation] Check ${DBC_URI}/dmaap SSL endpoint - Create Session heartbeat https://${DMAAPBC_IP}:8443 disable_warnings=True - CheckStatus heartbeat ${DBC_URI}/dmaap "VALID" - -HTTPS Dmaap dcaeLocations Test - [Documentation] Check ${DBC_URI}/dcaeLocations SSL endpoint - Create Session heartbeat https://${DMAAPBC_IP}:8443 disable_warnings=True - CheckStatus0 heartbeat ${DBC_URI}/dcaeLocations "VALID" - -HTTPS Dmaap mr_clusters Test - [Documentation] Check ${DBC_URI}/mr_clusters SSL endpoint - Create Session heartbeat https://${DMAAPBC_IP}:8443 disable_warnings=True - CheckStatus0 heartbeat ${DBC_URI}/mr_clusters "VALID" - - -*** Keywords *** -CheckDir - [Arguments] ${path} - Directory Should Exist ${path} - -CheckUrl - [Arguments] ${session} ${path} ${expect} - ${resp}= RequestsLibrary.Get On Session ${session} ${path} - Should Be Equal As Integers ${resp.status_code} ${expect} - -CheckStatus - [Arguments] ${session} ${path} ${expect} - ${resp}= RequestsLibrary.Get On Session ${session} ${path} - log ${resp.content} - ${val}= Get Json value ${resp.content} /status - log ${val} - should be equal as strings ${val} ${expect} - -CheckStatus0 - [Arguments] ${session} ${path} ${expect} - ${resp}= RequestsLibrary.Get On Session ${session} ${path} - log ${resp.json()} - log ${resp.content} -# silliness to strip off the brackets returned for a List to get a Dict - ${t1}= Remove String ${resp.content} [ - ${dict}= Remove String ${t1} ] - log ${dict} - ${val}= Get Json value ${dict} /status - log ${val} - should be equal as strings ${val} ${expect} - diff --git a/tests/dmaap-buscontroller/suite1/__init__.robot b/tests/dmaap-buscontroller/suite1/__init__.robot deleted file mode 100644 index 41c7a003..00000000 --- a/tests/dmaap-buscontroller/suite1/__init__.robot +++ /dev/null @@ -1,3 +0,0 @@ -*** Settings *** -Documentation dmaap-buscontroller - Suite 1 - diff --git a/tests/dmaap-buscontroller/suite1/test1.robot b/tests/dmaap-buscontroller/suite1/test1.robot deleted file mode 100644 index be4e8cc6..00000000 --- a/tests/dmaap-buscontroller/suite1/test1.robot +++ /dev/null @@ -1,42 +0,0 @@ -*** Settings *** -Library OperatingSystem -Library RequestsLibrary - -*** Variables *** -${MESSAGE} Hello, world! -${DBC_URI} /webapi - -*** Test Cases *** -String Equality Test - Should Be Equal ${MESSAGE} Hello, world! - -Dir Test - [Documentation] Check if /tmp exists - Log ${MESSAGE} - CheckDir /tmp - -Url Test - [Documentation] Check if www.onap.org can be reached - Create Session openo http://www.onap.org - CheckUrl openo / 200 - -Mock Hello Server Test - [Documentation] Check /hello endpoint - Create Session hello http://${AAF_IP}:1080 - CheckUrl hello /hello 200 - -Heartbeat Test - [Documentation] Check ${DBC_URI}/info endpoint - Create Session heartbeat http://${DMAAPBC_IP}:8080 - CheckUrl heartbeat ${DBC_URI}/info 204 - -*** Keywords *** -CheckDir - [Arguments] ${path} - Directory Should Exist ${path} - -CheckUrl - [Arguments] ${session} ${path} ${expect} - ${resp}= Get Request ${session} ${path} - Should Be Equal As Integers ${resp.status_code} ${expect} - diff --git a/tests/dmaap-buscontroller/with_dr/__init__.robot b/tests/dmaap-buscontroller/with_dr/__init__.robot new file mode 100644 index 00000000..2d404124 --- /dev/null +++ b/tests/dmaap-buscontroller/with_dr/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation dmaap-buscontroller - dr diff --git a/tests/dmaap-buscontroller/with_dr/orig b/tests/dmaap-buscontroller/with_dr/orig deleted file mode 100755 index fcac2026..00000000 --- a/tests/dmaap-buscontroller/with_dr/orig +++ /dev/null @@ -1,116 +0,0 @@ -*** Settings *** -Library OperatingSystem -Library RequestsLibrary -Library requests -Library Collections -Library String - -*** Variables *** -${TARGET_URL} https://${DR_PROV_IP}:8443 -${TARGET_URL_FEED} https://${DR_PROV_IP}:8443/feed/1 -${TARGET_URL_SUBSCRIBE} https://${DR_PROV_IP}:8443/subscribe/1 -${TARGET_URL_SUBSCRIPTION} https://${DR_PROV_IP}:8443/subs/1 -${TARGET_URL_PUBLISH} https://${DR_NODE_IP}:8443/publish/1/csit_test -${CREATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "CSIT_Test", "business_description": "CSIT_Test", "suspend": false, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}} -${UPDATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "UPDATED-CSIT_Test", "business_description": "CSIT_Test", "suspend": true, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}} -${SUBSCRIBE_DATA} {"delivery":{ "url":"https://${DR_PROV_IP}:8080/", "user":"rs873m", "password":"rs873m", "use100":true}, "metadataOnly":false, "suspend":false, "groupid":29, "subscriber":"sg481n"} -${UPDATE_SUBSCRIPTION_DATA} {"delivery":{ "url":"https://${DR_PROV_IP}:8080/", "user":"sg481n", "password":"sg481n", "use100":true}, "metadataOnly":false, "suspend":true, "groupid":29, "subscriber":"sg481n"} -${FEED_CONTENT_TYPE} application/vnd.att-dr.feed -${SUBSCRIBE_CONTENT_TYPE} application/vnd.att-dr.subscription -${PUBLISH_FEED_CONTENT_TYPE} application/octet-stream - -*** Test Cases *** -Run Feed Creation - [Documentation] Feed Creation - [Timeout] 1 minute - ${resp}= PostCall ${TARGET_URL} ${CREATE_FEED_DATA} ${FEED_CONTENT_TYPE} rs873m - log ${TARGET_URL} - log ${resp.text} - Should Be Equal As Strings ${resp.status_code} 201 - log 'JSON Response Code:'${resp} - -Run Subscribe to Feed - [Documentation] Subscribe to Feed - [Timeout] 1 minute - ${resp}= PostCall ${TARGET_URL_SUBSCRIBE} ${SUBSCRIBE_DATA} ${SUBSCRIBE_CONTENT_TYPE} sg481n - log ${TARGET_URL_SUBSCRIBE} - log ${resp.text} - Should Be Equal As Strings ${resp.status_code} 201 - log 'JSON Response Code:'${resp} - -Run Publish Feed - [Documentation] Publish to Feed - [Timeout] 1 minute - Sleep 10s Behaviour was noticed where feed was not created in time for publish to be sent - ${resp}= PutCall ${TARGET_URL_PUBLISH} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m - log ${TARGET_URL_PUBLISH} - log ${resp.text} - Should Be Equal As Strings ${resp.status_code} 204 - log 'JSON Response Code:'${resp} - -Run Update Subscription - [Documentation] Update Subscription to suspend and change delivery credentials - [Timeout] 1 minute - ${resp}= PutCall ${TARGET_URL_SUBSCRIPTION} ${UPDATE_SUBSCRIPTION_DATA} ${SUBSCRIBE_CONTENT_TYPE} sg481n - log ${TARGET_URL_SUBSCRIPTION} - log ${resp.text} - Should Be Equal As Strings ${resp.status_code} 200 - log 'JSON Response Code:'${resp} - ${resp}= GetCall ${TARGET_URL_SUBSCRIPTION} ${SUBSCRIBE_CONTENT_TYPE} sg481n - log ${resp.text} - Should Contain ${resp.text} "password":"sg481n","user":"sg481n" - log 'JSON Response Code:'${resp} - -Run Update Feed - [Documentation] Update Feed description and suspend - [Timeout] 1 minute - ${resp}= PutCall ${TARGET_URL_FEED} ${UPDATE_FEED_DATA} ${FEED_CONTENT_TYPE} rs873m - log ${TARGET_URL_FEED} - log ${resp.text} - Should Be Equal As Strings ${resp.status_code} 200 - log 'JSON Response Code:'${resp} - ${resp}= GetCall ${TARGET_URL_FEED} ${FEED_CONTENT_TYPE} rs873m - log ${resp.text} - Should Contain ${resp.text} "UPDATED-CSIT_Test" - log 'JSON Response Code:'${resp} - -Run Delete Subscription - [Documentation] Delete Subscription - [Timeout] 1 minute - ${resp}= DeleteCall ${TARGET_URL_SUBSCRIPTION} sg481n - log ${resp.text} - Should Be Equal As Strings ${resp.status_code} 204 - log 'JSON Response Code:'${resp} - -Run Delete Feed - [Documentation] Delete Feed - [Timeout] 1 minute - ${resp}= DeleteCall ${TARGET_URL_FEED} rs873m - log ${resp.text} - Should Be Equal As Strings ${resp.status_code} 204 - log 'JSON Response Code:'${resp} - -*** Keywords *** -PostCall - [Arguments] ${url} ${data} ${content_type} ${user} - ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} - ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests - [Return] ${resp} - -PutCall - [Arguments] ${url} ${data} ${content_type} ${user} - ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} Authorization=Basic cnM4NzNtOnJzODczbQ== - ${resp}= Evaluate requests.put('${url}',data='${data}', headers=${headers},verify=False) requests - [Return] ${resp} - -GetCall - [Arguments] ${url} ${content_type} ${user} - ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} - ${resp}= Evaluate requests.get('${url}', headers=${headers},verify=False) requests - [Return] ${resp} - -DeleteCall - [Arguments] ${url} ${user} - ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} - ${resp}= Evaluate requests.delete('${url}', headers=${headers},verify=False) requests - [Return] ${resp} diff --git a/tests/dmaap-buscontroller/with_dr/test1.robot b/tests/dmaap-buscontroller/with_dr/test1.robot index a3aef42b..671e89b7 100644 --- a/tests/dmaap-buscontroller/with_dr/test1.robot +++ b/tests/dmaap-buscontroller/with_dr/test1.robot @@ -9,127 +9,60 @@ Library String *** Variables *** -${MESSAGE} Hello, world! -${DBC_URI} webapi -${DBC_URL} http://${DMAAPBC_IP}:8080/${DBC_URI} +${DBC_URI} webapi +${DBC_URL} http://${DMAAPBC_IP}:8080/${DBC_URI} ${LOC} csit-sanfrancisco -${PUB_CORE} "dcaeLocationName": "${LOC}", "clientRole": "org.onap.dmaap.client.pub", "action": [ "pub", "view" ] -${SUB_CORE} "dcaeLocationName": "${LOC}", "clientRole": "org.onap.dmaap.client.sub", "action": [ "sub", "view" ] -${PUB} { ${PUB_CORE} } -${SUB} { ${SUB_CORE} } ${FEED1_DATA} { "feedName":"feed1", "feedVersion": "csit", "feedDescription":"generated for CSIT", "owner":"dgl", "asprClassification": "unclassified" } ${FEED2_DATA} { "feedName":"feed2", "feedVersion": "csit", "feedDescription":"generated for CSIT", "owner":"dgl", "asprClassification": "unclassified" } ${PUB2_DATA} { "dcaeLocationName": "${LOC}", "username": "pub2", "userpwd": "topSecret123", "feedId": "2" } ${SUB2_DATA} { "dcaeLocationName": "${LOC}", "username": "sub2", "userpwd": "someSecret123", "deliveryURL": "https://${DMAAPBC_IP}:8443/webapi/noURI", "feedId": "2" } -${TOPIC2_DATA} { "topicName":"singleMRtopic2", "topicDescription":"generated for CSIT", "owner":"dgl", "clients": [ ${PUB}, ${SUB}] } -${TOPIC3_DATA} { "topicName":"singleMRtopic3", "topicDescription":"generated for CSIT", "owner":"dgl"} -#${PUB3_DATA} { "fqtn": "${TOPIC_NS}.singleMRtopic3", ${PUB_CORE} } -#${SUB3_DATA} { "fqtn": "${TOPIC_NS}.singleMRtopic3", ${SUB_CORE} } - *** Test Cases *** -Url Test - [Documentation] Check if www.onap.org can be reached - Create Session sanity http://onap.readthedocs.io - ${resp}= Get Request sanity / - Should Be Equal As Integers ${resp.status_code} 200 - (DMAAP-441c1) [Documentation] Create Feed w no clients POST ${DBC_URI}/feeds endpoint - ${resp}= PostCall ${DBC_URL}/feeds ${FEED1_DATA} - Should Be Equal As Integers ${resp.status_code} 200 + ${resp}= PostCall ${DBC_URL}/feeds ${FEED1_DATA} + Should Be Equal As Integers ${resp.status_code} 200 (DMAAP-441c2) [Documentation] Create Feed w clients POST ${DBC_URI}/feeds endpoint - ${resp}= PostCall ${DBC_URL}/feeds ${FEED2_DATA} - Should Be Equal As Integers ${resp.status_code} 200 + ${resp}= PostCall ${DBC_URL}/feeds ${FEED2_DATA} + Should Be Equal As Integers ${resp.status_code} 200 (DMAAP-441c3) [Documentation] Add Publisher to existing feed - ${resp}= PostCall ${DBC_URL}/dr_pubs ${PUB2_DATA} - Should Be Equal As Integers ${resp.status_code} 201 - ${tmp}= Get Json Value ${resp.text} /pubId - ${tmp}= Remove String ${tmp} \" - Set Suite Variable ${pubId} ${tmp} + ${resp}= PostCall ${DBC_URL}/dr_pubs ${PUB2_DATA} + Should Be Equal As Integers ${resp.status_code} 201 + ${JSON}= Evaluate json.loads(r"""${resp.content}""", strict=False) + ${result}= Set Variable ${JSON['pubId']} + Set Suite Variable ${pubId} ${result} (DMAAP-441c4) [Documentation] Add Subscriber to existing feed - ${resp}= PostCall ${DBC_URL}/dr_subs ${SUB2_DATA} - Should Be Equal As Integers ${resp.status_code} 201 - ${tmp}= Get Json Value ${resp.text} /subId - ${tmp}= Remove String ${tmp} \" - Set Suite Variable ${subId} ${tmp} + ${resp}= PostCall ${DBC_URL}/dr_subs ${SUB2_DATA} + Should Be Equal As Integers ${resp.status_code} 201 + ${JSON}= Evaluate json.loads(r"""${resp.content}""", strict=False) + ${result}= Set Variable ${JSON['subId']} + Set Suite Variable ${subId} ${result} (DMAAP-443) [Documentation] List existing feeds Create Session get ${DBC_URL} - ${resp}= Get Request get /feeds - Should Be Equal As Integers ${resp.status_code} 200 + ${resp}= GET On Session get /feeds + Should Be Equal As Integers ${resp.status_code} 200 (DMAAP-444) [Documentation] Delete existing subscriber - ${resp}= DelCall ${DBC_URL}/dr_subs/${subId} - Should Be Equal As Integers ${resp.status_code} 204 + ${resp}= DelCall ${DBC_URL}/dr_subs/${subId} + Should Be Equal As Integers ${resp.status_code} 204 (DMAAP-445) [Documentation] Delete existing publisher - ${resp}= DelCall ${DBC_URL}/dr_pubs/${pubId} - Should Be Equal As Integers ${resp.status_code} 204 - -#(DMAAP-294) -# [Documentation] Create Topic w pub and sub clients POST ${DBC_URI}/topics endpoint -# ${resp}= PostCall ${DBC_URL}/topics ${TOPIC2_DATA} -# Should Be Equal As Integers ${resp.status_code} 201 -# -#(DMAAP-295) -# [Documentation] Create Topic w no clients and then add a client POST ${DBC_URI}/mr_clients endpoint -# ${resp}= PostCall ${DBC_URL}/topics ${TOPIC3_DATA} -# Should Be Equal As Integers ${resp.status_code} 201 -# ${resp}= PostCall ${DBC_URL}/mr_clients ${PUB3_DATA} -# Should Be Equal As Integers ${resp.status_code} 200 -# ${resp}= PostCall ${DBC_URL}/mr_clients ${SUB3_DATA} -# Should Be Equal As Integers ${resp.status_code} 200 -# -#(DMAAP-297) -# [Documentation] Query for all topics and specific topic -# Create Session get ${DBC_URL} -# ${resp}= Get Request get /topics -# Should Be Equal As Integers ${resp.status_code} 200 -# ${resp}= Get Request get /topics/${TOPIC_NS}.singleMRtopic3 -# Should Be Equal As Integers ${resp.status_code} 200 -# -#(DMAAP-301) -# [Documentation] Delete a subscriber -# Create Session get ${DBC_URL} -# ${resp}= Get Request get /topics/${TOPIC_NS}.singleMRtopic3 -# Should Be Equal As Integers ${resp.status_code} 200 -# ${tmp}= Get Json Value ${resp.text} /clients/1/mrClientId -# ${clientId}= Remove String ${tmp} \" -# ${resp}= DelCall ${DBC_URL}/mr_clients/${clientId} -# Should Be Equal As Integers ${resp.status_code} 204 -# -#(DMAAP-302) -# [Documentation] Delete a publisher -# Create Session get ${DBC_URL} -# ${resp}= Get Request get /topics/${TOPIC_NS}.singleMRtopic3 -# Should Be Equal As Integers ${resp.status_code} 200 -# ${tmp}= Get Json Value ${resp.text} /clients/0/mrClientId -# ${clientId}= Remove String ${tmp} \" -# ${resp}= DelCall ${DBC_URL}/mr_clients/${clientId} -# Should Be Equal As Integers ${resp.status_code} 204 + ${resp}= DelCall ${DBC_URL}/dr_pubs/${pubId} + Should Be Equal As Integers ${resp.status_code} 204 *** Keywords *** -CheckDir - [Arguments] ${path} - Directory Should Exist ${path} - -CheckUrl - [Arguments] ${session} ${path} ${expect} - ${resp}= Get Request ${session} ${path} - Should Be Equal As Integers ${resp.status_code} ${expect} - PostCall [Arguments] ${url} ${data} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json diff --git a/tests/dmaap-buscontroller/with_mr/__init__.robot b/tests/dmaap-buscontroller/with_mr/__init__.robot new file mode 100644 index 00000000..ffcec41b --- /dev/null +++ b/tests/dmaap-buscontroller/with_mr/__init__.robot @@ -0,0 +1,3 @@ +*** Settings *** +Documentation dmaap-buscontroller - mr + diff --git a/tests/dmaap-buscontroller/single-mr-suite/test1.robot b/tests/dmaap-buscontroller/with_mr/test1.robot similarity index 74% rename from tests/dmaap-buscontroller/single-mr-suite/test1.robot rename to tests/dmaap-buscontroller/with_mr/test1.robot index d68b9ed1..37d3e158 100644 --- a/tests/dmaap-buscontroller/single-mr-suite/test1.robot +++ b/tests/dmaap-buscontroller/with_mr/test1.robot @@ -9,9 +9,8 @@ Library String *** Variables *** -${MESSAGE} Hello, world! -${DBC_URI} webapi -${DBC_URL} http://${DMAAPBC_IP}:8080/${DBC_URI} +${DBC_URI} webapi +${DBC_URL} http://${DMAAP_BC_IP}:8080/${DBC_URI} ${TOPIC_NS} org.onap.dmaap.onapCSIT ${LOC} csit-sanfrancisco ${PUB_CORE} "dcaeLocationName": "${LOC}", "clientRole": "org.onap.dmaap.client.pub", "action": [ "pub", "view" ] @@ -25,14 +24,7 @@ ${PUB3_DATA} { "fqtn": "${TOPIC_NS}.singleMRtopic3", ${PUB_CORE} } ${SUB3_DATA} { "fqtn": "${TOPIC_NS}.singleMRtopic3", ${SUB_CORE} } - *** Test Cases *** -Url Test - [Documentation] Check if www.onap.org can be reached - Create Session sanity http://onap.readthedocs.io - ${resp}= Get Request sanity / - Should Be Equal As Integers ${resp.status_code} 200 - (DMAAP-293) [Documentation] Create Topic w no clients POST ${DBC_URI}/topics endpoint ${resp}= PostCall ${DBC_URL}/topics ${TOPIC1_DATA} @@ -55,42 +47,33 @@ Url Test (DMAAP-297) [Documentation] Query for all topics and specific topic Create Session get ${DBC_URL} - ${resp}= Get Request get /topics + ${resp}= GET On Session get /topics Should Be Equal As Integers ${resp.status_code} 200 - ${resp}= Get Request get /topics/${TOPIC_NS}.singleMRtopic3 + ${resp}= GET On Session get /topics/${TOPIC_NS}.singleMRtopic3 Should Be Equal As Integers ${resp.status_code} 200 (DMAAP-301) [Documentation] Delete a subscriber Create Session get ${DBC_URL} - ${resp}= Get Request get /topics/${TOPIC_NS}.singleMRtopic3 + ${resp}= GET On Session get /topics/${TOPIC_NS}.singleMRtopic3 Should Be Equal As Integers ${resp.status_code} 200 - ${tmp}= Get Json Value ${resp.text} /clients/1/mrClientId - ${clientId}= Remove String ${tmp} \" + ${JSON}= Evaluate json.loads(r"""${resp.content}""", strict=False) + ${clientId}= Set Variable ${JSON['clients'][1]['mrClientId']} ${resp}= DelCall ${DBC_URL}/mr_clients/${clientId} Should Be Equal As Integers ${resp.status_code} 204 (DMAAP-302) [Documentation] Delete a publisher Create Session get ${DBC_URL} - ${resp}= Get Request get /topics/${TOPIC_NS}.singleMRtopic3 + ${resp}= GET On Session get /topics/${TOPIC_NS}.singleMRtopic3 Should Be Equal As Integers ${resp.status_code} 200 - ${tmp}= Get Json Value ${resp.text} /clients/0/mrClientId - ${clientId}= Remove String ${tmp} \" + ${JSON}= Evaluate json.loads(r"""${resp.content}""", strict=False) + ${clientId}= Set Variable ${JSON['clients'][0]['mrClientId']} ${resp}= DelCall ${DBC_URL}/mr_clients/${clientId} Should Be Equal As Integers ${resp.status_code} 204 *** Keywords *** -CheckDir - [Arguments] ${path} - Directory Should Exist ${path} - -CheckUrl - [Arguments] ${session} ${path} ${expect} - ${resp}= Get Request ${session} ${path} - Should Be Equal As Integers ${resp.status_code} ${expect} - PostCall [Arguments] ${url} ${data} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json diff --git a/tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot b/tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot deleted file mode 100644 index 660c5f64..00000000 --- a/tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot +++ /dev/null @@ -1,125 +0,0 @@ -*** Settings *** -Documentation Testing E2E VES,Dmaap,DFC,DR with File Ready event feed from xNF -Library RequestsLibrary -Library OperatingSystem -Library Collections -Library Process -Resource resources/bulkpm_keywords.robot -Library resources/JsonValidatorLibrary.py -Library resources/xNFLibrary.py - - -*** Variables *** -${VESC_URL} http://%{VESC_IP}:%{VESC_PORT} -${GLOBAL_APPLICATION_ID} robot-ves -${VES_ANY_EVENT_PATH} /eventListener/v7 -${HEADER_STRING} content-type=application/json -${EVENT_DATA_FILE} %{WORKSPACE}/tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.json - -${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics -${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000 -${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov -${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .xml" -${CLI_EXEC_CLI_DFC_LOG} docker exec dcaegen2-datafile-collector /bin/sh -c "cat /var/log/ONAP/application.log" > %{WORKSPACE}/archives/dfc_docker.log -${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Datafile file published" %{WORKSPACE}/archives/dfc_docker.log -${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE} -${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}/archives/metadata.json -${CLI_EXEC_CLI_PMMAPPER_LOG} docker exec dcaegen2-pm-mapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > %{WORKSPACE}/archives/pmmapper_docker.log -${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} grep "XML validation successful" %{WORKSPACE}/archives/pmmapper_docker.log -${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} grep "Successfully published VES events to messagerouter" %{WORKSPACE}/archives/pmmapper_docker.log -${metadataSchemaPath} %{WORKSPACE}/tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json -${metadataJsonPath} %{WORKSPACE}/archives/metadata.json - -*** Test Cases *** - -Send VES File Ready Event to VES Collector - [Tags] Bulk_PM_E2E_01 - [Documentation] Send VES File Ready Event - ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE} - ${headers}= Create Header From String ${HEADER_STRING} - ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 15s - ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 5s - ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 5s - ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 5s - Log Receive HTTP Status code ${resp.status_code} - Should Be Equal As Strings ${resp.status_code} 202 - -Check VES Notification Topic is existing in Message Router - [Tags] Bulk_PM_E2E_02 - [Documentation] Get the VES Notification topic on message router - [Timeout] 1 minute - Sleep 10s - ${resp}= GetCall ${TARGETURL_TOPICS} - log ${TARGETURL_TOPICS} - log 'JSON Response Code :'${resp} - ${topics}= Evaluate $resp.json().get('topics') - log ${topics} - ${ListLength}= Get Length ${topics} - log ${ListLength} - List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT - -Verify Data File Collector successfully publishes the PM XML file to the Data Router - [Tags] Bulk_PM_E2E_03 - [Documentation] Check that DFC publishes the PM XML to the Data Router - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG_GREP} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} Datafile file published - - -Verify Default Feed And File Consumer Subscription On Datarouter - [Tags] Bulk_PM_E2E_04 - [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1 - Should Contain ${cli_cmd_output.stdout} http://datarouter-subscriber:7070 - - -Verify Fileconsumer Receive PM file from Data Router - [Tags] Bulk_PM_E2E_05 - [Documentation] Check PM XML file exists on the File Consumer Simulator - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml - -Verify File Consumer Receive valid metadata from Data Router - [Tags] Bulk_PM_E2E_06 - [Documentation] Check PM XML file is delivered to the FileConsumer Simulator with valid metadata - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml.M - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER_CP} shell=yes - ${cli_cmd_output}= Run Process ${CLI_EXEC_RENAME_METADATA} shell=yes - ${validation_result}= Validate ${metadataSchemaPath} ${metadataJsonPath} - Should Be Equal As Strings ${validation_result} 0 - -Verify PM-Mapper successfully receives uncompressed the PM XML file - [Tags] Bulk_PM_E2E_07 - [Documentation] Check that PM-Mapper receives the uncompressed PM XML file - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} XML validation successful - -Verify PM-Mapper successfully publishes VES event the Message Router - [Tags] Bulk_PM_E2E_08 - [Documentation] Check that PM-Mapper publishes VES onto the Message Router - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} shell=yes - Should Contain ${cli_cmd_output.stdout} Successfully published VES events to messagerouter \ No newline at end of file diff --git a/tests/usecases-5G-bulkpm/5G-bulkpm/__init__.robot b/tests/usecases-5G-bulkpm/5G-bulkpm/__init__.robot deleted file mode 100644 index 7114fd44..00000000 --- a/tests/usecases-5G-bulkpm/5G-bulkpm/__init__.robot +++ /dev/null @@ -1,2 +0,0 @@ -*** Settings *** -Documentation 5G Bulk PM E2E Testcases diff --git a/tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.json b/tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.json deleted file mode 100644 index 02f092df..00000000 --- a/tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "event": { - "commonEventHeader": { - "version": "4.0.1", - "vesEventListenerVersion": "7.0.1", - "domain": "notification", - "eventName": "Noti_RnNode-Ericsson_FileReady", - "eventId": "FileReady_1797490e-10ae-4d48-9ea7-3d7d790b25e1", - "lastEpochMicrosec": 8745745764578, - "priority": "Normal", - "reportingEntityName": "otenb5309", - "sequence": 0, - "sourceName": "oteNB5309", - "startEpochMicrosec": 8745745764578, - "timeZoneOffset": "UTC+05.30" - }, - "notificationFields": { - "changeIdentifier": "PM_MEAS_FILES", - "changeType": "FileReady", - "notificationFieldsVersion": "2.0", - "arrayOfNamedHashMap": [ - { "name": "A20181002.0000-1000-0015-1000_5G.xml.gz", - "hashMap":{ - "location": "sftp://admin:admin@sftp:22/A20181002.0000-1000-0015-1000_5G.xml.gz", - "compression": "gzip", - "fileFormatType": "org.3GPP.32.435#measCollec", - "fileFormatVersion": "V10" - } - } - ] - } -} -} \ No newline at end of file diff --git a/tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json b/tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json deleted file mode 100644 index a41b3544..00000000 --- a/tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "metadata.schema.json", - "title": "DataRouter PM File Metadata", - "description": "Metadata for 3GPP PM files that are placed on the DMaaP Data Router by the Data File Collector (VES 7.1)", - "type": "object", - - "properties": { - "productName": { - "description": "from the FileReady event eventName", - "type": "string" - }, - - "vendorName": { - "description": "from the FileReady event eventName", - "type": "string" - }, - - "lastEpochMicrosec": { - "description": "the latest unix epoch time associated with the FileReady event", - "type": "string" - }, - - "sourceName": { - "description": "the name of the entity experiencing the event", - "type": "string" - }, - - "startEpochMicrosec": { - "description": "the earliest unix epoch time associated with the FileReady event", - "type": "string" - }, - - "timeZoneOffset": { - "description": "the timezone offset from UTC", - "type": "string", - "pattern": "^(?:(?:[a-zA-Z]{3})[+-](?:[01][0-9]|2[0-3]).[0-5][0-9])$" - }, - - "location": { - "description": "follows the format ://://, the IP address is the node ip address, the port of the protocol server", - "type": "string" - }, - - "compression": { - "description": "specifies if the file is compressed", - "type": "string", - "enum": [ "gzip" ] - }, - - "fileFormatType": { - "description": "the file format", - "type": "string" - }, - - "fileFormatVersion": { - "description": "the version of the file format", - "type": "string" - } - }, - - "required": [ - "productName", - "vendorName", - "lastEpochMicrosec", - "sourceName", - "startEpochMicrosec", - "timeZoneOffset", - "location", - "compression", - "fileFormatType", - "fileFormatVersion" - ] -} diff --git a/tests/usecases-5G-bulkpm/5G-bulkpm/resources/JsonValidatorLibrary.py b/tests/usecases-5G-bulkpm/5G-bulkpm/resources/JsonValidatorLibrary.py deleted file mode 100644 index ed376ff2..00000000 --- a/tests/usecases-5G-bulkpm/5G-bulkpm/resources/JsonValidatorLibrary.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- - -import logging - -from jsonschema import validate, ValidationError, SchemaError -from simplejson import load - - -class JsonValidatorLibrary(object): - - def __init__(self): - pass - - @staticmethod - def validate(schema_path, json_path): - logging.info("Schema path: " + schema_path) - logging.info("JSON path: " + json_path) - schema = None - data = None - try: - schema = load(open(schema_path, 'r')) - data = load(open(json_path, 'r')) - except (IOError, ValueError, OSError) as e: - logging.error(e.message) - return 1 - - try: - validate(data, schema) - except (ValidationError, SchemaError) as e: - logging.error(e.message) - return 1 - - # logger.log("JSON validation successful") - print("JSON validation successful") - return 0 - - -if __name__ == '__main__': - lib = JsonValidatorLibrary() -# sys.exit(JsonValidatorLibrary().validate(sys.argv[1], sys.argv[2])) diff --git a/tests/usecases-5G-bulkpm/5G-bulkpm/resources/bulkpm_keywords.robot b/tests/usecases-5G-bulkpm/5G-bulkpm/resources/bulkpm_keywords.robot deleted file mode 100644 index 9ef56c83..00000000 --- a/tests/usecases-5G-bulkpm/5G-bulkpm/resources/bulkpm_keywords.robot +++ /dev/null @@ -1,39 +0,0 @@ - *** Settings *** -Documentation The main interface for interacting with VES. It handles low level stuff like managing the http request library and VES required fields -Library RequestsLibrary -Library ../resources/xNFLibrary.py -Library ../resources/JsonValidatorLibrary.py -Library OperatingSystem -Library Collections -Library requests -Library Collections -Library String - -*** Variables *** - -*** Keywords *** - -Get Event Data From File - [Arguments] ${jsonfile} - ${data}= OperatingSystem.Get File ${jsonfile} - #Should Not Be_Equal ${data} None - [return] ${data} - -Publish Event To VES Collector - [Documentation] Send an event to VES Collector - [Arguments] ${url} ${evtpath} ${httpheaders} ${evtdata} - Log Creating session ${url} - ${session}= Create Session dcaegen2-d1 ${url} - ${resp}= Post Request dcaegen2-d1 ${evtpath} data=${evtdata} headers=${httpheaders} - #Log Received response from dcae ${resp.json()} - [return] ${resp} -PostCall - [Arguments] ${url} ${data} - ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests - [Return] ${resp} - -GetCall - [Arguments] ${url} - ${resp}= Evaluate requests.get('${url}') requests - [Return] ${resp} diff --git a/tests/usecases-5G-bulkpm/5G-bulkpm/resources/xNFLibrary.py b/tests/usecases-5G-bulkpm/5G-bulkpm/resources/xNFLibrary.py deleted file mode 100644 index b70d8095..00000000 --- a/tests/usecases-5G-bulkpm/5G-bulkpm/resources/xNFLibrary.py +++ /dev/null @@ -1,30 +0,0 @@ -''' -Created on Aug 18, 2017 - -@author: sw6830 -''' -import time -import uuid - -from robot.api import logger - - -class xNFLibrary(object): - - def __init__(self): - pass - - @staticmethod - def create_header_from_string(dict_str): - logger.info("Enter create_header_from_string: dictStr") - return dict(u.split("=") for u in dict_str.split(",")) - - @staticmethod - def Generate_UUID(self): - """generate a uuid""" - return uuid.uuid4() - - -if __name__ == '__main__': - lib = xNFLibrary() - time.sleep(100000) -- 2.16.6