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