aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/scripts')
-rwxr-xr-xtest/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh2
-rwxr-xr-xtest/csit/scripts/optf-has/has/has_script.sh6
-rwxr-xr-xtest/csit/scripts/optf-has/has/simulator_script.sh24
-rwxr-xr-xtest/csit/scripts/optf-has/has/simulator_teardown_script.sh3
4 files changed, 31 insertions, 4 deletions
diff --git a/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh b/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh
index e6e12f2d5..92e2f02ff 100755
--- a/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh
+++ b/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh
@@ -34,7 +34,7 @@ cd clamp/extra/docker/clamp/
sed -i '/image: onap\/clamp/c\ image: nexus3.onap.org:10001\/onap\/clamp' docker-compose.yml
# Change config to take third_party_proxy:8085 for SDC, Policy and DCAE simulator
-sed -i 's/\"classpath:\/clds\/clds-policy-config.properties\"/\"file:.\/config\/clds-policy-config-third_party_proxy.properties\",\"clamp.config.sdc.catalog.url\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/\",\"clamp.config.sdc.hostUrl\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.sdc.serviceUrl\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/services\",\"clamp.config.dcae.inventory.url\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.dcae.dispatcher.url\":\"http:\/\/third_party_proxy:8085\"/g' clamp.env
+sed -i 's/}/,\"clamp.config.policy.pdpUrl1\":\"http:\/\/third_party_proxy:8085\/pdp\/ , testpdp, alpha123\",\"clamp.config.policy.pdpUrl2\":\"http:\/\/third_party_proxy:8085\/pdp\/ , testpdp, alpha123\",\"clamp.config.policy.papUrl\":\"http:\/\/third_party_proxy:8085\/pap\/ , testpap, alpha123\",\"clamp.config.policy.clientId\":\"python\",\"clamp.config.policy.clientKey\":\"dGVzdA==\",\"clamp.config.sdc.catalog.url\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/\",\"clamp.config.sdc.hostUrl\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.sdc.serviceUrl\":\"http:\/\/third_party_proxy:8085\/sdc\/v1\/catalog\/services\",\"clamp.config.dcae.inventory.url\":\"http:\/\/third_party_proxy:8085\",\"clamp.config.dcae.dispatcher.url\":\"http:\/\/third_party_proxy:8085\"}/g' clamp.env
# Add the sql to create template so it is played by docker-compose later
cp ../../../src/test/resources/sql/four_templates_only.sql ../../sql/bulkload/
diff --git a/test/csit/scripts/optf-has/has/has_script.sh b/test/csit/scripts/optf-has/has/has_script.sh
index ed0f48838..ac907eea1 100755
--- a/test/csit/scripts/optf-has/has/has_script.sh
+++ b/test/csit/scripts/optf-has/has/has_script.sh
@@ -56,6 +56,12 @@ echo "AAISIM_IP=${AAISIM_IP}"
# change AAI reference to the local instance
sed -i -e "s%localhost:8081/%${AAISIM_IP}:8081/%g" /tmp/conductor/properties/conductor.conf
+MULTICLOUDSIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' multicloudsim`
+echo "MULTICLOUDSIM_IP=${MULTICLOUDSIM_IP}"
+
+# change MULTICLOUD reference to the local instance
+sed -i -e "s%localhost:8082/%${MULTICLOUDSIM_IP}:8082/%g" /tmp/conductor/properties/conductor.conf
+
#onboard conductor into music
curl -vvvvv --noproxy "*" --request POST http://${MUSIC_IP}:8080/MUSIC/rest/v2/admin/onboardAppWithMusic -H "Content-Type: application/json" --data @${WORKSPACE}/test/csit/tests/optf-has/has/data/onboard.json
diff --git a/test/csit/scripts/optf-has/has/simulator_script.sh b/test/csit/scripts/optf-has/has/simulator_script.sh
index e5bc43dbe..2e8a0e6f4 100755
--- a/test/csit/scripts/optf-has/has/simulator_script.sh
+++ b/test/csit/scripts/optf-has/has/simulator_script.sh
@@ -30,11 +30,10 @@ cd ${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}
+# clone optf-has project
git clone https://gerrit.onap.org/r/optf/has
-cd has/conductor/conductor/tests/functional/simulators/aaisim/
#echo "i am ${USER} : only non jenkins users may need proxy settings"
if [ ${USER} != 'jenkins' ]; then
@@ -44,6 +43,9 @@ if [ ${USER} != 'jenkins' ]; then
fi
+# prepare aaisim
+cd ${WORK_DIR}/has/conductor/conductor/tests/functional/simulators/aaisim/
+
# check Dockerfile content
cat ./Dockerfile
@@ -58,8 +60,26 @@ echo "AAISIM_IP=${AAISIM_IP}"
${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${AAISIM_IP} 8081
+# prepare multicloudsim
+cd ${WORK_DIR}/has/conductor/conductor/tests/functional/simulators/multicloudsim/
+
+# check Dockerfile content
+cat ./Dockerfile
+
+# build multicloudsim
+docker build -t multicloudsim .
+
+# run multicloudsim
+docker run -d --name multicloudsim -p 8082:8082 multicloudsim
+
+MULTICLOUDSIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' multicloudsim`
+echo "MULTICLOUDSIM_IP=${MULTICLOUDSIM_IP}"
+
+${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${MULTICLOUDSIM_IP} 8082
+
# wait a while before continuing
sleep 2
echo "inspect docker things for tracing purpose"
docker inspect aaisim
+docker inspect multicloudsim
diff --git a/test/csit/scripts/optf-has/has/simulator_teardown_script.sh b/test/csit/scripts/optf-has/has/simulator_teardown_script.sh
index e300a985a..a2edd3328 100755
--- a/test/csit/scripts/optf-has/has/simulator_teardown_script.sh
+++ b/test/csit/scripts/optf-has/has/simulator_teardown_script.sh
@@ -16,6 +16,7 @@
#
echo "optf/has scripts docker containers killing";
docker stop aaisim
+docker stop multicloudsim
docker rm aaisim
-
+docker rm multicloudsim