aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/features/sfc/sfc_tacker.bash
blob: 690d5f52ef8f4410a15edfd030d984894f158053 (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
30
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
test job is completed, Yardstick reads test results via ReST API from Storperf and posts test data to the influxDB. 2. Additionally, Storperf can run tests by itself and post the test result directly to the InfluxDB. The method for posting data directly to influxDB will be supported in the future. Our plan is to support rest-api in D release so that other testing projects can call the rest-api to use yardstick dispatcher service to push data to yardstick's influxdb database. For now, influxdb only support line protocol, and the json protocol is deprecated. Take ping test case for example, the raw_result is json format like this: :: "benchmark": { "timestamp": 1470315409.868095, "errors": "", "data": { "rtt": { "ares": 1.125 } }, "sequence": 1 }, "runner_id": 2625 } With the help of "influxdb_line_protocol", the json is transform to like below as a line string: :: 'ping,deploy_scenario=unknown,host=athena.demo,installer=unknown,pod_name=unknown, runner_id=2625,scenarios=Ping,target=ares.demo,task_id=77755f38-1f6a-4667-a7f3- 301c99963656,version=unknown rtt.ares=1.125 1470315409868094976' So, for data output of json format, you just need to transform json into line format and call influxdb api to post the data into the database. All this function has been implemented in Influxdb_. If you need support on this, please contact Mingjiang_. :: curl -i -XPOST 'http://104.197.68.199:8086/write?db=yardstick' -- data-binary 'ping,deploy_scenario=unknown,host=athena.demo,installer=unknown, ...' Grafana will be used for visualizing the collected test data, which is shown in Visual_. Grafana can be accessed by Login_. .. image:: images/results_visualization.png :width: 800px :alt: results visualization