blob: f4c2df2ceb5f3c14a95a43f57a8a0fd42a75c2c7 [file] [log] [blame]
Thomas Vachuska8189a742015-05-29 10:02:52 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Checks whether all ONOS components are either ACTIVE or DISABLED.
4# -----------------------------------------------------------------------------
5
6aux=/tmp/stc-$$.log
7trap "rm -f $aux 2>/dev/null" EXIT
8
9onos ${1:-$OCI} scr:list > $aux
10cat $aux
Thomas Vachuska4bfccd542015-05-30 00:35:25 -070011grep -q UNSATISFIED $aux && exit 1
12
13if [ -n "$2" ]; then
14 echo "Searching for ACTIVE $2"
15 egrep "ACTIVE.*$2" $aux || exit 1
16fi
17exit 0