aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/bin/onos-check-summary
blob: ab7c22dd3830cc528aecaa04b0e4275cf297c7f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# -----------------------------------------------------------------------------
# Checks ONOS summary data
# -----------------------------------------------------------------------------

aux=/tmp/stc-$$.log
trap "rm -f $aux 2>/dev/null" EXIT

onos ${1:-$OCI} "onos:summary" > $aux
cat $aux

let status=0
grep -q "nodes=${2:-.*}" $aux || let status=status+1
grep -q "devices=${3:-.*}" $aux || let status=status+1
grep -q "links=${4:-.*}" $aux || let status=status+1
grep -q "hosts=${5:-.*}" $aux || let status=status+1
grep -q "flows=${6:-.*}" $aux || let status=status+1
grep -q "intents=${7:-.*}" $aux || let status=status+1

exit $status