Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | #!/bin/bash |
LiamBurke | cf7c8ca | 2019-03-15 15:25:23 +0000 | [diff] [blame] | 2 | # Place the scripts in run order: |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 3 | source ${SCRIPTS}/common_functions.sh |
| 4 | |
LiamBurke | a451619 | 2019-02-11 12:28:55 +0000 | [diff] [blame] | 5 | CSIT=TRUE |
| 6 | if [ ${CSIT} = "TRUE" ] ; then |
| 7 | #################################################### |
| 8 | #Executes the below setup in an Docker Environment # |
| 9 | #################################################### |
| 10 | |
| 11 | echo "CSIT Test get executed in here" |
| 12 | SFTP_PORT=22 |
| 13 | VESC_PORT=8080 |
| 14 | export VESC_PORT=${VESC_PORT} |
| 15 | export CLI_EXEC_CLI_DFC="docker exec dfc /bin/sh -c \"ls /target | grep .gz\"" |
| 16 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 17 | # Clone DMaaP Message Router repo |
| 18 | mkdir -p $WORKSPACE/archives/dmaapmr |
| 19 | cd $WORKSPACE/archives/dmaapmr |
| 20 | git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master |
LiamBurke | ae583be | 2018-10-16 10:44:12 +0000 | [diff] [blame] | 21 | sed -i 's/enableCadi: false/enableCadi: "false"/g' /$WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose/docker-compose.yml |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 22 | cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose |
| 23 | cp $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 |
| 26 | docker login -u docker -p docker nexus3.onap.org:10001 |
| 27 | docker-compose up -d |
| 28 | |
| 29 | ZOOKEEPER=$(docker ps -a -q --filter="name=zookeeper_1") |
| 30 | KAFKA=$(docker ps -a -q --filter="name=kafka_1") |
| 31 | DMAAP=$(docker ps -a -q --filter="name=dmaap_1") |
| 32 | |
| 33 | # Wait for initialization of Docker contaienr for DMaaP MR, Kafka and Zookeeper |
LiamBurke | f708f84 | 2018-10-10 09:26:26 +0000 | [diff] [blame] | 34 | for i in {1..10}; do |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 35 | if [ $(docker inspect --format '{{ .State.Running }}' $KAFKA) ] && \ |
| 36 | [ $(docker inspect --format '{{ .State.Running }}' $ZOOKEEPER) ] && \ |
| 37 | [ $(docker inspect --format '{{ .State.Running }}' $DMAAP) ] |
| 38 | then |
| 39 | echo "DMaaP Service Running" |
| 40 | break |
| 41 | else |
| 42 | echo sleep $i |
| 43 | sleep $i |
| 44 | fi |
| 45 | done |
| 46 | |
| 47 | # Get IP address of DMAAP, KAFKA, Zookeeper |
| 48 | KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $KAFKA) |
| 49 | ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $ZOOKEEPER) |
| 50 | DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DMAAP) |
| 51 | |
| 52 | sleep 2 |
| 53 | # Shutdown DMAAP Container |
| 54 | docker kill $DMAAP |
| 55 | |
| 56 | # Initial docker-compose up and down is for populating kafka and zookeeper IPs in /var/tmp/MsgRtrApi.properites |
| 57 | sed -i -e '/config.zk.servers=/ s/=.*/='$ZOOKEEPER_IP'/' /var/tmp/MsgRtrApi.properties |
| 58 | sed -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 |
| 61 | docker login -u docker -p docker nexus3.onap.org:10001 |
| 62 | docker-compose up -d |
| 63 | sleep 5 |
| 64 | |
| 65 | # Clone DMaaP Data Router repo |
| 66 | mkdir -p $WORKSPACE/archives/dmaapdr |
| 67 | cd $WORKSPACE/archives/dmaapdr |
| 68 | git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master |
LiamBurke | 1344ef2 | 2018-10-19 15:22:16 +0000 | [diff] [blame] | 69 | cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources |
| 70 | mkdir docker-compose |
| 71 | cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose |
| 72 | 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 |
LiamBurke | 3608af7 | 2019-03-12 22:50:33 +0000 | [diff] [blame] | 73 | cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/docker-databus-controller.conf /tmp/ |
| 74 | sed -i 's/DMAAPMR/'$DMAAP_MR_IP'/g' /tmp/docker-databus-controller.conf |
LiamBurke | 1344ef2 | 2018-10-19 15:22:16 +0000 | [diff] [blame] | 75 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 76 | docker login -u docker -p docker nexus3.onap.org:10001 |
| 77 | docker-compose up -d |
LiamBurke | ca7df55 | 2018-10-26 13:57:21 +0000 | [diff] [blame] | 78 | echo "Disregard the message ERROR: for datarouter-node Container 1234456 is unhealthy, this is expected behaiour at this stage" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 79 | docker kill datarouter-prov |
| 80 | docker kill datarouter-node |
| 81 | docker kill vescollector |
LiamBurke | 3608af7 | 2019-03-12 22:50:33 +0000 | [diff] [blame] | 82 | docker kill cbs |
| 83 | CONSUL_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' consul ) |
| 84 | sed -i -e '/CONSUL_HOST:/ s/:.*/: '$CONSUL_IP'/' docker-compose.yml |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 85 | HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') |
| 86 | sed -i -e '/DMAAPHOST:/ s/:.*/: '$HOST_IP'/' docker-compose.yml |
| 87 | MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb ) |
LiamBurke | 1344ef2 | 2018-10-19 15:22:16 +0000 | [diff] [blame] | 88 | sed -i 's/datarouter-mariadb/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/prov_data/provserver.properties |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 89 | docker-compose up -d |
| 90 | |
| 91 | # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb |
LiamBurke | f708f84 | 2018-10-10 09:26:26 +0000 | [diff] [blame] | 92 | for i in {1..10}; do |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 93 | if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \ |
| 94 | [ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ] && \ |
| 95 | [ $(docker inspect --format '{{ .State.Running }}' mariadb) ] |
| 96 | then |
| 97 | echo "DR Service Running" |
| 98 | break |
| 99 | else |
| 100 | echo sleep $i |
| 101 | sleep $i |
| 102 | fi |
| 103 | done |
| 104 | |
| 105 | sleep 5 |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 106 | # Get IP address of datarrouger-prov, datarouter-node, fileconsumer-node. |
| 107 | DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov) |
| 108 | DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node) |
| 109 | DR_SUBSCIBER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' fileconsumer-node) |
| 110 | DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' datarouter-prov) |
| 111 | |
| 112 | echo DR_PROV_IP=${DR_PROV_IP} |
| 113 | echo DR_NODE_IP=${DR_NODE_IP} |
| 114 | echo DR_GATEWAY_IP=${DR_GATEWAY_IP} |
| 115 | echo DR_SUBSCIBER_IP=${DR_SUBSCIBER_IP} |
| 116 | |
| 117 | docker 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" |
| 118 | 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" |
| 119 | docker exec datarouter-prov /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts" |
| 120 | docker exec datarouter-node /bin/sh -c "echo '${DR_PROV_IP}' dmaap-dr-prov >> /etc/hosts" |
| 121 | docker exec datarouter-node /bin/sh -c "echo '${DR_SUBSCIBER_IP}' dmaap-dr-subscriber >> /etc/hosts" |
| 122 | |
| 123 | # Get IP address of DMAAP, KAFKA, Zookeeper |
| 124 | DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DMAAP) |
| 125 | KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $KAFKA) |
| 126 | ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $ZOOKEEPER) |
| 127 | VESC_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' vescollector) |
| 128 | SFTP_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sftp) |
| 129 | |
| 130 | export VESC_IP=${VESC_IP} |
| 131 | export HOST_IP=${HOST_IP} |
| 132 | export DMAAP_MR_IP=${DMAAP_MR_IP} |
| 133 | |
LiamBurke | 3608af7 | 2019-03-12 22:50:33 +0000 | [diff] [blame] | 134 | docker kill buscontroller |
| 135 | sed -i 's/DMAAPDR/'$DR_PROV_IP'/g' docker-compose.yml |
| 136 | sed -i 's/DMAAPMR/'$DMAAP_MR_IP'/g' docker-compose.yml |
| 137 | docker-compose up -d |
| 138 | sed -i 's/DMAAPDR/'$DR_PROV_IP'/g' /tmp/docker-databus-controller.conf |
| 139 | |
LiamBurke | f8d0c2e | 2019-03-13 12:47:16 +0000 | [diff] [blame] | 140 | # Data File Collector configuration : |
| 141 | sed -i 's/DR_NODE_IP/'$DR_NODE_IP'/g' docker-compose.yml |
| 142 | cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json /tmp/ |
| 143 | sed -i 's/dmaapmrhost/'${DMAAP_MR_IP}'/g' /tmp/datafile_endpoints.json |
| 144 | sed -i 's/dmaapdrhost/'${DR_PROV_IP}'/g' /tmp/datafile_endpoints.json |
| 145 | echo data_endpoints.json to be copied onto the DFC containter |
| 146 | cat /tmp/datafile_endpoints.json |
| 147 | docker-compose up -d |
| 148 | sleep 2 |
| 149 | # DFC is now online |
| 150 | docker cp dfc:/opt/app/datafile/config/datafile_endpoints.json /tmp/datafile_endpoints.json.fromcontainer |
| 151 | echo data_endpoints.json from DFC containter |
| 152 | cat /tmp/datafile_endpoints.json.fromcontainer |
| 153 | docker cp /tmp/datafile_endpoints.json dfc:/opt/app/datafile/config/ |
| 154 | #Increase Logging |
| 155 | docker exec dfc /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: ERROR/org.onap.dcaegen2.collectors.datafile: TRACE/g' /opt/app/datafile/config/application.yaml" |
| 156 | docker restart dfc |
| 157 | sleep 2 |
| 158 | |
LiamBurke | 3608af7 | 2019-03-12 22:50:33 +0000 | [diff] [blame] | 159 | # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb, Consul, CBS, Buscontroller |
| 160 | for i in {1..10}; do |
| 161 | if [ $(docker inspect --format '{{ .State.Running }}' consul) ] && \ |
| 162 | [ $(docker inspect --format '{{ .State.Running }}' cbs) ] && \ |
| 163 | [ $(docker inspect --format '{{ .State.Running }}' buscontroller) ] |
| 164 | then |
| 165 | echo "Data Router, Consul, Config Binding Service, Buscontroller Services Running" |
| 166 | break |
| 167 | else |
| 168 | echo sleep $i |
| 169 | sleep $i |
| 170 | fi |
| 171 | done |
| 172 | sleep 10 |
| 173 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 174 | #Pass any variables required by Robot test suites in ROBOT_VARIABLES |
LiamBurke | a451619 | 2019-02-11 12:28:55 +0000 | [diff] [blame] | 175 | 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}" |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 176 | |
LiamBurke | cf7c8ca | 2019-03-15 15:25:23 +0000 | [diff] [blame] | 177 | pip install jsonschema uuid simplejson |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 178 | # Wait container ready |
| 179 | sleep 2 |
| 180 | |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 181 | # Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server. |
rajendrajaiswal | 0d357f3 | 2018-09-28 10:18:19 +0100 | [diff] [blame] | 182 | cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json |
Gary Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 183 | sed -i 's/sftpserver/'${SFTP_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json |
LiamBurke | a451619 | 2019-02-11 12:28:55 +0000 | [diff] [blame] | 184 | sed -i 's/sftpport/'${SFTP_PORT}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json |
Gary Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 185 | docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/admin/ |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 186 | |
| 187 | # Data Router Configuration: |
| 188 | # Create default feed and create file consumer subscriber on data router |
egernug | 6f2874b | 2019-02-06 15:16:54 +0000 | [diff] [blame] | 189 | curl -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 Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 190 | cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/addSubscriber.json /tmp/addSubscriber.json |
Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 191 | sed -i 's/fileconsumer/'${DR_SUBSCIBER_IP}'/g' /tmp/addSubscriber.json |
egernug | 6f2874b | 2019-02-06 15:16:54 +0000 | [diff] [blame] | 192 | 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 |
rajendrajaiswal | b99eedc | 2018-10-02 09:42:23 +0100 | [diff] [blame] | 193 | sleep 10 |
LiamBurke | f708f84 | 2018-10-10 09:26:26 +0000 | [diff] [blame] | 194 | curl -k https://$DR_PROV_IP:8443/internal/prov |
LiamBurke | a451619 | 2019-02-11 12:28:55 +0000 | [diff] [blame] | 195 | |
| 196 | else |
| 197 | ############################################################ |
| 198 | ############################################################ |
| 199 | # Executes the below setup in an ONAP Environment # |
| 200 | # Make sure the steps in the README are completed first !! # |
| 201 | ############################################################ |
| 202 | ############################################################ |
| 203 | SFTP_PORT=2222 |
| 204 | |
| 205 | cp $WORKSPACE/plans/usecases/5G-bulkpm/teardown.sh $WORKSPACE/plans/usecases/5G-bulkpm/teardown.sh.orig |
| 206 | cp $WORKSPACE/plans/usecases/5G-bulkpm/onap.teardown.sh $WORKSPACE/plans/usecases/5G-bulkpm/teardown.sh |
| 207 | |
| 208 | #Get DataFileCollector POD name in this ONAP Deployment |
| 209 | DFC_POD=$(kubectl -n onap get pods | grep datafile-collector | awk '{print $1}') |
| 210 | export DFC_POD=${DFC_POD} |
| 211 | export CLI_EXEC_CLI_DFC="kubectl exec -n onap ${DFC_POD} -it ls /target | grep .gz" |
| 212 | |
| 213 | # Get IP address of datarrouter-prov |
| 214 | DR_PROV_IP=$(kubectl -n onap -o wide get pods | grep dmaap-dr-prov | awk '{print $6}') |
| 215 | echo DR_PROV_IP=${DR_PROV_IP} |
| 216 | DR_NODE_IP=$(kubectl -n onap -o=wide get pods | grep dmaap-dr-node | awk '{print $6}') |
| 217 | echo DR_NODE_IP=${DR_NODE_IP} |
| 218 | |
| 219 | # Get IP address of exposed Ves and its port |
| 220 | DMAAP_MR_IP=$(kubectl -n onap -o=wide get pods | grep dev-dmaap-message-router | grep -Ev "kafka|zookeeper" | awk '{print $6}') |
| 221 | VESC_IP=$(kubectl get svc -n onap | grep vesc | awk '{print $4}') |
| 222 | VESC_PORT=$(kubectl get svc -n onap | grep vesc | awk '{print $5}' | cut -d ":" -f2 | cut -d "/" -f1) |
| 223 | echo VESC_IP=${VESC_IP} |
| 224 | echo VESC_PORT=${VESC_PORT} |
| 225 | |
| 226 | export VESC_IP=${VESC_IP} |
| 227 | export VESC_PORT=${VESC_PORT} |
| 228 | export HOST_IP=${HOST_IP} |
| 229 | export DMAAP_MR_IP=${DMAAP_MR_IP} |
| 230 | |
| 231 | #Get DataFileCollector POD name in this ONAP Deployment |
| 232 | DFC_POD=$(kubectl -n onap get pods | grep datafile-collector | awk '{print $1}') |
| 233 | export DFC_POD=${DFC_POD} |
| 234 | |
LiamBurke | cf7c8ca | 2019-03-15 15:25:23 +0000 | [diff] [blame] | 235 | pip install jsonschema uuid simplejson |
LiamBurke | a451619 | 2019-02-11 12:28:55 +0000 | [diff] [blame] | 236 | |
| 237 | # Clone DMaaP Data Router repo |
| 238 | mkdir -p $WORKSPACE/archives/dmaapdr |
| 239 | cd $WORKSPACE/archives/dmaapdr |
| 240 | git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master |
| 241 | cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources |
| 242 | mkdir docker-compose |
| 243 | cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose |
| 244 | 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 |
| 245 | |
| 246 | #Statup the SFTP and FileConsumer containers. |
| 247 | docker login -u docker -p docker nexus3.onap.org:10001 |
| 248 | docker-compose up -d |
| 249 | |
| 250 | # Wait container ready |
| 251 | sleep 2 |
| 252 | HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') |
| 253 | # SFTP Configuration: |
| 254 | # Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server. |
| 255 | cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json |
| 256 | sed -i 's/sftpserver/'${HOST_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json |
| 257 | sed -i 's/sftpport/'${SFTP_PORT}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json |
| 258 | docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/admin/ |
| 259 | |
| 260 | # Create default feed and create file consumer subscriber on data router |
| 261 | 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 |
| 262 | cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/addSubscriber.json /tmp/addSubscriber.json |
| 263 | sed -i 's/fileconsumer/'${HOST_IP}'/g' /tmp/addSubscriber.json |
| 264 | 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 |
| 265 | sleep 10 |
| 266 | curl -k https://$DR_PROV_IP:8443/internal/prov |
| 267 | |
| 268 | #Pass any variables required by Robot test suites in ROBOT_VARIABLES |
| 269 | 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} " |
| 270 | |
LiamBurke | cf7c8ca | 2019-03-15 15:25:23 +0000 | [diff] [blame] | 271 | fi; |