aboutsummaryrefslogtreecommitdiffstats
path: root/testsuites/stability/src
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2025-01-16 14:03:12 +0000
committeradheli.tavares <adheli.tavares@est.tech>2025-01-16 14:50:15 +0000
commit513561b7a9ff3e33ea008e7bdc6cf822dbcfe1c9 (patch)
tree1f894940775e5d8f548428ac3db2efbcedabb3f3 /testsuites/stability/src
parentee5eeb38c03a2e13c585cceafe5695a47fd39491 (diff)
Remove MariaDB support
- change configurations to use PostgreSQL as default - remove unused configurations Issue-ID: POLICY-5196 Change-Id: I22ce625ff16e94375f5a93b803a71044f2d5f008 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'testsuites/stability/src')
-rw-r--r--testsuites/stability/src/main/resources/papsetup/config/pap/bin/policy-pap.sh40
-rw-r--r--testsuites/stability/src/main/resources/papsetup/config/pap/etc/defaultConfig.json57
-rw-r--r--testsuites/stability/src/main/resources/papsetup/setup_pap.sh38
-rw-r--r--testsuites/stability/src/main/resources/simulatorsetup/config/db/db.conf16
-rw-r--r--testsuites/stability/src/main/resources/simulatorsetup/config/db/db.sh22
-rw-r--r--testsuites/stability/src/main/resources/simulatorsetup/config/pdp/OnapPfConfig.json22
-rw-r--r--testsuites/stability/src/main/resources/simulatorsetup/docker-compose-simulator.yml30
-rw-r--r--testsuites/stability/src/main/resources/simulatorsetup/setup_components.sh73
-rw-r--r--testsuites/stability/src/main/resources/testplans/pdp_sim_startup.sh22
-rw-r--r--testsuites/stability/src/main/resources/testplans/pdp_sim_stop.sh20
10 files changed, 0 insertions, 340 deletions
diff --git a/testsuites/stability/src/main/resources/papsetup/config/pap/bin/policy-pap.sh b/testsuites/stability/src/main/resources/papsetup/config/pap/bin/policy-pap.sh
deleted file mode 100644
index 29e12bec..00000000
--- a/testsuites/stability/src/main/resources/papsetup/config/pap/bin/policy-pap.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START=======================================================
-# Copyright (C) 2019-2022 Nordix Foundation.
-# Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-#
-
-POLICY_PAP_HOME=/opt/app/policy/pap
-KEYSTORE="${POLICY_HOME}/etc/ssl/policy-keystore"
-TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore"
-
-if [ "$#" -ge 1 ]; then
- CONFIG_FILE=$1
-else
- CONFIG_FILE=${CONFIG_FILE}
-fi
-
-if [ -z "$CONFIG_FILE" ]
- then
- CONFIG_FILE="$POLICY_PAP_HOME/etc/defaultConfig.json"
-fi
-
-echo "Policy pap config file: $CONFIG_FILE"
-
-$JAVA_HOME/bin/java -cp "$POLICY_PAP_HOME/etc:$POLICY_PAP_HOME/lib/*" -Dlogback.configurationFile=$POLICY_PAP_HOME/etc/logback.xml -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD:-Pol1cy_0nap}" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}" -Dcom.sun.management.jmxremote.rmi.port=9090 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=false -Djava.rmi.server.hostname=$PAP_HOST org.onap.policy.pap.main.startstop.Main -c $CONFIG_FILE
diff --git a/testsuites/stability/src/main/resources/papsetup/config/pap/etc/defaultConfig.json b/testsuites/stability/src/main/resources/papsetup/config/pap/etc/defaultConfig.json
deleted file mode 100644
index 144eca4d..00000000
--- a/testsuites/stability/src/main/resources/papsetup/config/pap/etc/defaultConfig.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "PapGroup",
- "restServerParameters": {
- "host": "0.0.0.0",
- "port": 6969,
- "userName": "policyadmin",
- "password": "zb!XztG34",
- "https": true,
- "aaf": false
- },
- "pdpParameters": {
- "heartBeatMs": 120000,
- "updateParameters": {
- "maxRetryCount": 1,
- "maxWaitMs": 30000
- },
- "stateChangeParameters": {
- "maxRetryCount": 1,
- "maxWaitMs": 30000
- }
- },
- "databaseProviderParameters": {
- "name": "PolicyProviderParameterGroup",
- "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
- "databaseDriver": "org.mariadb.jdbc.Driver",
- "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin",
- "databaseUser": "policy_user",
- "databasePassword": "policy_user",
- "persistenceUnit": "PolicyDb"
- },
- "topicParameterGroup": {
- "topicSources" : [{
- "topic" : "POLICY-PDP-PAP",
- "servers" : [ "10.2.0.41:3904" ],
- "topicCommInfrastructure" : "NOOP",
- "fetchTimeout": 15000
- },
- {
- "topic" : "PDP-HEARTBEAT",
- "effectiveTopic": "POLICY-PDP-PAP",
- "consumerGroup": "policy-pap",
- "servers" : [ "10.2.0.41:3904" ],
- "topicCommInfrastructure" : "NOOP",
- "fetchTimeout": 15000
- }],
- "topicSinks" : [{
- "topic" : "POLICY-PDP-PAP",
- "servers" : [ "10.2.0.41:3904" ],
- "topicCommInfrastructure" : "NOOP"
- },
- {
- "topic" : "POLICY-NOTIFICATION",
- "servers" : [ "10.2.0.41:3904" ],
- "topicCommInfrastructure" : "NOOP"
- }]
- }
-}
diff --git a/testsuites/stability/src/main/resources/papsetup/setup_pap.sh b/testsuites/stability/src/main/resources/papsetup/setup_pap.sh
deleted file mode 100644
index 0f06ed69..00000000
--- a/testsuites/stability/src/main/resources/papsetup/setup_pap.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-# Copyright (c) 2019 - 2020 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# the directory of the script
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-echo ${DIR}
-
-if [ "$#" -lt 2 ]; then
- echo "PAP and MariaDB IPs should be passed as two parameters. PAP IP goes first."
- exit 1
-else
- PAP=$1
- echo "PAP IP: ${PAP}"
- MARIADB=$2
- echo "MariaDB IP: ${MARIADB}"
-fi
-
-GIT_TOP=$(git rev-parse --show-toplevel)
-POLICY_PAP_VERSION_EXTRACT=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' "${GIT_TOP}"/pom.xml)
-PAP_IMAGE=policy-pap:${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest
-
-docker run -p 9090:9090 -p 6969:6969 -e "PAP_HOST=${PAP}" -v ${DIR}/config/pap/bin/policy-pap.sh:/opt/app/policy/pap/bin/policy-pap.sh -v ${DIR}/config/pap/etc/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json --add-host mariadb:${MARIADB} --name policy-pap -d nexus3.onap.org:10001/onap/${PAP_IMAGE}
diff --git a/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.conf b/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.conf
deleted file mode 100644
index 4768bfc4..00000000
--- a/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2019 Nordix Foundation.
-#
-# 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.
-MYSQL_ROOT_PASSWORD=secret
-MYSQL_USER=policy_user
-MYSQL_PASSWORD=policy_user
diff --git a/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.sh b/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.sh
deleted file mode 100644
index 660f2c5a..00000000
--- a/testsuites/stability/src/main/resources/simulatorsetup/config/db/db.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash -xv
-# Copyright (C) 2019 Nordix Foundation.
-#
-# 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.
-
-for db in policyadmin
-do
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
-done
-
-mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
diff --git a/testsuites/stability/src/main/resources/simulatorsetup/config/pdp/OnapPfConfig.json b/testsuites/stability/src/main/resources/simulatorsetup/config/pdp/OnapPfConfig.json
deleted file mode 100644
index 337cf458..00000000
--- a/testsuites/stability/src/main/resources/simulatorsetup/config/pdp/OnapPfConfig.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name":"OnapPfParameterGroup",
- "pdpStatusParameters": {
- "pdpGroup": "sampleGroup",
- "timeIntervalMs": 30000,
- "pdpType":"apex",
- "description":"Pdp Heartbeat",
- "supportedPolicyTypes":[{"name":"onap.policies.controlloop.operational.Apex","version":"1.0.0"}]
- },
- "topicParameterGroup": {
- "topicSources" : [{
- "topic" : "POLICY-PDP-PAP",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap"
- }],
- "topicSinks" : [{
- "topic" : "POLICY-PDP-PAP",
- "servers" : [ "message-router" ],
- "topicCommInfrastructure" : "dmaap"
- }]
- }
-}
diff --git a/testsuites/stability/src/main/resources/simulatorsetup/docker-compose-simulator.yml b/testsuites/stability/src/main/resources/simulatorsetup/docker-compose-simulator.yml
deleted file mode 100644
index 532a798f..00000000
--- a/testsuites/stability/src/main/resources/simulatorsetup/docker-compose-simulator.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2019 Nordix Foundation.
-#
-# 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.
-version: '2'
-networks:
- default:
- driver: bridge
-services:
- message-router:
- image: dmaap/simulator
- container_name: dmaap-simulator
- hostname: dmaap-simulator
- ports:
- - "3904:3904"
- pdp:
- image: pdp/simulator
- container_name: pdp-simulator
- depends_on:
- - message-router
- hostname: pdp-simulator
diff --git a/testsuites/stability/src/main/resources/simulatorsetup/setup_components.sh b/testsuites/stability/src/main/resources/simulatorsetup/setup_components.sh
deleted file mode 100644
index 5323fc57..00000000
--- a/testsuites/stability/src/main/resources/simulatorsetup/setup_components.sh
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-# Copyright (c) 2019 - 2020 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# the directory of the script
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-echo ${DIR}
-
-# get the PAP_HOST from the command line
-read -p 'PAP_HOST : ' PAP_HOST
-
-# setting hostname to environment variable
-echo "export API_HOST=`hostname -I | awk '{print $1}'`" >> ~/.bashrc
-echo "export PAP_HOST=$PAP_HOST" >> ~/.bashrc
-source ~/.bashrc
-
-# the temp directory used, within $DIR
-# omit the -p parameter to create a temporal directory in the default location
-WORK_DIR=`mktemp -d -p "$DIR"`
-echo ${WORK_DIR}
-
-cd ${WORK_DIR}
-
-# check if tmp dir was created
-if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
- echo "Could not create temp dir"
- exit 1
-fi
-
-# bring down maven
-mkdir maven
-cd maven
-curl -O http://apache.claz.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
-tar -xzvf apache-maven-3.3.9-bin.tar.gz
-ls -l
-export PATH=${PATH}:${WORK_DIR}/maven/apache-maven-3.3.9/bin
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn -v
-cd ..
-
-git clone http://gerrit.onap.org/r/oparent
-git clone --depth 1 https://gerrit.onap.org/r/policy/models -b master
-
-cd models/models-sim/models-sim-dmaap
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests --settings ${WORK_DIR}/oparent/settings.xml
-bash ./src/main/package/docker/docker_build.sh
-
-cd ../policy-models-sim-pdp
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests --settings ${WORK_DIR}/oparent/settings.xml
-bash ./src/main/package/docker/docker_build.sh
-
-cd ${DIR}
-rm -rf ${WORK_DIR}
-
-docker run -p 3306:3306 -v ${DIR}/config/db:/docker-entrypoint-initdb.d --name mariadb --env-file ${DIR}/config/db/db.conf -d --rm mariadb:10.2.14 --lower-case-table-names=1 --wait_timeout=28800
-docker run -p 3904:3904 -d --name message-router --rm dmaap/simulator:latest
-sleep 10
-docker run --link message-router:message-router -d --name pdp-simulator --rm pdp/simulator:latest
-docker run -p 6969:6969 --link mariadb:mariadb --name policy-api -d --rm nexus3.onap.org:10001/onap/policy-api
diff --git a/testsuites/stability/src/main/resources/testplans/pdp_sim_startup.sh b/testsuites/stability/src/main/resources/testplans/pdp_sim_startup.sh
deleted file mode 100644
index 0d25417d..00000000
--- a/testsuites/stability/src/main/resources/testplans/pdp_sim_startup.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-# Copyright (c) 2020 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# the directory of the pdp config
-echo $1
-docker run -v $1/config/pdp:/opt/app/policy/pdp-sim/etc/config/ --link message-router:message-router -d --rm --name pdp-simulator_sample pdp/simulator:latest
diff --git a/testsuites/stability/src/main/resources/testplans/pdp_sim_stop.sh b/testsuites/stability/src/main/resources/testplans/pdp_sim_stop.sh
deleted file mode 100644
index 0a8e1970..00000000
--- a/testsuites/stability/src/main/resources/testplans/pdp_sim_stop.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-# Copyright (c) 2020 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-docker stop pdp-simulator_sample