blob: 008506e7819771b62f7fe5cc2303921cb8d89929 [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
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