summaryrefslogtreecommitdiffstats
path: root/tests/functest/odl-sfc/sfc_tacker.bash
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/sfc_tacker.bash
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/sfc_tacker.bash')
-rwxr-xr-xtests/functest/odl-sfc/sfc_tacker.bash31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/functest/odl-sfc/sfc_tacker.bash b/tests/functest/odl-sfc/sfc_tacker.bash
new file mode 100755
index 00000000..690d5f52
--- /dev/null
+++ b/tests/functest/odl-sfc/sfc_tacker.bash
@@ -0,0 +1,31 @@
+#!/bin/bash
+BASEDIR=`dirname $0`
+
+#import VNF descriptor
+tacker vnfd-create --vnfd-file ${BASEDIR}/test-vnfd1.yaml
+tacker vnfd-create --vnfd-file ${BASEDIR}/test-vnfd2.yaml
+
+#create instances of the imported VNF
+tacker vnf-create --name testVNF1 --vnfd-name test-vnfd1
+tacker vnf-create --name testVNF2 --vnfd-name test-vnfd2
+
+key=true
+while $key;do
+ sleep 3
+ active=`tacker vnf-list | grep -E 'PENDING|ERROR'`
+ echo -e "checking if SFs are up: $active"
+ if [ -z "$active" ]; then
+ key=false
+ fi
+done
+
+#create service chain
+tacker sfc-create --name red --chain testVNF1
+tacker sfc-create --name blue --chain testVNF2
+
+#create classifier
+tacker sfc-classifier-create --name red_http --chain red --match source_port=0,dest_port=80,protocol=6
+tacker sfc-classifier-create --name red_ssh --chain red --match source_port=0,dest_port=22,protocol=6
+
+tacker sfc-list
+tacker sfc-classifier-list