blob: 265ec96cd1e824294e2406fd11eb3e47ae993707 [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001#!/bin/bash
LiamBurkecf7c8ca2019-03-15 15:25:23 +00002# Place the scripts in run order:
Gary Wu9abb61c2018-09-27 10:38:50 -07003source ${SCRIPTS}/common_functions.sh
4
LiamBurkea4516192019-02-11 12:28:55 +00005CSIT=TRUE
6if [ ${CSIT} = "TRUE" ] ; then
7####################################################
8#Executes the below setup in an Docker Environment #
9####################################################
10
11echo "CSIT Test get executed in here"
12SFTP_PORT=22
13VESC_PORT=8080
14export VESC_PORT=${VESC_PORT}
15export CLI_EXEC_CLI_DFC="docker exec dfc /bin/sh -c \"ls /target | grep .gz\""
16
Gary Wu9abb61c2018-09-27 10:38:50 -070017# Clone DMaaP Message Router repo
18mkdir -p $WORKSPACE/archives/dmaapmr
19cd $WORKSPACE/archives/dmaapmr
20git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master
LiamBurkeae583be2018-10-16 10:44:12 +000021sed -i 's/enableCadi: false/enableCadi: "false"/g' /$WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose/docker-compose.yml
Gary Wu9abb61c2018-09-27 10:38:50 -070022cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose
23cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/
24
25# start DMaaP MR containers with docker compose and configuration from docker-compose.yml
26docker login -u docker -p docker nexus3.onap.org:10001
27docker-compose up -d
28
29ZOOKEEPER=$(docker ps -a -q --filter="name=zookeeper_1")
30KAFKA=$(docker ps -a -q --filter="name=kafka_1")
31DMAAP=$(docker ps -a -q --filter="name=dmaap_1")
32
33# Wait for initialization of Docker contaienr for DMaaP MR, Kafka and Zookeeper
LiamBurkef708f842018-10-10 09:26:26 +000034for i in {1..10}; do
Gary Wu9abb61c2018-09-27 10:38:50 -070035if [ $(docker inspect --format '{{ .State.Running }}' $KAFKA) ] && \
36[ $(docker inspect --format '{{ .State.Running }}' $ZOOKEEPER) ] && \
37[ $(docker inspect --format '{{ .State.Running }}' $DMAAP) ]
38then
39 echo "DMaaP Service Running"
40 break
41else
42 echo sleep $i
43 sleep $i
44fi
45done
46
47# Get IP address of DMAAP, KAFKA, Zookeeper
48KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $KAFKA)
49ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $ZOOKEEPER)
50DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DMAAP)
51
52sleep 2
53# Shutdown DMAAP Container
54docker kill $DMAAP
55
56# Initial docker-compose up and down is for populating kafka and zookeeper IPs in /var/tmp/MsgRtrApi.properites
57sed -i -e '/config.zk.servers=/ s/=.*/='$ZOOKEEPER_IP'/' /var/tmp/MsgRtrApi.properties
58sed -i -e '/kafka.metadata.broker.list=/ s/=.*/='$KAFKA_IP':9092/' /var/tmp/MsgRtrApi.properties
59
60# Start DMaaP MR containers with docker compose and configuration from docker-compose.yml
61docker login -u docker -p docker nexus3.onap.org:10001
62docker-compose up -d
63sleep 5
64
65# Clone DMaaP Data Router repo
66mkdir -p $WORKSPACE/archives/dmaapdr
67cd $WORKSPACE/archives/dmaapdr
68git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master
LiamBurke1344ef22018-10-19 15:22:16 +000069cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources
70mkdir docker-compose
71cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose
72cp $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
LiamBurke3608af72019-03-12 22:50:33 +000073cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/docker-databus-controller.conf /tmp/
74sed -i 's/DMAAPMR/'$DMAAP_MR_IP'/g' /tmp/docker-databus-controller.conf
LiamBurke1344ef22018-10-19 15:22:16 +000075
Gary Wu9abb61c2018-09-27 10:38:50 -070076docker login -u docker -p docker nexus3.onap.org:10001
77docker-compose up -d
LiamBurkeca7df552018-10-26 13:57:21 +000078echo "Disregard the message ERROR: for datarouter-node Container 1234456 is unhealthy, this is expected behaiour at this stage"
Gary Wu9abb61c2018-09-27 10:38:50 -070079docker kill vescollector
LiamBurke3608af72019-03-12 22:50:33 +000080docker kill cbs
LiamBurke248195d2019-04-03 10:21:12 +010081sleep 10
LiamBurke3608af72019-03-12 22:50:33 +000082CONSUL_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' consul )
83sed -i -e '/CONSUL_HOST:/ s/:.*/: '$CONSUL_IP'/' docker-compose.yml
Gary Wu9abb61c2018-09-27 10:38:50 -070084HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
85sed -i -e '/DMAAPHOST:/ s/:.*/: '$HOST_IP'/' docker-compose.yml
86MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb )
LiamBurke1344ef22018-10-19 15:22:16 +000087sed -i 's/datarouter-mariadb/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/prov_data/provserver.properties
Gary Wu9abb61c2018-09-27 10:38:50 -070088docker-compose up -d
LiamBurke248195d2019-04-03 10:21:12 +010089sleep 5
90# Get IP address of datarrouger-prov, datarouter-node, fileconsumer-node.
91DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov)
92DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node)
93DR_SUBSCIBER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' fileconsumer-node)
94DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' datarouter-prov)
95
96echo DR_PROV_IP=${DR_PROV_IP}
97echo DR_NODE_IP=${DR_NODE_IP}
98echo DR_GATEWAY_IP=${DR_GATEWAY_IP}
99echo DR_SUBSCIBER_IP=${DR_SUBSCIBER_IP}
100
101docker kill datarouter-node
102docker kill datarouter-prov
103sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml
104sed -i 's/2.2.2.2/'$DR_PROV_IP'/g' docker-compose.yml
105docker-compose up -d
Gary Wu9abb61c2018-09-27 10:38:50 -0700106
107# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb
LiamBurkef708f842018-10-10 09:26:26 +0000108for i in {1..10}; do
Gary Wu9abb61c2018-09-27 10:38:50 -0700109 if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \
110 [ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ] && \
111 [ $(docker inspect --format '{{ .State.Running }}' mariadb) ]
112 then
113 echo "DR Service Running"
114 break
115 else
116 echo sleep $i
117 sleep $i
118 fi
119done
120
121sleep 5
Gary Wu9abb61c2018-09-27 10:38:50 -0700122
123docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP"
124docker 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"
Gary Wu9abb61c2018-09-27 10:38:50 -0700125docker exec datarouter-node /bin/sh -c "echo '${DR_SUBSCIBER_IP}' dmaap-dr-subscriber >> /etc/hosts"
126
LiamBurke248195d2019-04-03 10:21:12 +0100127
Gary Wu9abb61c2018-09-27 10:38:50 -0700128# Get IP address of DMAAP, KAFKA, Zookeeper
129DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DMAAP)
130KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $KAFKA)
131ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $ZOOKEEPER)
132VESC_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' vescollector)
133SFTP_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sftp)
134
135export VESC_IP=${VESC_IP}
136export HOST_IP=${HOST_IP}
137export DMAAP_MR_IP=${DMAAP_MR_IP}
138
LiamBurke3608af72019-03-12 22:50:33 +0000139
LiamBurkef8d0c2e2019-03-13 12:47:16 +0000140# Data File Collector configuration :
141sed -i 's/DR_NODE_IP/'$DR_NODE_IP'/g' docker-compose.yml
142cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json /tmp/
143sed -i 's/dmaapmrhost/'${DMAAP_MR_IP}'/g' /tmp/datafile_endpoints.json
144sed -i 's/dmaapdrhost/'${DR_PROV_IP}'/g' /tmp/datafile_endpoints.json
145echo data_endpoints.json to be copied onto the DFC containter
146cat /tmp/datafile_endpoints.json
147docker-compose up -d
148sleep 2
149# DFC is now online
150docker cp dfc:/opt/app/datafile/config/datafile_endpoints.json /tmp/datafile_endpoints.json.fromcontainer
151echo data_endpoints.json from DFC containter
152cat /tmp/datafile_endpoints.json.fromcontainer
153docker cp /tmp/datafile_endpoints.json dfc:/opt/app/datafile/config/
154#Increase Logging
LiamBurkeb86a8bc2019-03-26 22:25:10 +0000155docker exec dfc /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: WARN/org.onap.dcaegen2.collectors.datafile: TRACE/g' /opt/app/datafile/config/application.yaml"
LiamBurkef8d0c2e2019-03-13 12:47:16 +0000156docker restart dfc
157sleep 2
158
LiamBurke248195d2019-04-03 10:21:12 +0100159# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb, Consul, CBS
LiamBurke3608af72019-03-12 22:50:33 +0000160for i in {1..10}; do
161 if [ $(docker inspect --format '{{ .State.Running }}' consul) ] && \
LiamBurke248195d2019-04-03 10:21:12 +0100162 [ $(docker inspect --format '{{ .State.Running }}' cbs) ]
LiamBurke3608af72019-03-12 22:50:33 +0000163 then
LiamBurke248195d2019-04-03 10:21:12 +0100164 echo "Data Router, Consul, Config Binding Service Services Running"
LiamBurke3608af72019-03-12 22:50:33 +0000165 break
166 else
167 echo sleep $i
168 sleep $i
169 fi
170done
171sleep 10
172
LiamBurkecf7c8ca2019-03-15 15:25:23 +0000173pip install jsonschema uuid simplejson
Gary Wu9abb61c2018-09-27 10:38:50 -0700174# Wait container ready
175sleep 2
176
Gary Wu9abb61c2018-09-27 10:38:50 -0700177# Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server.
rajendrajaiswal0d357f32018-09-28 10:18:19 +0100178cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
Gary Wu13111e92018-09-27 11:31:33 -0700179sed -i 's/sftpserver/'${SFTP_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
LiamBurkea4516192019-02-11 12:28:55 +0000180sed -i 's/sftpport/'${SFTP_PORT}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
Gary Wu13111e92018-09-27 11:31:33 -0700181docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/admin/
Gary Wu9abb61c2018-09-27 10:38:50 -0700182
183# Data Router Configuration:
184# Create default feed and create file consumer subscriber on data router
egernug6f2874b2019-02-06 15:16:54 +0000185curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:dradmin" --data-ascii @$WORKSPACE/plans/usecases/5G-bulkpm/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
Gary Wu13111e92018-09-27 11:31:33 -0700186cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/addSubscriber.json /tmp/addSubscriber.json
Gary Wu9abb61c2018-09-27 10:38:50 -0700187sed -i 's/fileconsumer/'${DR_SUBSCIBER_IP}'/g' /tmp/addSubscriber.json
egernug6f2874b2019-02-06 15:16:54 +0000188curl -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
rajendrajaiswalb99eedc2018-10-02 09:42:23 +0100189sleep 10
LiamBurkef708f842018-10-10 09:26:26 +0000190curl -k https://$DR_PROV_IP:8443/internal/prov
LiamBurkea4516192019-02-11 12:28:55 +0000191
LiamBurkef9d624a2019-04-10 10:41:26 +0100192# Consul Configuration for PM Mapper
193cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cbs.json /tmp/cbs.json
194sed -i 's/ipaddress/'${CBS_IP}'/g' /tmp/cbs.json
195curl --request PUT --data @/tmp/cbs.json http://$CONSUL_IP:8500/v1/agent/service/register
196curl 'http://'$CONSUL_IP':8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/config.json
197
198# PM Mapper startup and configuration
199mkdir /tmp/docker-compose
200cd /tmp/docker-compose
201cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml /tmp/docker-compose/docker-compose.yml
202CBS_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' cbs)
203sed -i 's/CBSIP/'$CBS_IP'/g' docker-compose.yml
204sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml
205sed -i 's/4.4.4.4/'$DMAAP_MR_IP'/g' docker-compose.yml
206docker-compose up -d
207
208# Setting up PM Mapper certs.
209docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cert.jks.b64 pmmapper:opt/app/pm-mapper/etc/
210docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/jks.pass pmmapper:opt/app/pm-mapper/etc/
211docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.jks.b64 pmmapper:opt/app/pm-mapper/etc/
212docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.pass pmmapper:opt/app/pm-mapper/etc/
213docker restart pmmapper
214
215# Create PM Mapper feed and create PM Mapper subscriber on data router
216curl -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
217curl -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
218
219# Create PM Mapper tocic in Message Router
220curl -v -X POST http://${DMAAP_MR_IP}:3904/topics/create -d @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/createTopic.json -H "Content-Type: application/json"
221PMMAPPER_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pmmapper)
222docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper.log
223cat /tmp/pmmapper.log
224docker exec -it datarouter-prov sh -c "curl http://dmaap-dr-node:8080/internal/fetchProv"
225sleep 10
226curl -k https://$DR_PROV_IP:8443/internal/prov
227curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000
228
229#Pass any variables required by Robot test suites in ROBOT_VARIABLES
230ROBOT_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 SFTP_IP:${SFTP_IP}"
231
LiamBurkea4516192019-02-11 12:28:55 +0000232else
233############################################################
234############################################################
235# Executes the below setup in an ONAP Environment #
236# Make sure the steps in the README are completed first !! #
237############################################################
238############################################################
239SFTP_PORT=2222
240
241cp $WORKSPACE/plans/usecases/5G-bulkpm/teardown.sh $WORKSPACE/plans/usecases/5G-bulkpm/teardown.sh.orig
242cp $WORKSPACE/plans/usecases/5G-bulkpm/onap.teardown.sh $WORKSPACE/plans/usecases/5G-bulkpm/teardown.sh
243
244#Get DataFileCollector POD name in this ONAP Deployment
245DFC_POD=$(kubectl -n onap get pods | grep datafile-collector | awk '{print $1}')
246export DFC_POD=${DFC_POD}
247export CLI_EXEC_CLI_DFC="kubectl exec -n onap ${DFC_POD} -it ls /target | grep .gz"
248
249# Get IP address of datarrouter-prov
250DR_PROV_IP=$(kubectl -n onap -o wide get pods | grep dmaap-dr-prov | awk '{print $6}')
251echo DR_PROV_IP=${DR_PROV_IP}
252DR_NODE_IP=$(kubectl -n onap -o=wide get pods | grep dmaap-dr-node | awk '{print $6}')
253echo DR_NODE_IP=${DR_NODE_IP}
254
255# Get IP address of exposed Ves and its port
256DMAAP_MR_IP=$(kubectl -n onap -o=wide get pods | grep dev-dmaap-message-router | grep -Ev "kafka|zookeeper" | awk '{print $6}')
257VESC_IP=$(kubectl get svc -n onap | grep vesc | awk '{print $4}')
258VESC_PORT=$(kubectl get svc -n onap | grep vesc | awk '{print $5}' | cut -d ":" -f2 | cut -d "/" -f1)
259echo VESC_IP=${VESC_IP}
260echo VESC_PORT=${VESC_PORT}
261
262export VESC_IP=${VESC_IP}
263export VESC_PORT=${VESC_PORT}
264export HOST_IP=${HOST_IP}
265export DMAAP_MR_IP=${DMAAP_MR_IP}
266
267#Get DataFileCollector POD name in this ONAP Deployment
268DFC_POD=$(kubectl -n onap get pods | grep datafile-collector | awk '{print $1}')
269export DFC_POD=${DFC_POD}
270
LiamBurkecf7c8ca2019-03-15 15:25:23 +0000271pip install jsonschema uuid simplejson
LiamBurkea4516192019-02-11 12:28:55 +0000272
273# Clone DMaaP Data Router repo
274mkdir -p $WORKSPACE/archives/dmaapdr
275cd $WORKSPACE/archives/dmaapdr
276git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master
277cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources
278mkdir docker-compose
279cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose
280cp $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
281
282#Statup the SFTP and FileConsumer containers.
283docker login -u docker -p docker nexus3.onap.org:10001
284docker-compose up -d
285
286# Wait container ready
287sleep 2
288HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
289# SFTP Configuration:
290# Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server.
291cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
292sed -i 's/sftpserver/'${HOST_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
293sed -i 's/sftpport/'${SFTP_PORT}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
294docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/admin/
295
296# Create default feed and create file consumer subscriber on data router
LiamBurkeb86a8bc2019-03-26 22:25:10 +0000297curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:dradmin" --data-ascii @$WORKSPACE/plans/usecases/5G-bulkpm/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
LiamBurkea4516192019-02-11 12:28:55 +0000298cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/addSubscriber.json /tmp/addSubscriber.json
299sed -i 's/fileconsumer/'${HOST_IP}'/g' /tmp/addSubscriber.json
LiamBurkeb86a8bc2019-03-26 22:25:10 +0000300curl -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
LiamBurkea4516192019-02-11 12:28:55 +0000301sleep 10
302curl -k https://$DR_PROV_IP:8443/internal/prov
303
304#Pass any variables required by Robot test suites in ROBOT_VARIABLES
305ROBOT_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} "
306
LiamBurkecf7c8ca2019-03-15 15:25:23 +0000307fi;