Thomas Vachuska | 4cfcc56 | 2015-06-03 09:51:02 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Checks ONOS summary data |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | aux=/tmp/stc-$$.log |
| 7 | trap "rm -f $aux $aux.1 $aux.2 2>/dev/null" EXIT |
| 8 | |
| 9 | onos ${1:-$OCI} "onos:summary" > $aux |
| 10 | cat $aux |
| 11 | |
| 12 | let status=0 |
Thomas Vachuska | e76f653 | 2015-07-08 09:40:53 -0700 | [diff] [blame] | 13 | grep -q "nodes=${2:-.*}" $aux || let status=status+1 |
| 14 | grep -q "devices=${3:-.*}" $aux || let status=status+1 |
| 15 | grep -q "links=${4:-.*}" $aux || let status=status+1 |
| 16 | grep -q "hosts=${5:-.*}" $aux || let status=status+1 |
| 17 | grep -q "flows=${6:-.*}" $aux || let status=status+1 |
| 18 | grep -q "intents=${7:-.*}" $aux || let status=status+1 |
Thomas Vachuska | 4cfcc56 | 2015-06-03 09:51:02 -0700 | [diff] [blame] | 19 | |
| 20 | exit $status |