blob: ab7c22dd3830cc528aecaa04b0e4275cf297c7f3 [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
Thomas Vachuska4b84baf2015-07-27 10:49:06 -07007trap "rm -f $aux 2>/dev/null" EXIT
Thomas Vachuska4cfcc562015-06-03 09:51:02 -07008
9onos ${1:-$OCI} "onos:summary" > $aux
10cat $aux
11
12let status=0
Thomas Vachuskae76f6532015-07-08 09:40:53 -070013grep -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
17grep -q "flows=${6:-.*}" $aux || let status=status+1
18grep -q "intents=${7:-.*}" $aux || let status=status+1
Thomas Vachuska4cfcc562015-06-03 09:51:02 -070019
20exit $status