aboutsummaryrefslogtreecommitdiffstats
path: root/plans/usecases
diff options
context:
space:
mode:
authorLiamBurke <Liam.Burke@ericsson.com>2019-04-11 11:43:42 +0100
committerLiamBurke <liam.burke@ericsson.com>2019-04-11 12:06:14 +0100
commitab2e098133d5b1dc6877a9050a5fff10b27eb4c6 (patch)
tree3c32d18ca9657ef451b81eac85550bfc22d1de8a /plans/usecases
parent8ee0ef7036ef82917d17dc1a6802e24c24f74ca9 (diff)
Adding PM Mapper Test to BulkPMe2e tests
-Check PM Mapper contains XML file -Check MR contains PMMeas VES Change-Id: I8f86aa75ace47ce4c00136169832136c3fac8a92 Issue-ID: INT-832 Signed-off-by: LiamBurke <liam.burke@ericsson.com>
Diffstat (limited to 'plans/usecases')
-rw-r--r--plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml2
-rw-r--r--plans/usecases/5G-bulkpm/setup.sh15
-rw-r--r--plans/usecases/5G-bulkpm/teardown.sh8
3 files changed, 21 insertions, 4 deletions
diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
index 86c5fe3b..7880656b 100644
--- a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
+++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
@@ -22,6 +22,7 @@ services:
retries: 5
extra_hosts:
- "dmaap-dr-node:1.1.1.1"
+ - "dcae-pm-mapper:3.3.3.3"
datarouter-node:
image: nexus3.onap.org:10001/onap/dmaap/datarouter-node:2.1.0-SNAPSHOT-latest
@@ -37,6 +38,7 @@ services:
condition: service_healthy
extra_hosts:
- "dmaap-dr-prov:2.2.2.2"
+ - "dcae-pm-mapper:3.3.3.3"
datarouter-subscriber:
image: nexus3.onap.org:10001/onap/dmaap/datarouter-subscriber:2.1.0-SNAPSHOT-latest
diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh
index 265ec96c..1bba4f30 100644
--- a/plans/usecases/5G-bulkpm/setup.sh
+++ b/plans/usecases/5G-bulkpm/setup.sh
@@ -70,8 +70,6 @@ cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/res
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
-cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/docker-databus-controller.conf /tmp/
-sed -i 's/DMAAPMR/'$DMAAP_MR_IP'/g' /tmp/docker-databus-controller.conf
docker login -u docker -p docker nexus3.onap.org:10001
docker-compose up -d
@@ -179,6 +177,7 @@ cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.
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/
+docker cp $WORKSPACE/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz sftp:/home/admin/
# Data Router Configuration:
# Create default feed and create file consumer subscriber on data router
@@ -205,15 +204,25 @@ sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml
sed -i 's/4.4.4.4/'$DMAAP_MR_IP'/g' docker-compose.yml
docker-compose up -d
+cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose
+PMMAPPER_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pmmapper)
+docker kill datarouter-node
+docker kill datarouter-prov
+sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml
+sed -i 's/2.2.2.2/'$DR_PROV_IP'/g' docker-compose.yml
+sed -i 's/3.3.3.3/'$PMMAPPER_IP'/g' docker-compose.yml
+docker-compose up -d
+
# Setting up PM Mapper certs.
docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cert.jks.b64 pmmapper:opt/app/pm-mapper/etc/
docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/jks.pass pmmapper:opt/app/pm-mapper/etc/
docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.jks.b64 pmmapper:opt/app/pm-mapper/etc/
docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.pass pmmapper:opt/app/pm-mapper/etc/
docker restart pmmapper
+sleep 5
# Create PM Mapper feed and create PM Mapper subscriber on data router
-curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
+#curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1
# Create PM Mapper tocic in Message Router
diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh
index 5b3d1710..d52b7733 100644
--- a/plans/usecases/5G-bulkpm/teardown.sh
+++ b/plans/usecases/5G-bulkpm/teardown.sh
@@ -1,9 +1,15 @@
#!/bin/bash
echo "Starting teardown script"
docker exec dfc /bin/sh -c "less /var/log/ONAP/application.log" > /tmp/dfc_docker.log
+echo "===== DFC LOG ========"
cat /tmp/dfc_docker.log
sleep 3
-rm /tmp/dfc_docker.log.robot
+echo "===== PM MAPPER LOG ========"
+#cat /tmp/pmmapper_docker.log.robot
+sleep 2
+echo "===== MR LOG ========"
+#cat /tmp/mr.log
+sleep 2
kill-instance.sh $DMAAP
kill-instance.sh $KAFKA
kill-instance.sh $ZOOKEEPER