aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/scripts/optf-has/has/simulator_script.sh
diff options
context:
space:
mode:
authorLeonardo Bellini <leonardo.bellini@att.com>2018-04-12 08:42:51 -0500
committerLeonardo Bellini <leonardo.bellini@att.com>2018-04-12 08:43:06 -0500
commit25c75c732f253aa18b510f62a00eec3e6d7d55bd (patch)
tree9196a12ac6f6b0b1b702bd9834d332523323b503 /test/csit/scripts/optf-has/has/simulator_script.sh
parent47b9fd2fede0ba2840297fcb4dea1e5e5deaa96a (diff)
Add multicloud sim
Issue-ID: OPTFRA-212 Change-Id: Ice56b185857fc88b298c14dcce359289635b1db3 Signed-off-by: Leonardo Bellini <leonardo.bellini@att.com>
Diffstat (limited to 'test/csit/scripts/optf-has/has/simulator_script.sh')
-rwxr-xr-xtest/csit/scripts/optf-has/has/simulator_script.sh24
1 files changed, 22 insertions, 2 deletions
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