Merge "Add CSIT job for azure plugin"
diff --git a/plans/aaf/aafapi/setup.sh b/plans/aaf/aafapi/setup.sh
index dd6cb29..95b35e4 100644
--- a/plans/aaf/aafapi/setup.sh
+++ b/plans/aaf/aafapi/setup.sh
@@ -25,52 +25,169 @@
source ${SCRIPTS}/common_functions.sh
# Clone AAF Authz repo
-mkdir -p $WORKSPACE/archives/aafcsit
-cd $WORKSPACE/archives/aafcsit
-#unset http_proxy https_proxy
+mkdir -p $WORKSPACE/archives/opt
+cd $WORKSPACE/archives/opt
+
+
+HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
+export HOST_IP=${HOST_IP}
+
+CURRENT_DIR=$(pwd) export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+
+NEXUS_USERNAME=anonymous
+NEXUS_PASSWD=anonymous
+NEXUS_DOCKER_REPO=nexus3.onap.org:10001
+AAF_DOCKER_VERSION=2.1.3
+
+docker login -u $NEXUS_USERNAME -p "$NEXUS_PASSWD" $NEXUS_DOCKER_REPO
+
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_config:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_cm:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_fs:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_gui:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_hello:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_locate:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_oauth:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_service:$AAF_DOCKER_VERSION
+
+docker tag $NEXUS_DOCKER_REPO/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION nexus3.onap.org:10003/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION
git clone --depth 1 http://gerrit.onap.org/r/aaf/authz -b master
git pull
-cd $WORKSPACE/archives/aafcsit/authz/auth/auth-service/src/main/resources/docker-compose
+chmod -R 777 authz
+cd authz
+CURRENT_DIR=$(pwd)
+
pwd
-chmod -R 777 $WORKSPACE/archives/aafcsit/authz/auth/auth-service/src/main/resources/docker-compose
+
+if [ ! -e auth/csit/d.props ]; then
+ cp auth/csit/d.props.init auth/csit/d.props
+fi
+
+if [ ! -e auth/docker/d.props ]; then
+ cp auth/docker/d.props.init auth/docker/d.props
+fi
-# start aaf containers with docker compose and configuration from docker-compose.yml
-docker-compose up -d
-export aaf_service=$(get_docker_compose_service aaf_container)
-export cassandra_service=$(get_docker_compose_service cassandra_container)
-# Wait for initialization of Docker container for AAF & Cassandra
-for i in {1..12}; do
+NEXUS_USERNAME=anonymous
+NEXUS_PASSWD=anonymous
+NEXUS_DOCKER_REPO=nexus3.onap.org:10001
+sed -i "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY=$NEXUS_DOCKER_REPO/" auth/csit/d.props
+. auth/csit/d.props
- if [ $(docker inspect --format '{{ .State.Running }}' $aaf_service) ] && \
- [ $(docker inspect --format '{{ .State.Running }}' $cassandra_service) ]
- then
- echo "AAF Service Running"
- break
- else
- echo sleep $i
- sleep $i
- fi
+sed -i "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY=$NEXUS_DOCKER_REPO/" auth/docker/d.props
+. auth/docker/d.props
+
+
+HOSTNAME=`hostname`
+FQDN=aaf.api.simpledemo.onap.org
+HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
+export HOST_IP=${HOST_IP}
+
+
+CASS_IP=`docker inspect aaf_cass | grep '"IPAddress' | head -1 | cut -d '"' -f 4`
+CASS_HOST="cass.aaf.osaaf.org:"$CASS_IP
+
+cd auth/auth-cass/docker
+if [ "`docker container ls | grep aaf_cass`" = "" ]; then
+ # Cassandra Install
+ echo Cassandra Install
+ bash ./dinstall.sh
+fi
+
+CASS_IP=`docker inspect aaf_cass | grep '"IPAddress' | head -1 | cut -d '"' -f 4`
+CASS_HOST="cass.aaf.osaaf.org:"$CASS_IP
+if [ ! -e $WORKSPACE/archives/opt/authz/auth/csit/cass.props ]; then
+ cp $WORKSPACE/archives/opt/authz/auth/csit/cass.props.init $WORKSPACE/archives/opt/authz/auth/csit/cass.props
+fi
+
+sed -i "s/CASS_HOST=.*/CASS_HOST="$CASS_HOST"/g" $WORKSPACE/archives/opt/authz/auth/csit/cass.props
+
+if [ ! -e $WORKSPACE/archives/opt/authz/auth/docker/cass.props ]; then
+ cp $WORKSPACE/archives/opt/authz/auth/docker/cass.props.init $WORKSPACE/archives/opt/authz/auth/docker/cass.props
+fi
+
+sed -i "s/CASS_HOST=.*/CASS_HOST="$CASS_HOST"/g" $WORKSPACE/archives/opt/authz/auth/docker/cass.props
+# TODO Pull from Config Dir
+if [ "$LATITUDE" = "" ]; then
+ LATITUDE=37.781
+ LONGITUDE=-122.261
+ sed -i "s/LATITUDE=.*/LATITUDE=$LATITUDE/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
+ sed -i "s/LONGITUDE=.*/LONGITUDE=$LONGITUDE/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
+fi
+
+sed -i "s/VERSION=.*/VERSION=$VERSION/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
+sed -i "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
+sed -i "s/HOST_IP=.*/HOST_IP=$HOST_IP/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
+sed -i "s/AAF_REGISTER_AS=.*/AAF_REGISTER_AS=$FQDN/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
+
+pwd
+
+cd ../../
+
+pwd
+
+cd csit
+tty
+# Need new Deployment system properties
+bash ./aaf.sh
+
+# run it
+bash ./drun.sh
+
+docker images
+
+docker ps -a
+
+cat /etc/sudoers
+
+docker logs aaf_hello
+
+docker logs aaf_locate
+
+docker logs aaf_cm
+
+docker logs aaf_gui
+
+docker logs aaf_fs
+
+docker logs aaf_oauth
+
+docker logs aaf_service
+
+# Wait for initialization of Docker containers
+for i in {1..50}; do
+ if [ $(docker inspect --format '{{ .State.Running }}' aaf_hello) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' aaf_cm) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' aaf_fs) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' aaf_gui) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' aaf_oauth) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' aaf_locate) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' aaf_service) ]
+ then
+ echo "aaf Service Running"
+ break
+ else
+ echo sleep $i
+ sleep $i
+ fi
done
-AAF_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $aaf_service)
-CASSANDRA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $cassandra_service)
-bypass_ip_adress $AAF_IP
-bypass_ip_adress $CASSANDRA_IP
+AAF_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' aaf_service)
+CASSANDRA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' aaf_cass)
echo AAF_IP=${AAF_IP}
echo CASSANDRA_IP=${CASSANDRA_IP}
-
# Wait for initialization of docker services
for i in {1..12}; do
- curl -sS -m 1 ${AAF_IP}:8101 && break
+ curl -k -u aaf_admin@people.osaaf.org:demo123456! https://${AAF_IP}:8100/authz/nss/org.osaaf.people && break
echo sleep $i
sleep $i
done
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v AAF_IP:${AAF_IP}"
+ROBOT_VARIABLES="-v AAF_IP:${AAF_IP}"
\ No newline at end of file
diff --git a/plans/aaf/aafapi/teardown.sh b/plans/aaf/aafapi/teardown.sh
index 41e0b00..742a1b3 100644
--- a/plans/aaf/aafapi/teardown.sh
+++ b/plans/aaf/aafapi/teardown.sh
@@ -17,8 +17,12 @@
# Modifications copyright (c) 2017 AT&T Intellectual Property
#
-kill-instance.sh $aaf_service
-kill-instance.sh $cassandra_service
-unset aaf_service
-unset cassandra_service
+kill-instance.sh aaf_service
+kill-instance.sh aaf_locate
+kill-instance.sh aaf_hello
+kill-instance.sh aaf_cm
+kill-instance.sh aaf_gui
+kill-instance.sh aaf_fs
+kill-instance.sh aaf_oauth
+kill-instance.sh aaf_cass
diff --git a/plans/dcaegen2/prh-testsuites/setup.sh b/plans/dcaegen2/prh-testsuites/setup.sh
index 00892d6..9040ae6 100644
--- a/plans/dcaegen2/prh-testsuites/setup.sh
+++ b/plans/dcaegen2/prh-testsuites/setup.sh
@@ -3,6 +3,7 @@
source ${SCRIPTS}/common_functions.sh
export PRH_SERVICE="prh"
+export SSL_PRH_SERVICE="ssl_prh"
export DMAAP_SIMULATOR="dmaap_simulator"
export AAI_SIMULATOR="aai_simulator"
@@ -14,23 +15,24 @@
docker-compose up -d --build
PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${PRH_SERVICE})
+SSL_PRH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${SSL_PRH_SERVICE})
DMAAP_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${DMAAP_SIMULATOR})
AAI_SIMULATOR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${AAI_SIMULATOR})
bypass_ip_adress ${PRH_IP}
+bypass_ip_adress ${SSL_PRH_IP}
bypass_ip_adress ${DMAAP_SIMULATOR_IP}
bypass_ip_adress ${AAI_SIMULATOR_IP}
echo PRH_IP=${PRH_IP}
+echo SSL_PRH_IP=${SSL_PRH_IP}
echo DMAAP_SIMULATOR_IP=${DMAAP_SIMULATOR_IP}
echo AAI_SIMULATOR_IP=${AAI_SIMULATOR_IP}
# Wait for initialization of PRH services
-for i in {1..10}; do
- curl -sS -m 1 localhost:8100/heartbeat && break
- echo sleep ${i}
- sleep ${i}
-done
+wait_for_service_init localhost:8100/heartbeat
+wait_for_service_init localhost:8200/heartbeat
# #Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v DMAAP_SIMULATOR:${DMAAP_SIMULATOR_IP}:2222 -v AAI_SIMULATOR:${AAI_SIMULATOR_IP}:3333 -v PRH:${PRH_IP}:8100"
+ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335"
+
diff --git a/plans/dcaegen2/prh-testsuites/teardown.sh b/plans/dcaegen2/prh-testsuites/teardown.sh
index bd1e5ba..45a3b8b 100644
--- a/plans/dcaegen2/prh-testsuites/teardown.sh
+++ b/plans/dcaegen2/prh-testsuites/teardown.sh
@@ -16,5 +16,6 @@
#
kill-instance.sh prh
+kill-instance.sh ssl_prh
kill-instance.sh dmaap_simulator
kill-instance.sh aai_simulator
diff --git a/plans/dmaap-datarouter/dr-suite/setup.sh b/plans/dmaap-datarouter/dr-suite/setup.sh
index 023e265..dedf15b 100755
--- a/plans/dmaap-datarouter/dr-suite/setup.sh
+++ b/plans/dmaap-datarouter/dr-suite/setup.sh
@@ -9,7 +9,7 @@
git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master
cd datarouter
git pull
-cd $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/
+cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources
sed -i 's/10003/10001/g' docker-compose.yml
# start DMaaP DR containers with docker compose and configuration from docker-compose.yml
@@ -17,7 +17,7 @@
docker-compose up -d
# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb
-for i in {1..50}; do
+for i in {1..10}; do
if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \
[ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ] && \
[ $(docker inspect --format '{{ .State.Running }}' mariadb) ]
diff --git a/plans/dmaap-datarouter/dr-suite/teardown.sh b/plans/dmaap-datarouter/dr-suite/teardown.sh
index 033a001..8e56869 100755
--- a/plans/dmaap-datarouter/dr-suite/teardown.sh
+++ b/plans/dmaap-datarouter/dr-suite/teardown.sh
@@ -1,4 +1,4 @@
#!/bin/bash
-cd $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/
+cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources
docker-compose down -v
diff --git a/plans/dmaap/mrpubsub/setup.sh b/plans/dmaap/mrpubsub/setup.sh
index 4a36304..5a670d2 100755
--- a/plans/dmaap/mrpubsub/setup.sh
+++ b/plans/dmaap/mrpubsub/setup.sh
@@ -34,40 +34,12 @@
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
-
-# Wait for initialization of Docker contaienr for DMaaP MR, Kafka and Zookeeper
-for i in {1..50}; do
- if [ $(docker inspect --format '{{ .State.Running }}' dockercompose_dmaap_1) ] && \
- [ $(docker inspect --format '{{ .State.Running }}' dockercompose_zookeeper_1) ] && \
- [ $(docker inspect --format '{{ .State.Running }}' dockercompose_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}}' dockercompose_dmaap_1)
-KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_kafka_1)
-ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_zookeeper_1)
-
-echo DMAAP_MR_IP=${DMAAP_MR_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_host>/zookeeper/' /var/tmp/MsgRtrApi.properties
sed -i -e 's/<kafka_host>:<kafka_port>/kafka:9092/' /var/tmp/MsgRtrApi.properties
+# start DMaaP MR containers with docker compose and configuration from docker-compose.yml
docker-compose build
docker login -u docker -p docker nexus3.onap.org:10001
docker-compose up -d
@@ -90,7 +62,6 @@
KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_kafka_1)
ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dockercompose_zookeeper_1)
-echo "After Kafka and Zookeeper ip addresses updated"
echo DMAAP_MR_IP=${DMAAP_MR_IP}
echo KAFKA_IP=${KAFKA_IP}
echo ZOOKEEPER_IP=${ZOOKEEPER_IP}
diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
index b9085d6..c5567d8 100644
--- a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
+++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
@@ -9,9 +9,9 @@
- "8443:8443"
- "8080:8080"
volumes:
- - ./prov_data/provserver.properties:/opt/app/datartr/etc/provserver.properties
- - ./prov_data/addSubscriber.txt:/opt/app/datartr/addSubscriber.txt
- - ./prov_data/addFeed3.txt:/opt/app/datartr/addFeed3.txt
+ - ../prov_data/provserver.properties:/opt/app/datartr/etc/provserver.properties
+ - ../prov_data/addSubscriber.txt:/opt/app/datartr/addSubscriber.txt
+ - ../prov_data/addFeed3.txt:/opt/app/datartr/addFeed3.txt
depends_on:
mariadb_container:
condition: service_healthy
@@ -29,7 +29,7 @@
- "9443:8443"
- "9090:8080"
volumes:
- - ./node_data/node.properties:/opt/app/datartr/etc/node.properties
+ - ../node_data/node.properties:/opt/app/datartr/etc/node.properties
depends_on:
datarouter-prov:
condition: service_healthy
@@ -41,7 +41,7 @@
ports:
- "7070:7070"
volumes:
- - ./subscriber_data/subscriber.properties:/opt/app/subscriber/etc/subscriber.properties
+ - ../subscriber_data/subscriber.properties:/opt/app/subscriber/etc/subscriber.properties
mariadb_container:
image: mariadb:10.2.14
diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh
index 8dfcfe4..5139cba 100644
--- a/plans/usecases/5G-bulkpm/setup.sh
+++ b/plans/usecases/5G-bulkpm/setup.sh
@@ -6,6 +6,7 @@
mkdir -p $WORKSPACE/archives/dmaapmr
cd $WORKSPACE/archives/dmaapmr
git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master
+sed -i 's/enableCadi: false/enableCadi: "false"/g' /$WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose/docker-compose.yml
cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose
cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/
@@ -53,10 +54,11 @@
mkdir -p $WORKSPACE/archives/dmaapdr
cd $WORKSPACE/archives/dmaapdr
git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master
-cd datarouter
-cd $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/
-rm -rf docker-compose.yml
-cp $WORKSPACE/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/docker-compose.yml
+cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources
+mkdir docker-compose
+cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose
+cp $WORKSPACE/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose/docker-compose.yml
+
docker login -u docker -p docker nexus3.onap.org:10001
docker-compose up -d
docker kill datarouter-prov
@@ -65,7 +67,7 @@
HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
sed -i -e '/DMAAPHOST:/ s/:.*/: '$HOST_IP'/' docker-compose.yml
MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb )
-sed -i 's/datarouter-mariadb/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/prov_data/provserver.properties
+sed -i 's/datarouter-mariadb/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/prov_data/provserver.properties
docker-compose up -d
# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb
diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh
index 0c86623..d72345e 100644
--- a/plans/usecases/5G-bulkpm/teardown.sh
+++ b/plans/usecases/5G-bulkpm/teardown.sh
@@ -1,7 +1,8 @@
#!/bin/bash
echo "Starting teardown script"
-docker exec dfc /bin/sh -c "cat /opt/log/application.log"
-sleep 5
+docker exec dfc /bin/sh -c "less /opt/log/application.log" > /tmp/dfc_docker.log
+cat /tmp/dfc_docker.log
+sleep 3
kill-instance.sh $DMAAP
kill-instance.sh $KAFKA
kill-instance.sh $ZOOKEEPER
diff --git a/plans/vid/healthCheck/setup.sh b/plans/vid/healthCheck/setup.sh
index a0ed226..38dddf5 100644
--- a/plans/vid/healthCheck/setup.sh
+++ b/plans/vid/healthCheck/setup.sh
@@ -32,3 +32,6 @@
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES="-v BE_IP:${BE_IP}"
+
+pip install assertpy
+pip install requests
\ No newline at end of file
diff --git a/plans/vid/healthCheck/teardown.sh b/plans/vid/healthCheck/teardown.sh
index 0138317..14fd052 100644
--- a/plans/vid/healthCheck/teardown.sh
+++ b/plans/vid/healthCheck/teardown.sh
@@ -18,5 +18,6 @@
#
source ${WORKSPACE}/scripts/vid/kill_containers_and_remove_dataFolders.sh
+docker kill so-simulator
# $WORKSPACE/archives/clamp-clone deleted with archives folder when tests starts so we keep it at the end for debugging
diff --git a/plans/vid/healthCheck/testplan.txt b/plans/vid/healthCheck/testplan.txt
index cb5e279..20add7a 100644
--- a/plans/vid/healthCheck/testplan.txt
+++ b/plans/vid/healthCheck/testplan.txt
@@ -2,3 +2,4 @@
# Place the suites in run order.
vid/healthCheck
vid/login
+vid/https-connection
diff --git a/tests/aaf/aafapi/aafapi.robot b/tests/aaf/aafapi/aafapi.robot
index 0f2267b..93b6ce3 100644
--- a/tests/aaf/aafapi/aafapi.robot
+++ b/tests/aaf/aafapi/aafapi.robot
@@ -1,45 +1,39 @@
*** Settings ***
-Suite Setup Run keywords Created header Created session
+Library OperatingSystem
Library RequestsLibrary
+Library requests
Library Collections
+Library String
*** Variables ***
+${TARGETURL_NAMESPACE} https://${AAF_IP}:8100/authz/nss/org.osaaf.people
+${TARGETURL_PERMS} https://${AAF_IP}:8100/authz/perms/user/aaf_admin@people.osaaf.org
+${TARGETURL_ROLES} https://${AAF_IP}:8100/authz/roles/user/aaf_admin@people.osaaf.org
+${username} aaf_admin@people.osaaf.org
+${password} demo123456!
+
*** Test Cases ***
-View information from app
- [Template] Get template
- /authz/nss/org.openecomp
- authz/perms/user/dgl@openecomp.org
- authz/roles/user/dgl@openecomp.org
-
-Cleanup Namespace ( 424 Response - Delete dependencies and try again )
- [Tags] delete
- ${resp}= Delete Request ${suite_aaf_session} authz/ns/org.openecomp.dmaapBC headers=${suite_headers}
- Should Be Equal As Strings ${resp.status_code} 424
- log 'JSON Response Code :'${resp.text}
-
-Add information to app
- [Template] Post template
- authz/ns/org.openecomp.dmaapBC/admin/alexD@openecomp.org 403
- authz/perms/user/m99751@dmaapBC.openecomp.org 406
-
-*** Keywords ***
-Created session
- Create Session aaf_session http://${AAF_IP}:8101
- Set Suite Variable ${suite_aaf_session} aaf_session
-
-Created header
- ${headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json
- Set Suite Variable ${suite_headers} ${headers}
-
-Get template
- [Arguments] ${topic}
- ${resp}= Get Request ${suite_aaf_session} ${topic} headers=${suite_headers}
+View Namesapce
+ [Tags] get
+ CreateSession aaf https://${AAF_IP}:8100
+ &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json
+ ${resp}= Get Request aaf /authz/nss/org.osaaf.people headers=&{headers}
Should Be Equal As Strings ${resp.status_code} 200
- log 'JSON Response Code :'${resp.text}
-
-Post template
- [Arguments] ${topic} ${response_status_code}
- ${resp}= Post Request ${suite_aaf_session} ${topic} headers=${suite_headers}
- Should Be Equal As Strings ${resp.status_code} ${response_status_code}
- log 'JSON Response Code :'${resp.text}
+ log 'JSON Response Code :'${resp.text}
+
+View by User Permission
+ [Tags] get
+ CreateSession aaf https://${AAF_IP}:8100
+ &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json
+ ${resp}= Get Request aaf authz/perms/user/aaf_admin@people.osaaf.org headers=&{headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ log 'JSON Response Code :'${resp.text}
+
+View by User Role
+ [Tags] get
+ CreateSession aaf https://${AAF_IP}:8100
+ &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json
+ ${resp}= Get Request aaf authz/roles/user/aaf_admin@people.osaaf.org headers=&{headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ log 'JSON Response Code :'${resp.text}
\ No newline at end of file
diff --git a/tests/clamp/UIs/01__Create_Holmes_model.robot b/tests/clamp/UIs/01__Create_Holmes_model.robot
index e8b1429..532a5e4 100644
--- a/tests/clamp/UIs/01__Create_Holmes_model.robot
+++ b/tests/clamp/UIs/01__Create_Holmes_model.robot
@@ -88,7 +88,7 @@
Set Selenium Speed ${SELENIUM_SPEED_FAST}
Click Element locator=Save CL
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: save
Set Selenium Speed ${SELENIUM_SPEED_SLOW}
Close Browser
diff --git a/tests/clamp/UIs/02__Create_TCA_model.robot b/tests/clamp/UIs/02__Create_TCA_model.robot
index bdc537e..fa63b3f 100644
--- a/tests/clamp/UIs/02__Create_TCA_model.robot
+++ b/tests/clamp/UIs/02__Create_TCA_model.robot
@@ -88,7 +88,7 @@
Set Selenium Speed ${SELENIUM_SPEED_FAST}
Click Element locator=Save CL
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: save
Set Selenium Speed ${SELENIUM_SPEED_SLOW}
Close Browser
diff --git a/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot b/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot
index de10a27..ebde78b 100644
--- a/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot
+++ b/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot
@@ -51,7 +51,7 @@
Wait Until Element Is Visible locator=Validation Test timeout=60
Click Element locator=Validation Test
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:TEST
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: test
Element Should Contain xpath=//*[@id="status_clds"] DESIGN
Submit Holmes CL
@@ -61,7 +61,7 @@
Click Element locator=Submit
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SUBMIT
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: submit
Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED
Resubmit Holmes CL
@@ -71,7 +71,7 @@
Click Element locator=Resubmit
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:RESUBMIT
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: resubmit
Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED
Deploy Holmes CL
@@ -84,7 +84,7 @@
Click Button locator=Deploy
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:deploy
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: deploy
Element Should Contain xpath=//*[@id="status_clds"] ACTIVE
Update Holmes CL
@@ -94,7 +94,7 @@
Click Element locator=Update
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:UPDATE
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: update
Element Should Contain xpath=//*[@id="status_clds"] ACTIVE
Stop Holmes CL
@@ -104,7 +104,7 @@
Click Element locator=Stop
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:STOP
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: stop
Element Should Contain xpath=//*[@id="status_clds"] STOPPED
Restart Holmes CL
@@ -114,7 +114,7 @@
Click Element locator=Restart
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:RESTART
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: restart
Element Should Contain xpath=//*[@id="status_clds"] ACTIVE
UnDeploy Holmes CL
@@ -124,7 +124,7 @@
Click Element locator=UnDeploy
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:undeploy
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: undeploy
Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED
Close Browser
diff --git a/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot b/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot
index 2b95530..4a83be2 100644
--- a/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot
+++ b/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot
@@ -51,7 +51,7 @@
Wait Until Element Is Visible locator=Validation Test timeout=60
Click Element locator=Validation Test
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:TEST
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: test
Element Should Contain xpath=//*[@id="status_clds"] DESIGN
Submit TCA CL
@@ -61,7 +61,7 @@
Click Element locator=Submit
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SUBMIT
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: submit
Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED
Resubmit TCA CL
@@ -71,7 +71,7 @@
Click Element locator=Resubmit
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:RESUBMIT
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: resubmit
Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED
Deploy TCA CL
@@ -84,7 +84,7 @@
Click Button locator=Deploy
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:deploy
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: deploy
Element Should Contain xpath=//*[@id="status_clds"] ACTIVE
Update TCA CL
@@ -94,7 +94,7 @@
Click Element locator=Update
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:UPDATE
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: update
Element Should Contain xpath=//*[@id="status_clds"] ACTIVE
Stop TCA CL
@@ -104,7 +104,7 @@
Click Element locator=Stop
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:STOP
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: stop
Element Should Contain xpath=//*[@id="status_clds"] STOPPED
Restart TCA CL
@@ -114,7 +114,7 @@
Click Element locator=Restart
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:RESTART
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: restart
Element Should Contain xpath=//*[@id="status_clds"] ACTIVE
UnDeploy TCA CL
@@ -124,7 +124,7 @@
Click Element locator=UnDeploy
Click Button locator=Yes
Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60
- Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:undeploy
+ Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: undeploy
Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED
Close Browser
diff --git a/tests/dcaegen2/prh-testcases/prh_tests.robot b/tests/dcaegen2/prh-testcases/prh_tests.robot
index 6269845..634f37f 100644
--- a/tests/dcaegen2/prh-testcases/prh_tests.robot
+++ b/tests/dcaegen2/prh-testcases/prh_tests.robot
@@ -1,15 +1,16 @@
*** Settings ***
Documentation Integration tests for PRH.
... PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event.
-Suite Setup Run keywords Create header Create sessions
+Suite Setup Run keywords Create header AND Create sessions AND Ensure Container Is Running prh AND Ensure Container Is Exited ssl_prh
+Suite Teardown Ensure Container Is Running ssl_prh
+Test Teardown Reset Simulators
Library resources/PrhLibrary.py
Resource resources/prh_library.robot
Resource ../../common.robot
*** Variables ***
-${DMAAP_SIMULATOR_URL} http://${DMAAP_SIMULATOR}
-${AAI_SIMULATOR_URL} http://${AAI_SIMULATOR}
-${PRH_URL} http://${PRH}
+${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP}
+${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP}
${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json
${EVENT_WITH_IPV4} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json
${EVENT_WITH_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json
@@ -62,6 +63,7 @@
[Tags] PRH AAI
[Timeout] 180s
${data}= Get Data From File ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
- Stop AAI
+ Ensure Container Is Exited aai_simulator
Set event in DMaaP ${data}
Wait Until Keyword Succeeds 100x 300ms Check PRH log java.net.UnknownHostException: aai
+ Ensure Container Is Running aai_simulator
diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
index 656f6fc..dc58936 100644
--- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
+++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
@@ -1,6 +1,7 @@
import json
import docker
+import time
class PrhLibrary(object):
@@ -35,10 +36,45 @@
return correlation_id
@staticmethod
- def stop_aai():
+ def ensure_container_is_running(name):
client = docker.from_env()
- container = client.containers.get('aai_simulator')
- container.stop()
+
+ if not PrhLibrary.is_in_status(client, name, "running"):
+ print ("starting container", name)
+ container = client.containers.get(name)
+ container.start()
+ PrhLibrary.wait_for_status(client, name, "running")
+
+ PrhLibrary.print_status(client)
+
+ @staticmethod
+ def ensure_container_is_exited(name):
+ client = docker.from_env()
+
+ if not PrhLibrary.is_in_status(client, name, "exited"):
+ print ("stopping container", name)
+ container = client.containers.get(name)
+ container.stop()
+ PrhLibrary.wait_for_status(client, name, "exited")
+
+ PrhLibrary.print_status(client)
+
+ @staticmethod
+ def print_status(client):
+ print("containers status")
+ for c in client.containers.list(all=True):
+ print(c.name, " ", c.status)
+
+ @staticmethod
+ def wait_for_status(client, name, status):
+ while not PrhLibrary.is_in_status(client, name, status):
+ print ("waiting for container: ", name, "to be in status: ", status)
+ time.sleep(3)
+
+ @staticmethod
+ def is_in_status(client, name, status):
+ return len(client.containers.list(all=True, filters={"name": "^/"+name+"$", "status": status})) == 1
+
def create_invalid_notification(self, json_file):
return self.create_pnf_ready_notification(json_file).replace("\":", "\": ")\
diff --git a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
index 67921e8..6d64680 100644
--- a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
+++ b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
@@ -24,12 +24,38 @@
- dmaap
- aai
+ ssl_prh:
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest
+ command: >
+ --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap
+ --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2222
+ --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap
+ --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2222
+ --aai.aaiClientConfiguration.aaiHostPortNumber=3333
+ --aai.aaiClientConfiguration.aaiHost=aai
+ --aai.aaiClientConfiguration.aaiProtocol=http
+ entrypoint:
+ - java
+ - -Dspring.profiles.active=dev
+ - -Dlogging.level.org.onap.dcaegen2.services.prh=TRACE
+ - -jar
+ - /opt/prh-app-server.jar
+ ports:
+ - "8200:8100"
+ - "8533:8433"
+ container_name: ssl_prh
+ depends_on:
+ - dmaap
+ - aai
+
dmaap:
build:
context: simulator
dockerfile: DMaaP_simulator
ports:
- "2222:2222"
+ - "2223:2223"
+ - "2224:2224"
container_name: dmaap_simulator
aai:
@@ -38,4 +64,6 @@
dockerfile: AAI_simulator
ports:
- "3333:3333"
+ - "3334:3334"
+ - "3335:3335"
container_name: aai_simulator
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
index 73ce2a2..7175387 100644
--- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot
+++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
@@ -10,10 +10,14 @@
Set Suite Variable ${suite_headers} ${headers}
Create sessions
- Create Session dmaap_session ${DMAAP_SIMULATOR_URL}
- Set Suite Variable ${suite_dmaap_session} dmaap_session
- Create Session aai_session ${AAI_SIMULATOR_URL}
- Set Suite Variable ${suite_aai_session} aai_session
+ Create Session dmaap_setup_session ${DMAAP_SIMULATOR_SETUP_URL}
+ Set Suite Variable ${dmaap_setup_session} dmaap_setup_session
+ Create Session aai_setup_session ${AAI_SIMULATOR_SETUP_URL}
+ Set Suite Variable ${aai_setup_session} aai_setup_session
+
+Reset Simulators
+ Reset AAI simulator
+ Reset DMaaP simulator
Invalid event processing
[Arguments] ${input_invalid_event_in_dmaap}
@@ -21,7 +25,7 @@
${data}= Get Data From File ${input_invalid_event_in_dmaap}
Set event in DMaaP ${data}
${invalid_notification}= Create invalid notification ${data}
- ${notification}= Catenate SEPARATOR= \\n |org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException: Incorrect json, consumerDmaapModel can not be created: ${invalid_notification}
+ ${notification}= Catenate SEPARATOR= \\n |Incorrect json, consumerDmaapModel can not be created: ${invalid_notification}
Wait Until Keyword Succeeds 100x 100ms Check PRH log ${notification}
Valid event processing
@@ -41,16 +45,24 @@
Check PNF_READY notification
[Arguments] ${posted_event_to_dmaap}
- ${resp}= Get Request ${suite_dmaap_session} /events/pnfReady headers=${suite_headers}
+ ${resp}= Get Request ${dmaap_setup_session} /events/pnfReady headers=${suite_headers}
Should Be Equal ${resp.text} ${posted_event_to_dmaap}
Set PNF name in AAI
[Arguments] ${pnfs_name}
${headers}= Create Dictionary Accept=application/json Content-Type=text/html
- ${resp}= Put Request ${suite_aai_session} /set_pnfs headers=${headers} data=${pnfs_name}
+ ${resp}= Put Request ${aai_setup_session} /set_pnfs headers=${headers} data=${pnfs_name}
Should Be Equal As Strings ${resp.status_code} 200
Set event in DMaaP
[Arguments] ${event_in_dmaap}
- ${resp}= Put Request ${suite_dmaap_session} /set_get_event headers=${suite_headers} data=${event_in_dmaap}
+ ${resp}= Put Request ${dmaap_setup_session} /set_get_event headers=${suite_headers} data=${event_in_dmaap}
Should Be Equal As Strings ${resp.status_code} 200
+
+Reset AAI simulator
+ ${resp}= Post Request ${aai_setup_session} /reset
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Reset DMaaP simulator
+ ${resp}= Post Request ${dmaap_setup_session} /reset
+ Should Be Equal As Strings ${resp.status_code} 200
\ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
index c57903c..76823b0 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
@@ -1,12 +1,14 @@
+import _thread
+import re
+import ssl
+import time
from http.server import BaseHTTPRequestHandler
from http.server import HTTPServer
-import re
-import sys
pnfs = 'Empty'
-class AAIHandler(BaseHTTPRequestHandler):
+class AAISetup(BaseHTTPRequestHandler):
def do_PUT(self):
if re.search('/set_pnfs', self.path):
@@ -14,9 +16,19 @@
content_length = int(self.headers['Content-Length'])
pnfs = self.rfile.read(content_length)
_header_200_and_json(self)
-
+
return
+ def do_POST(self):
+ if re.search('/reset', self.path):
+ global pnfs
+ pnfs = 'Empty'
+ _header_200_and_json(self)
+
+ return
+
+class AAIHandler(BaseHTTPRequestHandler):
+
def do_PATCH(self):
pnfs_name = '/aai/v12/network/pnfs/pnf/' + pnfs.decode()
if re.search('wrong_aai_record', self.path):
@@ -35,21 +47,30 @@
self.end_headers()
-def _main_(handler_class=AAIHandler, server_class=HTTPServer, protocol="HTTP/1.0"):
-
- if sys.argv[1:]:
- port = int(sys.argv[1])
- else:
- port = 3333
-
- server_address = ('', port)
-
+def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"):
handler_class.protocol_version = protocol
- httpd = server_class(server_address, handler_class)
+ _thread.start_new_thread(_init_http_endpoints, (3333, AAIHandler))
+ _thread.start_new_thread(_init_https_endpoints, (3334, AAIHandler))
+ _thread.start_new_thread(_init_http_endpoints, (3335, AAISetup))
+ while 1:
+ time.sleep(10)
- sa = httpd.socket.getsockname()
- print("Serving HTTP on", sa[0], "port", sa[1], "...")
- httpd.serve_forever()
+
+def _init_http_endpoints(port, handler_class, server_class=HTTPServer):
+ server = server_class(('', port), handler_class)
+ sa = server.socket.getsockname()
+ print("Serving HTTP on", sa[0], "port", sa[1], "for", handler_class, "...")
+ server.serve_forever()
+
+
+def _init_https_endpoints(port, handler_class, server_class=HTTPServer):
+ server = server_class(('', port), handler_class)
+ server.socket = ssl.wrap_socket(server.socket,
+ keyfile="certs/server.key", certfile="certs/server.crt",
+ ca_certs="certs/client.crt", server_side=True)
+ sa = server.socket.getsockname()
+ print("Serving HTTPS on", sa[0], "port", sa[1], "for", handler_class, "...")
+ server.serve_forever()
if __name__ == '__main__':
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator b/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator
index 89a266e..7364769 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI_simulator
@@ -1,15 +1,6 @@
-FROM alpine:3.8
-
-RUN apk add --no-cache python3 && \
- python3 -m ensurepip && \
- rm -r /usr/lib/python*/ensurepip && \
- pip3 install --upgrade pip setuptools && \
- if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
- if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
- rm -r /root/.cache
+FROM python:3-alpine
ADD AAI.py /
-
-EXPOSE 3333
+COPY certs/* /certs/
CMD [ "python", "./AAI.py" ]
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
index 96e22a1..3ff951e 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
@@ -1,13 +1,15 @@
+import _thread
+import re
+import ssl
+import time
from http.server import BaseHTTPRequestHandler
from http.server import HTTPServer
-import re
-import sys
posted_event_from_prh = b'Empty'
-received_event_to_get_method = 'Empty'
+received_event_to_get_method = b'Empty'
-class DMaaPHandler(BaseHTTPRequestHandler):
+class DmaapSetup(BaseHTTPRequestHandler):
def do_PUT(self):
if re.search('/set_get_event', self.path):
@@ -15,25 +17,42 @@
content_length = int(self.headers['Content-Length'])
received_event_to_get_method = self.rfile.read(content_length)
_header_200_and_json(self)
-
+
return
+ def do_GET(self):
+ if re.search('/events/pnfReady', self.path):
+ _header_200_and_json(self)
+ self.wfile.write(posted_event_from_prh)
+
+ return
+
+ def do_POST(self):
+ if re.search('/reset', self.path):
+ global posted_event_from_prh
+ global received_event_to_get_method
+ posted_event_from_prh = b'Empty'
+ received_event_to_get_method = b'Empty'
+ _header_200_and_json(self)
+
+ return
+
+
+class DMaaPHandler(BaseHTTPRequestHandler):
+
def do_POST(self):
if re.search('/events/unauthenticated.PNF_READY', self.path):
global posted_event_from_prh
content_length = int(self.headers['Content-Length'])
posted_event_from_prh = self.rfile.read(content_length)
_header_200_and_json(self)
-
+
return
def do_GET(self):
if re.search('/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12', self.path):
_header_200_and_json(self)
self.wfile.write(received_event_to_get_method)
- elif re.search('/events/pnfReady', self.path):
- _header_200_and_json(self)
- self.wfile.write(posted_event_from_prh)
return
@@ -44,21 +63,30 @@
self.end_headers()
-def _main_(handler_class=DMaaPHandler, server_class=HTTPServer, protocol="HTTP/1.0"):
-
- if sys.argv[1:]:
- port = int(sys.argv[1])
- else:
- port = 2222
-
- server_address = ('', port)
-
+def _main_(handler_class=DMaaPHandler, protocol="HTTP/1.0"):
handler_class.protocol_version = protocol
- httpd = server_class(server_address, handler_class)
+ _thread.start_new_thread(_init_http_endpoints, (2222, DMaaPHandler))
+ _thread.start_new_thread(_init_https_endpoints, (2223, DMaaPHandler))
+ _thread.start_new_thread(_init_http_endpoints, (2224, DmaapSetup))
+ while 1:
+ time.sleep(10)
- sa = httpd.socket.getsockname()
- print("Serving HTTP on", sa[0], "port", sa[1], "...")
- httpd.serve_forever()
+
+def _init_http_endpoints(port, handler_class, server_class=HTTPServer):
+ server = server_class(('', port), handler_class)
+ sa = server.socket.getsockname()
+ print("Serving HTTP on", sa[0], "port", sa[1], "for", handler_class, "...")
+ server.serve_forever()
+
+
+def _init_https_endpoints(port, handler_class, server_class=HTTPServer):
+ server = server_class(('', port), handler_class)
+ server.socket = ssl.wrap_socket(server.socket,
+ keyfile="certs/server.key", certfile="certs/server.crt",
+ ca_certs="certs/client.crt", server_side=True)
+ sa = server.socket.getsockname()
+ print("Serving HTTPS on", sa[0], "port", sa[1], "for", handler_class, "...")
+ server.serve_forever()
if __name__ == '__main__':
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator
index 9cf21dc..40e1af0 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP_simulator
@@ -1,15 +1,6 @@
-FROM alpine:3.8
-
-RUN apk add --no-cache python3 && \
- python3 -m ensurepip && \
- rm -r /usr/lib/python*/ensurepip && \
- pip3 install --upgrade pip setuptools && \
- if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
- if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
- rm -r /root/.cache
+FROM python:3-alpine
ADD DMaaP.py /
-
-EXPOSE 2222
+COPY certs/* /certs/
CMD [ "python", "./DMaaP.py" ]
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.crt b/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.crt
new file mode 100644
index 0000000..3512368
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.crt
@@ -0,0 +1,18 @@
+-----BEGIN CERTIFICATE-----
+MIIC+DCCAeCgAwIBAgIJAKCcXOpDPyjQMA0GCSqGSIb3DQEBCwUAMBExDzANBgNV
+BAMMBmNsaWVudDAeFw0xODEwMTgwNzU1NDlaFw0zODEwMTMwNzU1NDlaMBExDzAN
+BgNVBAMMBmNsaWVudDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM/V
+zZE2xloz06wO+Fj6GA26pzEFhTHpMOG20woWIkzL7N/TuTyPi24ZqzhyFvGmn71K
+eDC14zYeZVTj+8OoJKRSPYcPiyGqMK46hkUNJ9LjVCLGBhqqgTGYd4YTn2FeTAiR
+2/rduOD4N7AzYiJlZHcd1zls+QQOyQkFcuO4xKQiwjyC2djDx7W9qUsPZVha/9v9
+u7PcPZ7LnsAPdDSaL/bBz5aYFTX8IMo1nBIujpETCPyQoNc3h+lMilFhY4A1Nj0F
+hkwF7GB9Xh7aLC2rEobVbn6s6biUq9+hg7OgTYZtQX7/SfD+6nioXSHMJNGYm7j9
+Z4Yf26BfQStd0cL9GwkCAwEAAaNTMFEwHQYDVR0OBBYEFK+hMFIwHNrVNqudmcQ+
+sLABdVMuMB8GA1UdIwQYMBaAFK+hMFIwHNrVNqudmcQ+sLABdVMuMA8GA1UdEwEB
+/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAMzawFZ8j99zdWhavqBpTeulsisL
+IthHkRT8sIBnAkimS5Bujjix8NHsaqUc/1d56KPerDWJ4tXx7Sd4+F7aNIpIkp+1
+lFxKLPU4Fnsbq/IEWAJOuVOWZ0Lug/8UcJbp0Ma/ac1t76uHBQ/mmiJUu/22FUrA
+X0Udg3q/xAT2H0QLLK/s2jfR511rNOY5u9zcdKArmHoN13ZuVeZ6HMVO6U78rqZk
+TTbdhO9BieARIhoPC+/G9eTV7uJyzi4n60HDpxA0j+ZsH5L6CdU5M3XATMCxpxm4
+xAnHVb0fcudNzIsqZlP0jrJdrNOKkX8qij1poKvvJ2Ap/vKtZZVPL76GHCk=
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.key b/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.key
new file mode 100644
index 0000000..17eebd2
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAz9XNkTbGWjPTrA74WPoYDbqnMQWFMekw4bbTChYiTMvs39O5
+PI+LbhmrOHIW8aafvUp4MLXjNh5lVOP7w6gkpFI9hw+LIaowrjqGRQ0n0uNUIsYG
+GqqBMZh3hhOfYV5MCJHb+t244Pg3sDNiImVkdx3XOWz5BA7JCQVy47jEpCLCPILZ
+2MPHtb2pSw9lWFr/2/27s9w9nsuewA90NJov9sHPlpgVNfwgyjWcEi6OkRMI/JCg
+1zeH6UyKUWFjgDU2PQWGTAXsYH1eHtosLasShtVufqzpuJSr36GDs6BNhm1Bfv9J
+8P7qeKhdIcwk0ZibuP1nhh/boF9BK13Rwv0bCQIDAQABAoIBAA2Fs6JHFhC4XoVL
+VA01+GqsQkSGP2xH585HvuNhHUox2m+Vru+px0CamvFJOwTt+mauebNxoh7bS2yC
+iNbqEbg/QZGQCVVfZVtwo1vKx1SJRegdSjhh75XyfZRTooMLR5cnJlDkLCs2+yiT
+r0bdofO+FUq/NFR3Qc08dYUreF/VZQzGT86vgpxTqFE1xdVX3mL5X/RFYED25s/n
+nw+v8uRVcb21OGsEnHar4wV5VyyG6g0nZGk4uAfLGvvYKwcmMTtKulYtqnZ+0RNI
+Iqu3siXOq6BcKly+TzKZ6kpqn+hsD9V9plQ45yPOswboToOnOBanZUxsEJ1mT5lO
+wbpqYoECgYEA9IbxrWMri2b5kXz8o6O33RsG6qLrkaOU8M4PJOvxn7LaD9WLbsZZ
+J6vv6eXAbHqF1ZfXv52sSZu9Bug3x8cv0ItOiOCPf5T6nTrdLjnCthivNUfLHVJ8
+nonzA2YJWaYe6u5sFtUSifQaHnrAMKqoX2D1qY7SD1QWWbSoK7cRxY0CgYEA2ZYl
+T7OYKGKP8Ra2mLFpwY/84n+Rx/A3p0rzZ1cge9Xldo8pGbGduI+aII+XKPC4/lDx
+dhS7rbOtIA08aF8htkunSErNUiDtZ+i386KYR3JsQuDruKbk51YYWpRhBPvs0mOT
+7lBSeqbJZEJ2vDMU/oNJyUOW+0eL2Jjo28URdm0CgYEA2yucsPFDVVZ9+LZTZ4TV
+xvtzjplqlYZOeCvpjQlh7+cJ5slbiXWE8bb9eeLxPwnurUzFFz2G8A8ENY2seYcC
+R2Slhq/oTs1Ed+sL1mP1LuwfFp1745NMmXlB9NjfJphr+9ypyyk9zaKaSplxa+16
+rsqkRk753r1arxrq5QvYhP0CgYB8nJW/wI4qys++9hAbALgdh7X/janSxMtKvw0J
+KQfMhCKHNNQICAXY9j0B2tpqMvrvgzHWO2eEwnsq+QmYiKsI+OjT6SsPlxX/xXLc
+UEk/2dMQtjmppcNAjbki3wl1TkZB8498E3o5Dh4Wkk3n2KV0YYI3hsMII+B+aowp
+mQI4PQKBgH8MZj1WDB05mgxC3jK6wNEM+0V08xL8sooYCEST11uZ1Pj7vZmRNjWn
+/4pUrIOp1P9EnrS9RsWlVgRKUo6+yvPqdmenq5k7w7dSSowmAnW68rUV+HHuueXQ
+9V98fkg3hAnI7ioV19bDaL6EtMvYLg+xSq2GmKvUqRcBRmlObW1L
+-----END RSA PRIVATE KEY-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.crt b/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.crt
new file mode 100644
index 0000000..e154aee
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.crt
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIC/jCCAeagAwIBAgIJALu8otyWP3z1MA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
+BAMMCWxvY2FsaG9zdDAeFw0xODEwMTgwNzU1MzNaFw0zODEwMTMwNzU1MzNaMBQx
+EjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAMILA9ZYh8vo1ui3mNYtF185/qauRgJ5EP1ROqD445hX5T014BrlWzpsRD6B
+/uGCxSwNnIE+tGChk4zQBnOSC2Pah2QjMGWUPjgWXgnL4vp1Mb4rKrVNQsaqMi7I
+8aCdbO66rZirK04RD2hp09Vy7KGsK6TKjAnQn6UJJD2agHZtcMfQ5Kf/B0yZvlb6
+T3Yet+gefXH/iCZ+bzz4P1Ij6zetetw5S++SzsgxWJECfkk3ISkqu9DBLjfzacKz
+ixq+twq5f+kzg3zhUBtpJ4BvC9HKiJ5ZTi/NjapmgJG1WEyhI4cVcpVwoBylJwpV
+TyuVaSjVOoqprnvYre6ch9vz2JUCAwEAAaNTMFEwHQYDVR0OBBYEFGG+MZfFt5OH
+Kxr4GyBu7mYArZ5aMB8GA1UdIwQYMBaAFGG+MZfFt5OHKxr4GyBu7mYArZ5aMA8G
+A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACoxYrR17mEPOhOxxyRp
+ulAxTIbkhiskAI1YF4XRK3FtuWhiuivSyTWmNYfbuhl01U75tyQjd9TCKYKZsaM7
+MaaYWFaSlynFx9SZdKWMPv84re7xdUIzhH9dH+YsGij/ocdedfg/kyhdto88zB5C
++BGEopkOnXEZGZnuhgWVlwT9Aw4MCt9P/+3baJMU0MOSjLX+CnJZ7TsXpnupH3ej
+kTPJaooiVig7V84e2jmLx4iuxDgtDSnxYN9fZeDW0SJq+7b7VlyJ9QIpQYt3kUIn
+FMAtnxv6FEeMi6k5hUXmRg/XKt/K0WQ2dopwq9XQKMiyHlA4rIJ1Ar3jX3trDyCh
+qBU=
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.key b/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.key
new file mode 100644
index 0000000..e86fdc4
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEAwgsD1liHy+jW6LeY1i0XXzn+pq5GAnkQ/VE6oPjjmFflPTXg
+GuVbOmxEPoH+4YLFLA2cgT60YKGTjNAGc5ILY9qHZCMwZZQ+OBZeCcvi+nUxvisq
+tU1CxqoyLsjxoJ1s7rqtmKsrThEPaGnT1XLsoawrpMqMCdCfpQkkPZqAdm1wx9Dk
+p/8HTJm+VvpPdh636B59cf+IJn5vPPg/UiPrN6163DlL75LOyDFYkQJ+STchKSq7
+0MEuN/NpwrOLGr63Crl/6TODfOFQG2kngG8L0cqInllOL82NqmaAkbVYTKEjhxVy
+lXCgHKUnClVPK5VpKNU6iqmue9it7pyH2/PYlQIDAQABAoIBAAlOS+3QqxqNXRkm
+DO9glDld56eIvhTKR5VOevhTV17sADNyTQAdNcXUgWVaCKY6Bki5kmLkZfQoa5Ia
+O+T5ARDV3x5fTafhdyZrdDEWFRmb2znaih7NyMEMUoHJ40SnqBy+2Sp0Mwx4ZvvD
+74PSEiUiw6kQiazC05UvngxSR4zmV1pimJAKmKxQynWAeAAFZNl7CDG+aeoaI483
+ipaPaxNc/2i1bi+dva9Hsc1q5C4+hQZIbCdHpbZfZj5bA36vyBo/NcRcicomfuVh
+IBFRM8J7jaet68KWqNE3db+ji3xwHwJoypwF/yKtmFueWByv/HrZnaHS2gnKQQ4K
+lYbW24ECgYEA5UiqxCeZGiWW+QU3X99hUkE3FlRRp6CWlw58ffn2Ztc5uZsXf0is
+EsNHT47jIKFUqkHxBHCX4vSuAcphT/FGeXo6QkRhcSfrlQrifFGfTMbNGbrGnOZU
+FVjknQUig3GLfm99Ed4jpyf7ps+iqIXQXlt2F2FRWygnqOVmK2AA2KECgYEA2Kcl
+PDlxBuXk0LLbVIxIMymkZS3re1Gw+WJw21GpRUUpAGcZ6EKPUC0zlB4A75rLoucb
+i0DmgUNX7T5ZFczrRCjduP7MhUjM64m5Ib0/Pwci46umnLhLf6i3+Z0/QLK3iGDV
+8/6FUtKOX/UU5xKUe96MysBlnPzXUG92arQed3UCgYBHB+cXU6kjp4eI5+vKwLo2
+sEtvmHmfc6mTbIJ2yIxkOcMBVCHIZewg9+xMoliM0E4ZXMpc9MCpJ+IMXfUdvgJ2
+Ob54rxR86MAb8T5PAz5Vm7UIhotnKhfccSiJ2IBjtjZf2gwmD+p9q25TtDmQ+bue
+r7j670Qz+FGpCkBHqbs5YQKBgEj9Lqc2duSrCMZiq0+1nxFVgyPvL3kxUV0DFCBf
+R5alsSWIlorP+bY6NDk/TnNqhBZSo83rRHzh8jpkGeElU1F4LxKHDOIOX7Muh+dc
++XTDc7ad+pir4guVDL4Ugt3KF9jjPtFfuwznEL41NCCQ+uMsW+RmoxUbfXKEyrEy
+E12NAoGAGBeR3ghlmhyasnbe7TyJbCAPU/Yut1NI4Rgb4sZcN8gwI5/wkRk0QryQ
+eo9th+0e98Y8Rxa0t9k0dkmGOM9WwVdBHZCyzgs6ihLzgy7nZAGi86+pe4BiqDmb
+NyfiL8LW+EADax5koWLQpPqrVQ66Gy2BAx4/ODBNzr3ox64jQpE=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/dcaegen2/prh-testcases/ssl_prh_tests.robot b/tests/dcaegen2/prh-testcases/ssl_prh_tests.robot
new file mode 100644
index 0000000..49d2c45
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/ssl_prh_tests.robot
@@ -0,0 +1,27 @@
+*** Settings ***
+Documentation Integration tests for PRH.
+... PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event. PRH comunicates with AAI and DMaaP through SSL
+Suite Setup Run keywords Create header AND Create sessions AND Ensure Container Is Running ssl_prh AND Ensure Container Is Exited prh
+Suite Teardown Ensure Container Is Running prh
+Test Teardown Reset Simulators
+Library resources/PrhLibrary.py
+Resource resources/prh_library.robot
+Resource ../../common.robot
+
+*** Variables ***
+${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP}
+${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP}
+${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_all_fields.json
+${EVENT_WITH_IPV4} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV4.json
+${EVENT_WITH_IPV6} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_with_IPV6.json
+${EVENT_WITHOUT_IPV6_FILED} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/event_without_IPV6_field.json
+
+*** Test Cases ***
+Valid DMaaP event can be converted to PNF_READY notification with ssl connection to AAI
+ [Documentation] PRH get valid event from DMaaP with required fields - PRH produce PNF_READY notification
+ [Tags] PRH Valid event
+ [Template] Valid event processing
+ ${EVENT_WITH_ALL_VALID_REQUIRED_FIELDS}
+ ${EVENT_WITH_IPV4}
+ ${EVENT_WITH_IPV6}
+ ${EVENT_WITHOUT_IPV6_FILED}
diff --git a/tests/vid/https-connection/__init__.robot b/tests/vid/https-connection/__init__.robot
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/vid/https-connection/__init__.robot
diff --git a/tests/vid/https-connection/keywords.py b/tests/vid/https-connection/keywords.py
new file mode 100755
index 0000000..85bca10
--- /dev/null
+++ b/tests/vid/https-connection/keywords.py
@@ -0,0 +1,125 @@
+import ast
+
+import requests
+from assertpy import assert_that
+from robot.api import logger
+from robot.api.deco import keyword
+
+JSESSIONID_COOKIE = "JSESSIONID"
+
+_vid_to_so_request_details = {
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RegionOne",
+ "tenantId": "982c540f6e69488eb6be5664255e00c0"
+ },
+ "modelInfo": {
+ "modelInvariantId": "41b3c314-dfab-4501-9c5e-1c9fe5d8e151",
+ "modelName": "SoWs1..base_ws..module-0",
+ "modelType": "vfModule",
+ "modelVersion": "1",
+ "modelVersionId": "7ea96ae9-9eac-4eaa-882e-077478a6c44a"
+ },
+ "relatedInstanceList": [{
+ "relatedInstance": {
+ "instanceId": "0d8a98d8-d7ca-4c26-b7ab-81d3729e3b6c",
+ "modelInfo": {
+ "modelInvariantId": "a4413616-cf96-4615-a94e-0dc5a6a65430",
+ "modelName": "SC_WS_SW_2",
+ "modelType": "service",
+ "modelVersion": "3.0",
+ "modelVersionId": "0fdaaf44-3c6c-4d81-9c57-b2ce7224dbb9"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "61c19619-2714-46f8-90c9-39734e4f545f",
+ "modelInfo": {
+ "modelCustomizationName": "SO_WS_1 0",
+ "modelInvariantId": "3b2c9dcb-6ef8-4c3c-8d5b-43d5776f7110",
+ "modelName": "SO_WS_1",
+ "modelType": "vnf",
+ "modelVersion": "1.0",
+ "modelVersionId": "0fdaaf44-3c6c-4d81-9c57-b2ce7224dbb9"
+ }
+ }
+ }
+ ],
+ "requestInfo": {
+ "source": "VID",
+ "suppressRollback": False,
+ "requestorId": "az2016",
+ "instanceName": "SC_WS_VNF_1_2"
+ },
+ "requestParameters": {
+ "controllerType": "SDNC",
+ "userParams": []
+ }
+
+ }
+}
+
+_expected_so_response = {
+ "status": 202,
+ "entity": {
+ "requestReferences": {
+ "instanceId": "fffcbb6c-1983-42df-9ca8-89ae8b3a46c1",
+ "requestId": "b2197d7e-3a7d-410e-82ba-7b7e8191bc46"
+ }
+ }
+}
+
+
+def _extract_cookie_from_headers(headers):
+ for i in headers["Set-Cookie"].split(";"):
+ if JSESSIONID_COOKIE in i:
+ return i
+ raise RuntimeError("No cookie when logging in to VID")
+
+
+def _log_request(response):
+ logger.console(
+ "\n=========\n"
+ "Performing request to : {} \nBODY: {}\nHEADERS: {}"
+ .format(str(response.request.url), str(response.request.body), str(response.request.headers)))
+ logger.console(
+ "---------\n"
+ "Got response\n BODY: {} \n HEADERS: {}"
+ "\n=========\n".format(str(response.headers), str(response.content)))
+
+
+@keyword('Login To VID')
+def login_to_vid():
+ headers = {'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0',
+ 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
+ 'Accept-Language': 'pl,en-US;q=0.7,en;q=0.3',
+ 'Accept-Encoding': 'gzip, deflate', 'Referer': 'http://localhost:8080/vid/login.htm',
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ 'Content-Length': '36',
+ 'Cookie': 'JSESSIONID=1B4AF817AA4BCB87C07BB5B49EFE8526',
+ 'Connection': 'keep-alive',
+ 'Upgrade-Insecure-Requests': '1'}
+ response = requests.post("https://localhost:8443/vid/login_external", data="loginId=demo&password=Kp8bJ4SXszM0WX",
+ headers=headers, allow_redirects=False, verify=False)
+ logger.console("Performing login")
+ _log_request(response)
+ return _extract_cookie_from_headers(response.headers)
+
+
+@keyword('Send create VF module instance request to VID')
+def send_create_vfmodule_instance_request_to_vid(jsession_cookie):
+ response = requests.post(
+ "https://localhost:8443/vid/mso/mso_create_vfmodule_instance/0d8a98d8-d7ca-4c26-b7ab-81d3729e3b6c/vnfs/61c19619-2714-46f8-90c9-39734e4f545f ",
+ headers={"Cookie": jsession_cookie}, json=_vid_to_so_request_details, verify=False)
+ content = ast.literal_eval(response.content)
+ logger.console("Triggering VF module instance creation")
+ _log_request(response)
+ return content
+
+
+@keyword('Response should contain valid entity')
+def expect_response_from_so_was_correctly_propageted(content):
+ logger.console("\nActual entity" + str(content['entity']))
+ logger.console("Expected entity" + str(_expected_so_response))
+ assert_that(content['entity']).is_equal_to(_expected_so_response)
diff --git a/tests/vid/https-connection/test1.robot b/tests/vid/https-connection/test1.robot
new file mode 100644
index 0000000..2173757
--- /dev/null
+++ b/tests/vid/https-connection/test1.robot
@@ -0,0 +1,16 @@
+*** Settings ***
+Library keywords.py
+Library Collections
+
+*** Variables ***
+
+
+*** Test Cases ***
+Connection to SO is performed using HTTPS
+ ${cookies}= Login To VID
+ ${response}= Send create VF module instance request to VID ${cookies}
+ Dictionary Should Contain Item ${response} status 200
+ Response should contain valid entity ${response}
+
+
+*** Keywords ***
diff --git a/tests/vid/resources/docker-compose.yml b/tests/vid/resources/docker-compose.yml
index 879c23d..4aecb6a 100644
--- a/tests/vid/resources/docker-compose.yml
+++ b/tests/vid/resources/docker-compose.yml
@@ -3,32 +3,32 @@
vid-server:
image: nexus3.onap.org:10001/onap/vid:3.0-STAGING-latest
environment:
- - VID_MYSQL_DBNAME=vid_openecomp_epsdk
- - VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
- - ASDC_CLIENT_REST_HOST=localhost
- - ASDC_CLIENT_REST_PORT=8443
+ - VID_MYSQL_DBNAME=vid_openecomp_epsdk
+ - VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ - VID_MSO_SERVER_URL=https://so-simulator:8443
ports:
- - "8080:8080"
+ - "8080:8080"
+ - "8443:8443"
container_name: vid-server
links:
- - vid-mariadb:vid-mariadb-docker-instance
+ - vid-mariadb:vid-mariadb-docker-instance
vid-mariadb:
image: mariadb:10
environment:
- - MYSQL_DATABASE=vid_openecomp_epsdk
- - MYSQL_USER=vidadmin
- - MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
- - MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY
+ - MYSQL_DATABASE=vid_openecomp_epsdk
+ - MYSQL_USER=vidadmin
+ - MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ - MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY
container_name: vid-mariadb
volumes:
- - ${WORKSPACE}/data/clone/vid/lf_config/vid-my.cnf:/etc/mysql/my.cnf
- - /var/lib/mysql
+ - ${WORKSPACE}/data/clone/vid/lf_config/vid-my.cnf:/etc/mysql/my.cnf
+ - /var/lib/mysql
- sdc_simulator:
+ so-simulator:
build:
context: simulators
- dockerfile: SDC_simulator
+ dockerfile: SO-simulator
ports:
- - "8443:8443"
- container_name: sdc_simulator
\ No newline at end of file
+ - "8444:8443"
+ container_name: so-simulator
\ No newline at end of file
diff --git a/tests/vid/resources/simulators/SDC.py b/tests/vid/resources/simulators/SDC.py
deleted file mode 100644
index e99a0bd..0000000
--- a/tests/vid/resources/simulators/SDC.py
+++ /dev/null
@@ -1,37 +0,0 @@
-import ssl
-from http.server import BaseHTTPRequestHandler, HTTPServer
-
-from sys import argv
-
-DEFAULT_PORT = 8443
-
-
-class SDCHandler(BaseHTTPRequestHandler):
-
- def __init__(self, request, client_address, server):
- self.response_on_get = self._read_on_get_response()
- super().__init__(request, client_address, server)
-
- def do_GET(self):
- self.send_response(200)
- self._set_headers()
-
- self.wfile.write(self.response_on_get.encode("utf-8"))
- return
-
- def _set_headers(self):
- self.send_header('Content-Type', 'application/json')
- self.end_headers()
-
- @staticmethod
- def _read_on_get_response():
- with open('sdc_get_response.json', 'r') as file:
- return file.read()
-
-
-if __name__ == '__main__':
- SDCHandler.protocol_version = "HTTP/1.1"
-
- httpd = HTTPServer(('', DEFAULT_PORT), SDCHandler)
- httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True, certfile='cert.pem', keyfile='key.pem')
- httpd.serve_forever()
diff --git a/tests/vid/resources/simulators/SDC_simulator b/tests/vid/resources/simulators/SDC_simulator
deleted file mode 100644
index c099787..0000000
--- a/tests/vid/resources/simulators/SDC_simulator
+++ /dev/null
@@ -1,15 +0,0 @@
-FROM alpine:latest
-
-RUN apk add --no-cache python3 && \
- python3 -m ensurepip && \
- rm -r /usr/lib/python*/ensurepip && \
- pip3 install --upgrade pip setuptools && \
- if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
- if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
- rm -r /root/.cache
-
-ADD SDC.py /
-
-EXPOSE 8443
-
-CMD [ "python", "./SDC.py" ]
diff --git a/tests/vid/resources/simulators/SO-simulator b/tests/vid/resources/simulators/SO-simulator
new file mode 100644
index 0000000..5458766
--- /dev/null
+++ b/tests/vid/resources/simulators/SO-simulator
@@ -0,0 +1,8 @@
+FROM frolvlad/alpine-python3
+
+ADD SO.py /
+ADD so_post_response.json /
+
+EXPOSE 8443
+
+CMD [ "python", "./SO.py" ]
\ No newline at end of file
diff --git a/tests/vid/resources/simulators/SO.py b/tests/vid/resources/simulators/SO.py
new file mode 100644
index 0000000..edc15f6
--- /dev/null
+++ b/tests/vid/resources/simulators/SO.py
@@ -0,0 +1,45 @@
+import logging
+from http.server import BaseHTTPRequestHandler, HTTPServer
+
+DEFAULT_PORT = 8443
+
+
+class SOHandler(BaseHTTPRequestHandler):
+
+ def __init__(self, request, client_address, server):
+ self.response_on_get = self._read_on_get_response()
+ super().__init__(request, client_address, server)
+
+ def do_POST(self):
+ logging.info('POST called')
+ self.send_response(200)
+ self._set_headers()
+
+ self.wfile.write(self.response_on_get.encode("utf-8"))
+ return
+
+ def do_GET(self):
+ logging.info('GET called')
+ self.send_response(200)
+ self._set_headers()
+
+ self.wfile.write(self.response_on_get.encode("utf-8"))
+ return
+
+ def _set_headers(self):
+ self.send_header('Content-Type', 'application/json')
+ self.end_headers()
+
+ @staticmethod
+ def _read_on_get_response():
+ with open('so_post_response.json', 'r') as file:
+ return file.read()
+
+
+if __name__ == '__main__':
+ logging.basicConfig(filename='output.log', level=logging.INFO)
+ SOHandler.protocol_version = "HTTP/1.0"
+
+ httpd = HTTPServer(('', DEFAULT_PORT), SOHandler)
+ logging.info("serving on: " + str(httpd.socket.getsockname()))
+ httpd.serve_forever()
diff --git a/tests/vid/resources/simulators/cert.pem b/tests/vid/resources/simulators/cert.pem
deleted file mode 100644
index cea1e37..0000000
--- a/tests/vid/resources/simulators/cert.pem
+++ /dev/null
@@ -1,74 +0,0 @@
-Bag Attributes
- friendlyName: 1
- localKeyID: 54 69 6D 65 20 31 35 33 35 36 31 39 34 30 35 39 30 38
-subject=/C=US/ST=Michigan/L=Southfield/O=ATT Services, Inc./OU=ASDC/CN=mtanjv9sdcf51.aic.cip.att.com
-issuer=/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4
------BEGIN CERTIFICATE-----
-MIIGDzCCBPegAwIBAgIQfZLBdhhGhkOBcXuI5oF0gTANBgkqhkiG9w0BAQsFADB+
-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd
-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj
-IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE1MTIwOTAwMDAwMFoX
-DTE2MTIwODIzNTk1OVowgYkxCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhNaWNoaWdh
-bjETMBEGA1UEBwwKU291dGhmaWVsZDEbMBkGA1UECgwSQVRUIFNlcnZpY2VzLCBJ
-bmMuMQ0wCwYDVQQLDARBU0RDMSYwJAYDVQQDDB1tdGFuanY5c2RjZjUxLmFpYy5j
-aXAuYXR0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOup99Ff
-gk02lwXv535Y1FCCE8vL47BKj96h6to8rXwwN+9W+xiVEIgDXKOWBC7W8iEP2tOd
-Smzi3wsZIivaFh2yPGtj1z0a7WuA7wNw1fJF4WGr4VFaxHbMBaPOZHa3D+iIduWP
-H/t6ECEzfGRRtTt+mVCpV8Rx+v/q8d0yO114u/WBtbGGlIPDJcrHLRODnjM+mkjq
-EwfoR9qqqjbJhjUkUujGM/qVKm3YAjMIZ1ldteRXUew4xI/Foo6u3hqJwbYIJf3r
-fzWCt+fIyktDsm/c1w9HcX+8R0alK90bjC2D5auukIfbmhxd4MR9NBAH0SFleQtw
-SQLN6GYMVexhUEECAwEAAaOCAnswggJ3MCgGA1UdEQQhMB+CHW10YW5qdjlzZGNm
-NTEuYWljLmNpcC5hdHQuY29tMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMB0G
-A1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBhBgNVHSAEWjBYMFYGBmeBDAEC
-AjBMMCMGCCsGAQUFBwIBFhdodHRwczovL2Quc3ltY2IuY29tL2NwczAlBggrBgEF
-BQcCAjAZGhdodHRwczovL2Quc3ltY2IuY29tL3JwYTAfBgNVHSMEGDAWgBRfYM9h
-kFXfhEMUimAqsvV69EMY7zArBgNVHR8EJDAiMCCgHqAchhpodHRwOi8vc3Muc3lt
-Y2IuY29tL3NzLmNybDBXBggrBgEFBQcBAQRLMEkwHwYIKwYBBQUHMAGGE2h0dHA6
-Ly9zcy5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6Ly9zcy5zeW1jYi5jb20v
-c3MuY3J0MIIBBQYKKwYBBAHWeQIEAgSB9gSB8wDxAHYA3esdK3oNT6Ygi4GtgWhw
-fi6OnQHVXIiNPRHEzbbsvswAAAFRh4XRnAAABAMARzBFAiBXZqph5qeHUUnY8OkH
-jJLo454/8c9IBB7asjEYWYoBPQIhAKAwvP8KfqilgawBkuRV7r41P8Xd3Yi72RQO
-1Dvpi8rkAHcApLkJkLQYWBSHuxOizGdwCjw1mAT5G9+443fNDsgN3BAAAAFRh4XR
-3AAABAMASDBGAiEAon+cZcRpSsuo1aiCtaN3aAG0EqJb/1jJ4m4Q/qo1nEoCIQCr
-KrBNyywa4OTmSVSAsyazbnMr5ldimxNORhhtyGeFLDANBgkqhkiG9w0BAQsFAAOC
-AQEAG3/Mq8F0wbCpOOMCq4dZwgLENBjor9b9UljQZ+sgt7Nn00bfGdxY4MKtOTiK
-9ks/nV9sW0KyvhsZvLPPgdSCnu0MZogWQsKqQDkIkJoHtFRSaYTT1vLAIoKz/dN+
-SBS71EzFH92lMfiFtAjfTrFady0/6z7lp4VZwbXLWjHw6LQESENc29Xw1jpCVkg8
-iB2n/qCFfyw3HuvP+eW2TLmnHOl0tda1vrYKCXT2n7HepiJM3g9yLjb/w3MuxEmw
-dj1DqRemXtOUJW0mQXn1mRBjXEunzHoCr3GaeSU6G3RbIzXr34Hsv4IbggkhRula
-gQIYidtDmw0PS1kyaFvlhZkd1g==
------END CERTIFICATE-----
-Bag Attributes
- friendlyName: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US
-subject=/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4
-issuer=/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
------BEGIN CERTIFICATE-----
-MIIFODCCBCCgAwIBAgIQUT+5dDhwtzRAQY0wkwaZ/zANBgkqhkiG9w0BAQsFADCB
-yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp
-U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW
-ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0
-aG9yaXR5IC0gRzUwHhcNMTMxMDMxMDAwMDAwWhcNMjMxMDMwMjM1OTU5WjB+MQsw
-CQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAdBgNV
-BAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVjIENs
-YXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MIIBIjANBgkqhkiG9w0BAQEFAAOC
-AQ8AMIIBCgKCAQEAstgFyhx0LbUXVjnFSlIJluhL2AzxaJ+aQihiw6UwU35VEYJb
-A3oNL+F5BMm0lncZgQGUWfm893qZJ4Itt4PdWid/sgN6nFMl6UgfRk/InSn4vnlW
-9vf92Tpo2otLgjNBEsPIPMzWlnqEIRoiBAMnF4scaGGTDw5RgDMdtLXO637QYqzu
-s3sBdO9pNevK1T2p7peYyo2qRA4lmUoVlqTObQJUHypqJuIGOmNIrLRM0XWTUP8T
-L9ba4cYY9Z/JJV3zADreJk20KQnNDz0jbxZKgRb78oMQw7jW2FUyPfG9D72MUpVK
-Fpd6UiFjdS8W+cRmvvW1Cdj/JwDNRHxvSz+w9wIDAQABo4IBYzCCAV8wEgYDVR0T
-AQH/BAgwBgEB/wIBADAwBgNVHR8EKTAnMCWgI6Ahhh9odHRwOi8vczEuc3ltY2Iu
-Y29tL3BjYTMtZzUuY3JsMA4GA1UdDwEB/wQEAwIBBjAvBggrBgEFBQcBAQQjMCEw
-HwYIKwYBBQUHMAGGE2h0dHA6Ly9zMi5zeW1jYi5jb20wawYDVR0gBGQwYjBgBgpg
-hkgBhvhFAQc2MFIwJgYIKwYBBQUHAgEWGmh0dHA6Ly93d3cuc3ltYXV0aC5jb20v
-Y3BzMCgGCCsGAQUFBwICMBwaGmh0dHA6Ly93d3cuc3ltYXV0aC5jb20vcnBhMCkG
-A1UdEQQiMCCkHjAcMRowGAYDVQQDExFTeW1hbnRlY1BLSS0xLTUzNDAdBgNVHQ4E
-FgQUX2DPYZBV34RDFIpgKrL1evRDGO8wHwYDVR0jBBgwFoAUf9Nlp8Ld7LvwMAnz
-Qzn6Aq8zMTMwDQYJKoZIhvcNAQELBQADggEBAF6UVkndji1l9cE2UbYD49qecxny
-H1mrWH5sJgUs+oHXXCMXIiw3k/eG7IXmsKP9H+IyqEVv4dn7ua/ScKAyQmW/hP4W
-Ko8/xabWo5N9Q+l0IZE1KPRj6S7t9/Vcf0uatSDpCr3gRRAMFJSaXaXjS5HoJJtG
-QGX0InLNmfiIEfXzf+YzguaoxX7+0AjiJVgIcWjmzaLmFN5OUiQt/eV5E1PnXi8t
-TRttQBVSK/eHiXgSgW7ZTaoteNTCLD0IX4eRnh8OsN4wUmSGiaqdZpwOdgyA8nTY
-Kvi4Os7X1g8RvmurFPW9QaAiY4nxug9vKWNmLT+sjHLF+8fk1A/yO0+MKcc=
------END CERTIFICATE-----
\ No newline at end of file
diff --git a/tests/vid/resources/simulators/key.pem b/tests/vid/resources/simulators/key.pem
deleted file mode 100644
index 641d13f..0000000
--- a/tests/vid/resources/simulators/key.pem
+++ /dev/null
@@ -1,28 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDrqffRX4JNNpcF
-7+d+WNRQghPLy+OwSo/eoeraPK18MDfvVvsYlRCIA1yjlgQu1vIhD9rTnUps4t8L
-GSIr2hYdsjxrY9c9Gu1rgO8DcNXyReFhq+FRWsR2zAWjzmR2tw/oiHbljx/7ehAh
-M3xkUbU7fplQqVfEcfr/6vHdMjtdeLv1gbWxhpSDwyXKxy0Tg54zPppI6hMH6Efa
-qqo2yYY1JFLoxjP6lSpt2AIzCGdZXbXkV1HsOMSPxaKOrt4aicG2CCX96381grfn
-yMpLQ7Jv3NcPR3F/vEdGpSvdG4wtg+WrrpCH25ocXeDEfTQQB9EhZXkLcEkCzehm
-DFXsYVBBAgMBAAECggEBAOkwoYCzIktnFh+Q2R9DpKsZW59QXDfoP95LmAlk+0Gk
-sOSKzCHx9o6vzO4uFmuG08Z1WtIElU2TXKMttotv3Gx8Hp8hBy12xLGYvmlIMNvv
-2+n62xTWXQs0LOx+4Rg7Yml1Bzl1227KxMUlnhPiahO53NldB/Th2D197OA0wVtl
-o3d753CNs+vVk1Z8RTUWrW1ZNHdfQNa1zrNo3Q5/evnlt+mAhFbUIKB3FgMk4N4/
-EjnTH6d+MEUD1sVCNruxqv8PZzRzzJEU/8gzy0WAPFAGOOC7hgU3n7dIEEkjvoIw
-HlZD5c6I+3AzYq08CtUwWI09pNVlznqoOY6d548YusUCgYEA9cHOUXiafXFupqpT
-HwE18Yk5sqISpPwS8yip4NPPUv+W9qvCpdkFvV3HRMlICWJGoerRsALEQYY5fsvY
-7lk1avunprbIa9XLUrvb4ydJYynFhKjXkfTAmyCmbvH8t10BfDNuXT098+4M4HpG
-YW2Arl9Db7RoOBwQtPFX2RmYOM8CgYEA9Xx4TbsbT1C6c49aDZmuFeBXDEaMTDYS
-CC50MqMQpfoqS5QVyjl7JzP/dIz9CcUExFz7MOmYCp8yocXnLwxGDrZjZMkwEz15
-8WUGj4WMpSpUSRmGEVnoVE5bRazq37vhbOwh8gcKhF1ifVgwm+Rjs+4g6DwmSR8l
-4CVK6lWrCe8CgYEA5QR7kR6z0Wywse4N0dnd/D1mIFq6xzcFLcZaMOMR1IXMmAjO
-NqF8oNDQjwCH+f60VdWvHLgnTeyYjdnHSa6mghEMVecF9L/iXzIjopaM5DUcFRkG
-8sRD7QxLLR6i4/lvFeAT3B3jKvtO0q4AAnD6NwUdoe5cJNW6l/REalNYsK8CgYBw
-n7lF2CiwW9YevE7RXIc8rB7jl943/LqLHFzc+mjh7QLIh9jzXSm+E6IIY8KXX9dP
-C2WGzDSf8ue0xmnI8PWXPGAfVhoDSboPYI0A/YFIKUJgAyC6ByiKvSQstCdRnA3Q
-/giY1Fgj4AAWh4ZNjxua6g4Y3bem5m5nBlT3a3Q76wKBgQDSMFNfVNWautPQvcYB
-iu9oQhbXVkjh+ToFWq6pW4VaWhEf/6hqvihc6PcB7FXJ1v1/ybko6cIgVmFUt43s
-it1q5aLy3v6GTS/UnDZI3r5oECEuLeUqnHm3qilbatUtwvxghgdwGK+YG0yTfS3y
-GqdNDH5YdJJMyiLdQlLIzJb/XQ==
------END PRIVATE KEY-----
diff --git a/tests/vid/resources/simulators/sdc_get_response.json b/tests/vid/resources/simulators/sdc_get_response.json
deleted file mode 100644
index 9f7e118..0000000
--- a/tests/vid/resources/simulators/sdc_get_response.json
+++ /dev/null
@@ -1,301 +0,0 @@
-{
- "service": {
- "uuid": "2763bc78-8523-482f-895b-0c0db7364224",
- "invariantUuid": "abb2dc66-b211-49d2-ab2f-8774694136fa",
- "name": "Bare2",
- "version": "1.0",
- "toscaModelURL": null,
- "category": "Network L1-3",
- "serviceType": "",
- "serviceRole": "",
- "description": "Bare2",
- "serviceEcompNaming": "true",
- "instantiationType": "ClientConfig",
- "inputs": {}
- },
- "vnfs": {
- "95e654c0-676b-4386-8a69 0": {
- "uuid": "d6395498-7ecb-4eba-bf84-4380f6e9cdcf",
- "invariantUuid": "16262b97-bcb1-4033-8f9f-a3016eaf1ec3",
- "description": "vendor software product",
- "name": "95e654c0-676b-4386-8a69",
- "version": "1.0",
- "customizationUuid": "34a3b91d-8d73-4412-bf4e-c6456741007f",
- "inputs": {},
- "commands": {},
- "properties": {
- "vf_module_id": "vTrafficPNG",
- "repo_url_blob": "https://nexus.onap.org/content/sites/raw",
- "unprotected_private_subnet_id": "zdfw1fwl01_unprotected_sub",
- "public_net_id": "PUT THE PUBLIC NETWORK ID HERE",
- "vfw_private_ip_0": "192.168.10.100",
- "onap_private_subnet_id": "PUT THE ONAP PRIVATE NETWORK NAME HERE",
- "onap_private_net_cidr": "10.0.0.0/16",
- "image_name": "PUT THE VM IMAGE NAME HERE (UBUNTU 1404)",
- "flavor_name": "PUT THE VM FLAVOR NAME HERE (m1.medium suggested)",
- "vnf_id": "vPNG_Firewall_demo_app",
- "vpg_name_0": "zdfw1fwl01pgn01",
- "vpg_private_ip_1": "10.0.100.2",
- "vsn_private_ip_0": "192.168.20.250",
- "vpg_private_ip_0": "192.168.10.200",
- "protected_private_net_cidr": "192.168.20.0/24",
- "unprotected_private_net_cidr": "192.168.10.0/24",
- "nf_naming": "{ecomp_generated_naming=true}",
- "multi_stage_design": "false",
- "onap_private_net_id": "PUT THE ONAP PRIVATE NETWORK NAME HERE",
- "unprotected_private_net_id": "zdfw1fwl01_unprotected",
- "availability_zone_max_count": "1",
- "demo_artifacts_version": "1.2.1",
- "pub_key": "PUT YOUR PUBLIC KEY HERE",
- "key_name": "vfw_key",
- "repo_url_artifacts": "https://nexus.onap.org/content/repositories/releases",
- "install_script_version": "1.2.1",
- "cloud_env": "PUT openstack OR rackspace HERE"
- },
- "type": "VF",
- "modelCustomizationName": "95e654c0-676b-4386-8a69 0",
- "vfModules": {
- "95e654c0676b43868a690..95e654c0676b43868a69..base_vpkg..module-0": {
- "uuid": "12082e9d-a854-48cc-8243-e24b26199856",
- "invariantUuid": "239419df-3375-49fe-9dd4-73b3393858ba",
- "customizationUuid": "32c824f7-5910-4d7a-88ad-188d4905675d",
- "description": null,
- "name": "95e654c0676b43868a69..base_vpkg..module-0",
- "version": "1",
- "volumeGroupAllowed": false,
- "commands": {},
- "modelCustomizationName": "95e654c0676b43868a69..base_vpkg..module-0",
- "properties": {
- "min_vf_module_instances": {
- "name": "min_vf_module_instances",
- "value": 1,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "The minimum instances of this VF-Module",
- "default": null,
- "type": "integer"
- },
- "vf_module_label": {
- "name": "vf_module_label",
- "value": "base_vpkg",
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Alternate textual key used to reference this VF-Module model. Must be unique within the VNF model\n",
- "default": null,
- "type": "string"
- },
- "max_vf_module_instances": {
- "name": "max_vf_module_instances",
- "value": 1,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "The maximum instances of this VF-Module",
- "default": null,
- "type": "integer"
- },
- "vfc_list": {
- "name": "vfc_list",
- "value": null,
- "entrySchema": {
- "description": "<vfc_id>:<count>",
- "type": "string"
- },
- "required": false,
- "constraints": [],
- "description": "Identifies the set of VM types and their count included in the VF-Module\n",
- "default": null,
- "type": "map"
- },
- "vf_module_type": {
- "name": "vf_module_type",
- "value": "Base",
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "",
- "default": null,
- "type": "string"
- },
- "vf_module_description": {
- "name": "vf_module_description",
- "value": null,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Description of the VF-modules contents and purpose (e.g. \"Front-End\" or \"Database Cluster\")\n",
- "default": null,
- "type": "string"
- },
- "initial_count": {
- "name": "initial_count",
- "value": 1,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "The initial count of instances of the VF-Module. The value must be in the range between min_vfmodule_instances and max_vfmodule_instances. If no value provided the initial count is the min_vfmodule_instances.\n",
- "default": null,
- "type": "integer"
- },
- "volume_group": {
- "name": "volume_group",
- "value": false,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "\"true\" indicates that this VF Module model requires attachment to a Volume Group. VID operator must select the Volume Group instance to attach to a VF-Module at deployment time.\n",
- "default": false,
- "type": "boolean"
- },
- "availability_zone_count": {
- "name": "availability_zone_count",
- "value": null,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "Quantity of Availability Zones needed for this VF-Module (source: Extracted from VF-Module HEAT template)\n",
- "default": null,
- "type": "integer"
- },
- "isBase": {
- "name": "isBase",
- "value": false,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Whether this module should be deployed before other modules",
- "default": false,
- "type": "boolean"
- }
- }
- }
- },
- "volumeGroups": {}
- }
- },
- "networks": {},
- "configurations": {},
- "serviceProxies": {},
- "vfModules": {
- "95e654c0676b43868a690..95e654c0676b43868a69..base_vpkg..module-0": {
- "uuid": "12082e9d-a854-48cc-8243-e24b26199856",
- "invariantUuid": "239419df-3375-49fe-9dd4-73b3393858ba",
- "customizationUuid": "32c824f7-5910-4d7a-88ad-188d4905675d",
- "description": null,
- "name": "95e654c0676b43868a69..base_vpkg..module-0",
- "version": "1",
- "volumeGroupAllowed": false,
- "commands": {},
- "modelCustomizationName": "95e654c0676b43868a69..base_vpkg..module-0",
- "properties": {
- "min_vf_module_instances": {
- "name": "min_vf_module_instances",
- "value": 1,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "The minimum instances of this VF-Module",
- "default": null,
- "type": "integer"
- },
- "vf_module_label": {
- "name": "vf_module_label",
- "value": "base_vpkg",
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Alternate textual key used to reference this VF-Module model. Must be unique within the VNF model\n",
- "default": null,
- "type": "string"
- },
- "max_vf_module_instances": {
- "name": "max_vf_module_instances",
- "value": 1,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "The maximum instances of this VF-Module",
- "default": null,
- "type": "integer"
- },
- "vfc_list": {
- "name": "vfc_list",
- "value": null,
- "entrySchema": {
- "description": "<vfc_id>:<count>",
- "type": "string"
- },
- "required": false,
- "constraints": [],
- "description": "Identifies the set of VM types and their count included in the VF-Module\n",
- "default": null,
- "type": "map"
- },
- "vf_module_type": {
- "name": "vf_module_type",
- "value": "Base",
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "",
- "default": null,
- "type": "string"
- },
- "vf_module_description": {
- "name": "vf_module_description",
- "value": null,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Description of the VF-modules contents and purpose (e.g. \"Front-End\" or \"Database Cluster\")\n",
- "default": null,
- "type": "string"
- },
- "initial_count": {
- "name": "initial_count",
- "value": 1,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "The initial count of instances of the VF-Module. The value must be in the range between min_vfmodule_instances and max_vfmodule_instances. If no value provided the initial count is the min_vfmodule_instances.\n",
- "default": null,
- "type": "integer"
- },
- "volume_group": {
- "name": "volume_group",
- "value": false,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "\"true\" indicates that this VF Module model requires attachment to a Volume Group. VID operator must select the Volume Group instance to attach to a VF-Module at deployment time.\n",
- "default": false,
- "type": "boolean"
- },
- "availability_zone_count": {
- "name": "availability_zone_count",
- "value": null,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "Quantity of Availability Zones needed for this VF-Module (source: Extracted from VF-Module HEAT template)\n",
- "default": null,
- "type": "integer"
- },
- "isBase": {
- "name": "isBase",
- "value": false,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Whether this module should be deployed before other modules",
- "default": false,
- "type": "boolean"
- }
- }
- }
- },
- "volumeGroups": {},
- "pnfs": {}
-}
\ No newline at end of file
diff --git a/tests/vid/resources/simulators/so_post_response.json b/tests/vid/resources/simulators/so_post_response.json
new file mode 100644
index 0000000..391231d
--- /dev/null
+++ b/tests/vid/resources/simulators/so_post_response.json
@@ -0,0 +1,9 @@
+{
+ "status": 202,
+ "entity": {
+ "requestReferences": {
+ "instanceId": "fffcbb6c-1983-42df-9ca8-89ae8b3a46c1",
+ "requestId": "b2197d7e-3a7d-410e-82ba-7b7e8191bc46"
+ }
+ }
+}
\ No newline at end of file