aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml13
-rwxr-xr-xplans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh18
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/setup.sh13
-rw-r--r--plans/policy/distribution/setup.sh4
-rw-r--r--plans/policy/pap/setup.sh31
-rw-r--r--plans/policy/pap/teardown.sh20
-rw-r--r--plans/policy/pap/testplan.txt3
-rwxr-xr-x[-rw-r--r--]plans/sdnc/healthcheck/setup.sh11
-rw-r--r--plans/usecases/5G-bulkpm/README.txt55
-rw-r--r--plans/usecases/5G-bulkpm/composefile/onap.docker-compose-e2e19
-rw-r--r--plans/usecases/5G-bulkpm/onap.teardown.sh8
-rw-r--r--plans/usecases/5G-bulkpm/setup.sh92
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot29
-rw-r--r--tests/policy/distribution/distribution-test.robot4
-rw-r--r--tests/policy/pap/pap-test.robot28
-rw-r--r--tests/usecases/5G-bulkpm/BulkpmE2E.robot5
-rw-r--r--tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json2
17 files changed, 328 insertions, 27 deletions
diff --git a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml
index af987f79..ee1649be 100644
--- a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml
+++ b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml
@@ -1,7 +1,7 @@
version: '2.1'
services:
datarouter-prov:
- image: nexus3.onap.org:10001/onap/dmaap/datarouter-prov
+ image: nexus3.onap.org:10001/onap/dmaap/datarouter-prov:2.0.0-SNAPSHOT
container_name: datarouter-prov
hostname: dmaap-dr-prov
ports:
@@ -22,7 +22,7 @@ services:
retries: 5
datarouter-node:
- image: nexus3.onap.org:10001/onap/dmaap/datarouter-node
+ image: nexus3.onap.org:10001/onap/dmaap/datarouter-node:2.0.0-SNAPSHOT
container_name: datarouter-node
hostname: dmaap-dr-node
ports:
@@ -59,3 +59,12 @@ services:
image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:latest
environment:
CONSUL_HOST:
+
+ buscontroller:
+ container_name: buscontroller
+ image: nexus3.onap.org:10001/onap/dmaap/buscontroller
+ ports:
+ - "18080:8080"
+ - "18443:8443"
+ extra_hosts:
+ - "dmaap-dr-prov: dr-prov-ip" \ No newline at end of file
diff --git a/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh b/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh
new file mode 100755
index 00000000..ffb1686c
--- /dev/null
+++ b/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# $1 is the IP address of the buscontroller
+# INITIALIZE: dmaap object
+JSON=/tmp/prov.dmaap
+cat << EOF > $JSON
+{
+"version": "1",
+"topicNsRoot": "org.onap.dmaap",
+"drProvUrl": "https://dmaap-dr-prov:8443",
+"dmaapName": "onapCSIT",
+"bridgeAdminTopic": "MM_AGENT_PROV"
+
+}
+EOF
+
+echo "Initializing /dmaap endpoint"
+curl -v -X POST -d @${JSON} -H "Content-Type: application/json" http://$1:8080/webapi/dmaap \ No newline at end of file
diff --git a/plans/dcaegen2-pmmapper/pmmapper/setup.sh b/plans/dcaegen2-pmmapper/pmmapper/setup.sh
index 326b4ac5..5d8cce62 100644
--- a/plans/dcaegen2-pmmapper/pmmapper/setup.sh
+++ b/plans/dcaegen2-pmmapper/pmmapper/setup.sh
@@ -70,6 +70,10 @@ sed -i -e '/CONSUL_HOST:/ s/:.*/: '$CONSUL_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/datarouter-docker-compose/src/main/resources/prov_data/provserver.properties
docker-compose up -d
+DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov)
+docker kill buscontroller
+sed -i 's/dr-prov-ip/'$DR_PROV_IP'/g' docker-compose.yml
+docker-compose up -d
# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb
for i in {1..10}; do
@@ -104,9 +108,10 @@ docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/i
docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP"
docker exec datarouter-prov /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts"
docker exec datarouter-node /bin/sh -c "echo '${DR_PROV_IP}' dmaap-dr-prov >> /etc/hosts"
-curl -v -X POST -H "Content-Type:application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
-sleep 5
-curl -k https://$DR_PROV_IP:8443/internal/prov
+
+# Bus Controller Configuration
+DMAAPBC_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' buscontroller)
+$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/dmaapbc.sh ${DMAAPBC_IP}
# Consul Configuration for PM Mapper
cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cbs.json /tmp/cbs.json
@@ -115,4 +120,4 @@ curl --request PUT --data @/tmp/cbs.json http://$CONSUL_IP:8500/v1/agent/service
curl 'http://'$CONSUL_IP':8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/^Con' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/config.json
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP}"
+ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DMAAPBC_IP:${DMAAPBC_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP}" \ No newline at end of file
diff --git a/plans/policy/distribution/setup.sh b/plans/policy/distribution/setup.sh
index 9b894e3d..40a15d12 100644
--- a/plans/policy/distribution/setup.sh
+++ b/plans/policy/distribution/setup.sh
@@ -17,11 +17,11 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-docker run -d --name policy-distribution -p 6969:6969 -it nexus3.onap.org:10001/onap/policy-distribution:2.0.0-SNAPSHOT-latest
+docker run -d --name policy-distribution -p 6969:6969 -it nexus3.onap.org:10001/onap/policy-distribution:2.1.0-SNAPSHOT-latest
POLICY_DISTRIBUTION_IP=`get-instance-ip.sh policy-distribution`
echo DISTRIBUTION IP IS ${POLICY_DISTRIBUTION_IP}
-Wait for initialization
+# Wait for initialization
for i in {1..10}; do
curl -sS ${POLICY_DISTRIBUTION_IP}:6969 && break
echo sleep $i
diff --git a/plans/policy/pap/setup.sh b/plans/policy/pap/setup.sh
new file mode 100644
index 00000000..44a205a1
--- /dev/null
+++ b/plans/policy/pap/setup.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+docker run -d --name policy-pap -p 6969:6969 -it nexus3.onap.org:10001/onap/policy-pap:2.0.0-SNAPSHOT-latest
+
+POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
+echo PAP IP IS ${POLICY_PAP_IP}
+# Wait for initialization
+for i in {1..10}; do
+ curl -sS ${POLICY_PAP_IP}:6969 && break
+ echo sleep $i
+ sleep $i
+done
+
+ROBOT_VARIABLES="-v POLICY_PAP_IP:${POLICY_PAP_IP}"
diff --git a/plans/policy/pap/teardown.sh b/plans/policy/pap/teardown.sh
new file mode 100644
index 00000000..877b164a
--- /dev/null
+++ b/plans/policy/pap/teardown.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+kill-instance.sh policy-pap
diff --git a/plans/policy/pap/testplan.txt b/plans/policy/pap/testplan.txt
new file mode 100644
index 00000000..6a5aa205
--- /dev/null
+++ b/plans/policy/pap/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+policy/pap/pap-test.robot
diff --git a/plans/sdnc/healthcheck/setup.sh b/plans/sdnc/healthcheck/setup.sh
index dfbd32cc..7a66351f 100644..100755
--- a/plans/sdnc/healthcheck/setup.sh
+++ b/plans/sdnc/healthcheck/setup.sh
@@ -24,8 +24,8 @@ export NEXUS_USERNAME=docker
export NEXUS_PASSWD=docker
export NEXUS_DOCKER_REPO=nexus3.onap.org:10001
export DMAAP_TOPIC=AUTO
-export DOCKER_IMAGE_VERSION=1.4-STAGING-latest
-export CCSDK_DOCKER_IMAGE_VERSION=0.3-STAGING-latest
+export DOCKER_IMAGE_VERSION=1.5-STAGING-latest
+export CCSDK_DOCKER_IMAGE_VERSION=0.4-STAGING-latest
export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
@@ -100,9 +100,8 @@ while [ "$TIME" -lt "$TIME_OUT" ]; do
docker exec sdnc_controller_container rm -f /opt/opendaylight/current/etc/host.key
response=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client system:start-level)
docker exec sdnc_controller_container rm -f /opt/opendaylight/current/etc/host.key
-num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
- if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 333 ]; then
+ if [ "$response" == "Level 100" ] ; then
echo SDNC karaf started in $TIME seconds
break;
fi
@@ -117,10 +116,8 @@ if [ "$TIME" -ge "$TIME_OUT" ]; then
fi
response=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client system:start-level)
-num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
- if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 333 ]; then
- num_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
+ if [ "$response" == "Level 100" ] ; then
num_failed_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | grep Failure | wc -l)
failed_bundles=$(docker exec sdnc_controller_container /opt/opendaylight/current/bin/client bundle:list | grep Failure)
echo There is/are $num_failed_bundles failed bundles out of $num_bundles installed bundles.
diff --git a/plans/usecases/5G-bulkpm/README.txt b/plans/usecases/5G-bulkpm/README.txt
new file mode 100644
index 00000000..1d0fc415
--- /dev/null
+++ b/plans/usecases/5G-bulkpm/README.txt
@@ -0,0 +1,55 @@
+###################################################################################################################
+By executing the below commands it will change the CSIT test from executing on a docker envirnoment to an ONAP one.
+###################################################################################################################
+
+1) Login to an ONAP instance,switch user and verify that the command kubectl executes before proceeding .
+# sudo -s
+# kubectl get svc -n onap| grep dcae
+
+2) Clone the csit repositry
+# git clone https://gerrit.onap.org/r/integration/csit
+
+3) Install docker-compose
+# sudo apt-get update
+# sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
+# sudo chmod +x /usr/local/bin/docker-compose
+# docker-compose --version
+
+4) Install the packages required for the RobotFramework.
+# apt install python-pip
+# sudo apt install python-pip virtualenv unzip sshuttle netcat libffi-dev libssl-dev
+# sudo pip install robotframework
+# sudo pip install -U requests
+# sudo pip install -U robotframework-requests
+
+5) Expose the Ves-collector
+# kubectl expose svc dcae-ves-collector --type=LoadBalancer --name=vesc -n onap
+ service "vesc" exposed
+
+6) Verify the Ves-collector is expose
+# kubectl get svc -n onap | grep vesc
+ vesc LoadBalancer 10.43.203.47 10.209.63.55 8080:31835/TCP 1m
+
+7) Modify the file setup.sh and make the below change
+# cd csit
+# vi plans/usecases/5G-bulkpm/setup.sh
+CSIT=TRUE
+ to
+CSIT=FALSE
+
+8) Excute the Bulk PM e2e csit.
+# ./run-csit.sh plans/usecases/5G-bulkpm/
+
+
+--> Trobleshooting
+If the Test case "Verify Default Feed And File Consumer Subscription On Datarouter" is hanging, quit the test and execute the below
+Get the DR-PROV IP address
+# kubectl -n onap -o=wide get pods | grep dmaap-dr-prov | awk '{print $6}'
+ 10.42.123.76
+Make sure there are no feeds
+# curl -k https://10.42.123.76:8443/internal/prov
+
+If there is feeds delete them
+curl -X DELETE -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" -k https://10.42.123.76:8443/subs/XX
+
+Where XX is the number of the feeds in the previous command.
diff --git a/plans/usecases/5G-bulkpm/composefile/onap.docker-compose-e2e b/plans/usecases/5G-bulkpm/composefile/onap.docker-compose-e2e
new file mode 100644
index 00000000..1c05ca5b
--- /dev/null
+++ b/plans/usecases/5G-bulkpm/composefile/onap.docker-compose-e2e
@@ -0,0 +1,19 @@
+version: '2.1'
+services:
+ datarouter-subscriber:
+ image: nexus3.onap.org:10001/onap/dmaap/datarouter-subscriber:2.0.0-SNAPSHOT
+ container_name: fileconsumer-node
+ hostname: subscriber.com
+ ports:
+ - "7070:7070"
+ volumes:
+ - ../subscriber_data/subscriber.properties:/opt/app/subscriber/etc/subscriber.properties
+
+ sftp:
+ container_name: sftp
+ image: atmoz/sftp
+ ports:
+ - "2222:22"
+ volumes:
+ - /host/upload:/home/admin
+ command: admin:admin:1001 \ No newline at end of file
diff --git a/plans/usecases/5G-bulkpm/onap.teardown.sh b/plans/usecases/5G-bulkpm/onap.teardown.sh
new file mode 100644
index 00000000..966be45d
--- /dev/null
+++ b/plans/usecases/5G-bulkpm/onap.teardown.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+echo "Starting teardown script"
+DFC_POD=$(kubectl -n onap get pods | grep datafile-collector | awk '{print $1}')
+kubectl -n onap exec $DFC_POD -it cat /opt/log/application.log > /tmp/dfc_docker.log
+cat /tmp/dfc_docker.log
+sleep 3
+kill-instance.sh fileconsumer-node
+kill-instance.sh sftp \ No newline at end of file
diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh
index 47e2532f..5f3c4a3c 100644
--- a/plans/usecases/5G-bulkpm/setup.sh
+++ b/plans/usecases/5G-bulkpm/setup.sh
@@ -2,6 +2,18 @@
# Place the scripts in run order:
source ${SCRIPTS}/common_functions.sh
+CSIT=TRUE
+if [ ${CSIT} = "TRUE" ] ; then
+####################################################
+#Executes the below setup in an Docker Environment #
+####################################################
+
+echo "CSIT Test get executed in here"
+SFTP_PORT=22
+VESC_PORT=8080
+export VESC_PORT=${VESC_PORT}
+export CLI_EXEC_CLI_DFC="docker exec dfc /bin/sh -c \"ls /target | grep .gz\""
+
# Clone DMaaP Message Router repo
mkdir -p $WORKSPACE/archives/dmaapmr
cd $WORKSPACE/archives/dmaapmr
@@ -116,7 +128,7 @@ export HOST_IP=${HOST_IP}
export DMAAP_MR_IP=${DMAAP_MR_IP}
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP}"
+ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP}"
pip install jsonschema uuid
# Wait container ready
@@ -141,6 +153,7 @@ docker exec dfc /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts"
# Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server.
cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
sed -i 's/sftpserver/'${SFTP_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
+sed -i 's/sftpport/'${SFTP_PORT}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/admin/
# Data Router Configuration:
@@ -151,3 +164,80 @@ sed -i 's/fileconsumer/'${DR_SUBSCIBER_IP}'/g' /tmp/addSubscriber.json
curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:dradmin" --data-ascii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1
sleep 10
curl -k https://$DR_PROV_IP:8443/internal/prov
+
+else
+############################################################
+############################################################
+# Executes the below setup in an ONAP Environment #
+# Make sure the steps in the README are completed first !! #
+############################################################
+############################################################
+SFTP_PORT=2222
+
+cp $WORKSPACE/plans/usecases/5G-bulkpm/teardown.sh $WORKSPACE/plans/usecases/5G-bulkpm/teardown.sh.orig
+cp $WORKSPACE/plans/usecases/5G-bulkpm/onap.teardown.sh $WORKSPACE/plans/usecases/5G-bulkpm/teardown.sh
+
+#Get DataFileCollector POD name in this ONAP Deployment
+DFC_POD=$(kubectl -n onap get pods | grep datafile-collector | awk '{print $1}')
+export DFC_POD=${DFC_POD}
+export CLI_EXEC_CLI_DFC="kubectl exec -n onap ${DFC_POD} -it ls /target | grep .gz"
+
+# Get IP address of datarrouter-prov
+DR_PROV_IP=$(kubectl -n onap -o wide get pods | grep dmaap-dr-prov | awk '{print $6}')
+echo DR_PROV_IP=${DR_PROV_IP}
+DR_NODE_IP=$(kubectl -n onap -o=wide get pods | grep dmaap-dr-node | awk '{print $6}')
+echo DR_NODE_IP=${DR_NODE_IP}
+
+# Get IP address of exposed Ves and its port
+DMAAP_MR_IP=$(kubectl -n onap -o=wide get pods | grep dev-dmaap-message-router | grep -Ev "kafka|zookeeper" | awk '{print $6}')
+VESC_IP=$(kubectl get svc -n onap | grep vesc | awk '{print $4}')
+VESC_PORT=$(kubectl get svc -n onap | grep vesc | awk '{print $5}' | cut -d ":" -f2 | cut -d "/" -f1)
+echo VESC_IP=${VESC_IP}
+echo VESC_PORT=${VESC_PORT}
+
+export VESC_IP=${VESC_IP}
+export VESC_PORT=${VESC_PORT}
+export HOST_IP=${HOST_IP}
+export DMAAP_MR_IP=${DMAAP_MR_IP}
+
+#Get DataFileCollector POD name in this ONAP Deployment
+DFC_POD=$(kubectl -n onap get pods | grep datafile-collector | awk '{print $1}')
+export DFC_POD=${DFC_POD}
+
+pip install jsonschema uuid
+
+# Clone DMaaP Data Router repo
+mkdir -p $WORKSPACE/archives/dmaapdr
+cd $WORKSPACE/archives/dmaapdr
+git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master
+cd $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/onap.docker-compose-e2e $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose/docker-compose.yml
+
+#Statup the SFTP and FileConsumer containers.
+docker login -u docker -p docker nexus3.onap.org:10001
+docker-compose up -d
+
+# Wait container ready
+sleep 2
+HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
+# SFTP Configuration:
+# Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server.
+cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
+sed -i 's/sftpserver/'${HOST_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
+sed -i 's/sftpport/'${SFTP_PORT}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
+docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/admin/
+
+# Create default feed and create file consumer subscriber on data router
+curl -v -X POST -H "Content-Type:application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @$WORKSPACE/plans/usecases/5G-bulkpm/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
+cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/addSubscriber.json /tmp/addSubscriber.json
+sed -i 's/fileconsumer/'${HOST_IP}'/g' /tmp/addSubscriber.json
+curl -v -X POST -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1
+sleep 10
+curl -k https://$DR_PROV_IP:8443/internal/prov
+
+#Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP} -v DFC_POD:${DFC_POD} -v HOST_IP:${HOST_IP} "
+
+fi; \ No newline at end of file
diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
index f65ef2b4..ccfa4968 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
@@ -1,14 +1,19 @@
*** Settings ***
Documentation Testing PM Mapper functionality
-Library RequestsLibrary
-Library OperatingSystem
+Resource ../../common.robot
Library Collections
+Library json
+Library OperatingSystem
+Library RequestsLibrary
+Library HttpLibrary.HTTP
+Library String
Library Process
*** Variables ***
-${GLOBAL_APPLICATION_ID} robot-ves
-${CLI_EXEC_CLI} curl http://${CBS_IP}:10000/service_component/pmmapper
+${BC_URL} http://${DMAAPBC_IP}:8080/webapi
+${CLI_EXEC_CLI} curl http://${CBS_IP}:10000/service_component/pmmapper
+${FEED1_DATA} { "feedName":"feed1", "feedVersion": "csit", "feedDescription":"generated for CSIT", "owner":"dgl", "asprClassification": "unclassified" }
*** Test Cases ***
@@ -18,4 +23,18 @@ Verify pmmapper configuration in consul through CBS
[Documentation] Verify pmmapper configuraiton in consul through CBS
${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
Log ${cli_cmd_output.stdout}
- Should Contain ${cli_cmd_output.stdout} pm-mapper-filter \ No newline at end of file
+ Should Contain ${cli_cmd_output.stdout} pm-mapper-filter
+
+Create DR Feed through Bus Controller
+ [Tags] PM_MAPPER_02
+ [Documentation] Create Feed on Data Router through Bus Controller
+ ${resp}= PostCall ${BC_URL}/feeds ${FEED1_DATA}
+ Should Be Equal As Integers ${resp.status_code} 200
+
+*** Keywords ***
+
+PostCall
+ [Arguments] ${url} ${data}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
+ [Return] ${resp} \ No newline at end of file
diff --git a/tests/policy/distribution/distribution-test.robot b/tests/policy/distribution/distribution-test.robot
index 1b9fa212..2ee11806 100644
--- a/tests/policy/distribution/distribution-test.robot
+++ b/tests/policy/distribution/distribution-test.robot
@@ -8,8 +8,8 @@ Library json
Healthcheck
[Documentation] Runs Policy Distribution Health check
${auth}= Create List healthcheck zb!XztG34
- Log Creating session http://${POLICY_DISTRIBUTION_IP}:6969
- ${session}= Create Session policy http://${POLICY_DISTRIBUTION_IP}:6969 auth=${auth}
+ Log Creating session https://${POLICY_DISTRIBUTION_IP}:6969
+ ${session}= Create Session policy https://${POLICY_DISTRIBUTION_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
${resp}= Get Request policy /healthcheck headers=${headers}
Log Received response from policy ${resp.text}
diff --git a/tests/policy/pap/pap-test.robot b/tests/policy/pap/pap-test.robot
new file mode 100644
index 00000000..7dca5b4d
--- /dev/null
+++ b/tests/policy/pap/pap-test.robot
@@ -0,0 +1,28 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+*** Test Cases ***
+Healthcheck
+ [Documentation] Runs Policy PAP Health check
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /healthcheck headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
+
+Statistics
+ [Documentation] Runs Policy PAP Statistics
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /statistics headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['code']} 200
diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases/5G-bulkpm/BulkpmE2E.robot
index fcc1cc76..28de4c24 100644
--- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot
+++ b/tests/usecases/5G-bulkpm/BulkpmE2E.robot
@@ -8,7 +8,7 @@ Resource resources/bulkpm_keywords.robot
*** Variables ***
-${VESC_URL} http://%{VESC_IP}:8080
+${VESC_URL} http://%{VESC_IP}:%{VESC_PORT}
${GLOBAL_APPLICATION_ID} robot-ves
${VES_ANY_EVENT_PATH} /eventListener/v7
${HEADER_STRING} content-type=application/json
@@ -17,7 +17,6 @@ ${EVENT_DATA_FILE} %{WORKSPACE}/tests/usecases/5G-bulkpm/a
${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics
${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000
${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov
-${CLI_EXEC_CLI_DFC} docker exec dfc /bin/sh -c "ls /target | grep .gz"
${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .gz"
*** Test Cases ***
@@ -55,7 +54,7 @@ Check VES Notification Topic is existing in Message Router
Verify Downloaded PM file from xNF exist on Data File Collector
[Tags] Bulk_PM_E2E_03
[Documentation] Check the PM XML file exists on the data file collector
- ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes
+ ${cli_cmd_output}= Run Process %{CLI_EXEC_CLI_DFC} shell=yes
Log ${cli_cmd_output.stdout}
Should Be Equal As Strings ${cli_cmd_output.rc} 0
Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz
diff --git a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json b/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json
index 4064ea31..d5d8fd05 100644
--- a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json
+++ b/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json
@@ -21,7 +21,7 @@
"arrayOfNamedHashMap": [
{ "name": "xNF.pm.xml.gz",
"hashMap":{
- "location": "sftp://admin:admin@sftpserver:22/xNF.pm.xml.gz",
+ "location": "sftp://admin:admin@sftpserver:sftpport/xNF.pm.xml.gz",
"compression": "gzip",
"fileFormatType": "org.3GPP.32.435#measCollec",
"fileFormatVersion": "V10"