aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/features/sfc/sfc_tacker.bash
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-11-08 14:18:12 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-11-09 16:55:45 +0100
commit107e61635c2ab1feb5263380ea63e21cf2e6e65b (patch)
tree4966b77605bd34a40f452b1d268868691e84d008 /functest/opnfv_tests/features/sfc/sfc_tacker.bash
parente74c9b347f2623eb1a3c477921a84da4c31b364f (diff)
Repo structure modification
- create functest subdirectory - rename unit tests - adapt path in exec and config files JIRA: FUNCTEST-525 Change-Id: Ifd5c6edfb5bda1b09f82848e2269ad5fbeb84d0a Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'functest/opnfv_tests/features/sfc/sfc_tacker.bash')
-rwxr-xr-xfunctest/opnfv_tests/features/sfc/sfc_tacker.bash31
1 files changed, 31 insertions, 0 deletions
diff --git a/functest/opnfv_tests/features/sfc/sfc_tacker.bash b/functest/opnfv_tests/features/sfc/sfc_tacker.bash
new file mode 100755
index 00000000..690d5f52
--- /dev/null
+++ b/functest/opnfv_tests/features/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