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 |
| 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 | |
| 18 | exit $status |