summaryrefslogtreecommitdiffstats
path: root/vnfs/vLBMS/scripts/v_packetgen_install.sh
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-08-28 11:48:14 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-08-29 10:42:32 -0700
commita0081c9434b6ef4b43ef29af01b1f1f06dcc0b25 (patch)
treed8f2d0c65032858416c1bf423ff050d877901b76 /vnfs/vLBMS/scripts/v_packetgen_install.sh
parent0ad71d0595d732590aed545cf972f28627b12d64 (diff)
Retrieve demo artifacts via nexus REST API
This supports the use of SNAPSHOT demo artifacts in the vnf HEAT templates. Change-Id: I980c879819b1a396c985c7a2af1885b28e4f150a Issue-ID: INT-592 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'vnfs/vLBMS/scripts/v_packetgen_install.sh')
-rw-r--r--vnfs/vLBMS/scripts/v_packetgen_install.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/vnfs/vLBMS/scripts/v_packetgen_install.sh b/vnfs/vLBMS/scripts/v_packetgen_install.sh
index ff1a9222..333218be 100644
--- a/vnfs/vLBMS/scripts/v_packetgen_install.sh
+++ b/vnfs/vLBMS/scripts/v_packetgen_install.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-REPO_URL_ARTIFACTS=$(cat /opt/config/repo_url_artifacts.txt)
+NEXUS_ARTIFACT_REPO=$(cat /opt/config/nexus_artifact_repo.txt)
DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt)
+if [[ "$DEMO_ARTIFACTS_VERSION" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
NB_API_VERSION=$(cat /opt/config/nb_api_version.txt)
INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt)
CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
@@ -58,7 +59,7 @@ unzip -p -j /opt/vlbms-scripts-$INSTALL_SCRIPT_VERSION.zip vpacketgen.sh > /opt/
unzip -p -j /opt/vlbms-scripts-$INSTALL_SCRIPT_VERSION.zip run_streams_dns.sh > /opt/run_streams_dns.sh
unzip -p -j /opt/vlbms-scripts-$INSTALL_SCRIPT_VERSION.zip properties.conf > /opt/config/properties.conf
unzip -p -j /opt/vlbms-scripts-$INSTALL_SCRIPT_VERSION.zip run_health.sh > /opt/run_health.sh
-wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vlb/vlb_dns_streams/$DEMO_ARTIFACTS_VERSION/vlb_dns_streams-$DEMO_ARTIFACTS_VERSION-demo.tar.gz
+wget -O vlb_dns_streams-$DEMO_ARTIFACTS_VERSION-demo.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vlb&a=vlb_dns_streams&c=demo&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION"
sed -i 's/primary=.*/primary=false/g' /opt/config/properties.conf
sed -i 's/vnfc=.*/vnfc=vPacketGen/g' /opt/config/properties.conf