aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-07-19 12:36:08 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-07-19 12:36:08 -0700
commit6d46bb5e9428083cd7d4cd8bf3f96d156cf72584 (patch)
tree0835a145b23e71c74d19205a08a1237670714f16
parent6b60c21f73a03da2f8eead8d12084f10b217616d (diff)
No longer install openstack client each time
Assume that the running system already has openstack CLI installed. Change-Id: Ie5d10b8a7b938895fcf71cd5ef0001b7b904ec8a Issue-ID: INT-532 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
-rwxr-xr-xtest/ete/scripts/install_openstack_cli.sh25
1 files changed, 6 insertions, 19 deletions
diff --git a/test/ete/scripts/install_openstack_cli.sh b/test/ete/scripts/install_openstack_cli.sh
index 842034eef..408aae697 100755
--- a/test/ete/scripts/install_openstack_cli.sh
+++ b/test/ete/scripts/install_openstack_cli.sh
@@ -1,37 +1,25 @@
#!/bin/bash
+if ! hash openstack jq
+then
+ echo "ERROR: Required commands not found; please install openstack CLI and jq."
+ exit 2
+fi
+
if [ -z "$OS_AUTH_URL" ] || [ -z "$OS_USERNAME" ]
then
echo "ERROR: OpenStack environment variables not set. Please source your OpenStack RC script first."
exit 1
fi
-
if [ -z "$WORKSPACE" ]; then
export WORKSPACE=`git rev-parse --show-toplevel`
fi
-
-
-# Assume that if ROBOT_VENV is set, we don't need to reinstall robot
if [ -f ${WORKSPACE}/env.properties ]; then
source ${WORKSPACE}/env.properties
fi
-if [ ! -z "$ONAP_VENV" ] && [ -f "$ONAP_VENV/bin/activate" ]; then
- source ${ONAP_VENV}/bin/activate
-else
- ONAP_VENV=$(mktemp -d --suffix=_onap_venv)
- virtualenv ${ONAP_VENV}
- source ${ONAP_VENV}/bin/activate
-
- pip install --upgrade pip
- pip install python-openstackclient python-heatclient python-designateclient
-
- echo "ONAP_VENV=${ONAP_VENV}" >> $WORKSPACE/env.properties
-fi
-echo "ONAP_VENV=${ONAP_VENV}"
-
if [ -z "$ONAP_WORKDIR" ]; then
ONAP_WORKDIR=$(mktemp -d --suffix=_onap_workdir)
echo "ONAP_WORKDIR=${ONAP_WORKDIR}" >> $WORKSPACE/env.properties
@@ -44,4 +32,3 @@ else
git pull
popd
fi
-