summaryrefslogtreecommitdiffstats
path: root/tests/functest/odl-sfc/sfc_tacker_test2.bash
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functest/odl-sfc/sfc_tacker_test2.bash')
-rwxr-xr-xtests/functest/odl-sfc/sfc_tacker_test2.bash29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/functest/odl-sfc/sfc_tacker_test2.bash b/tests/functest/odl-sfc/sfc_tacker_test2.bash
new file mode 100755
index 00000000..04e6506e
--- /dev/null
+++ b/tests/functest/odl-sfc/sfc_tacker_test2.bash
@@ -0,0 +1,29 @@
+#!/bin/bash
+BASEDIR=`dirname $0`
+
+#import VNF descriptor
+tacker vnfd-create --vnfd-file ${BASEDIR}/test2-vnfd1.yaml
+tacker vnfd-create --vnfd-file ${BASEDIR}/test2-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,testVNF2
+
+#create classifier
+tacker sfc-classifier-create --name red_http --chain red --match source_port=0,dest_port=80,protocol=6
+
+tacker sfc-list
+tacker sfc-classifier-list