aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functest/odl-sfc/tacker_client_install.sh
diff options
context:
space:
mode:
authorGeorge Paraskevopoulos <geopar@intracom-telecom.com>2016-11-11 11:05:07 +0200
committerGeorge Paraskevopoulos <geopar@intracom-telecom.com>2016-11-15 10:19:47 +0200
commit45e3e5662af2997d633bd02a2eb0c7553f442e6e (patch)
treee938c410c58e0d43b37e4bd0d618df21c2245bed /tests/functest/odl-sfc/tacker_client_install.sh
parent73c4d745bf2bba060dc8301a9127482f01318de1 (diff)
Copy odl-sfc test from functest to the sfc repo
Migrate odl-sfc testcase from functest repo First related functest commit: 65a5f65fa06c97456f37ca2434cf9e6fc9b758aa Last related functest commit: caa06d8d7b55a1c0608a72f809785d8f418cf541 Change-Id: I206f25d6fb44564b8b163ebb9c43e038851bea71 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
Diffstat (limited to 'tests/functest/odl-sfc/tacker_client_install.sh')
-rwxr-xr-xtests/functest/odl-sfc/tacker_client_install.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/functest/odl-sfc/tacker_client_install.sh b/tests/functest/odl-sfc/tacker_client_install.sh
new file mode 100755
index 00000000..adb9a44b
--- /dev/null
+++ b/tests/functest/odl-sfc/tacker_client_install.sh
@@ -0,0 +1,43 @@
+MYDIR=$(dirname $(readlink -f "$0"))
+CLIENT=$(echo python-python-tackerclient_*_all.deb)
+CLIREPO="tacker-client"
+
+# Function checks whether a python egg is available, if not, installs
+function chkPPkg() {
+ PKG="$1"
+ IPPACK=$(python - <<'____EOF'
+import pip
+from os.path import join
+for package in pip.get_installed_distributions():
+ print(package.location)
+ print(join(package.location, *package._get_metadata("top_level.txt")))
+____EOF
+)
+ echo "$IPPACK" | grep -q "$PKG"
+ if [ $? -ne 0 ];then
+ pip install "$PKG"
+ fi
+}
+
+function envSetup() {
+ apt-get install -y python-all debhelper fakeroot
+ #pip install --upgrade python-keystoneclient==1.7.4
+ chkPPkg stdeb
+}
+
+# Function installs python-tackerclient from github
+function deployTackerClient() {
+ cd $MYDIR
+ git clone -b 'SFC_refactor' https://github.com/trozet/python-tackerclient.git $CLIREPO
+ cd $CLIREPO
+ python setup.py --command-packages=stdeb.command bdist_deb
+ cd "deb_dist"
+ CLIENT=$(echo python-python-tackerclient_*_all.deb)
+ cp $CLIENT $MYDIR
+ dpkg -i "${MYDIR}/${CLIENT}"
+ apt-get -f -y install
+ dpkg -i "${MYDIR}/${CLIENT}"
+}
+
+envSetup
+deployTackerClient