blob: daa5253dcfefe834aff0f4e57beedb51969ff015 [file] [log] [blame]
Thomas Vachuska4cfcc562015-06-03 09:51:02 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Checks ONOS summary data
4# -----------------------------------------------------------------------------
5
6aux=/tmp/stc-$$.log
7trap "rm -f $aux $aux.1 $aux.2 2>/dev/null" EXIT
8
9onos ${1:-$OCI} "onos:summary" > $aux
10cat $aux
11
12let status=0
13grep -q "nodes=$2" $aux || let status=status+1
14grep -q "devices=$3" $aux || let status=status+1
15grep -q "links=$4" $aux || let status=status+1
16grep -q "hosts=$5" $aux || let status=status+1
17
18exit $status