aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functest/odl-sfc/sfc_tacker_test2.bash
blob: 156b19cb9f81da837665a1fc5aad8d0e50c3b25e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
BASEDIR=`dirname $0`

#import VNF descriptor
tacker vnfd-create --vnfd-file ${BASEDIR}/vnfd-templates/test2-vnfd1.yaml
tacker vnfd-create --vnfd-file ${BASEDIR}/vnfd-templates/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