Thomas Vachuska | eb13564 | 2015-07-23 17:35:37 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Checks ONOS summary data |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | aux=/tmp/stc-$$.log |
Thomas Vachuska | 4b84baf | 2015-07-27 10:49:06 -0700 | [diff] [blame] | 7 | trap "rm -f $aux 2>/dev/null" EXIT |
Thomas Vachuska | eb13564 | 2015-07-23 17:35:37 -0700 | [diff] [blame] | 8 | |
| 9 | onos ${1:-$OCI} "onos:flows" > $aux |
| 10 | cat $aux |
| 11 | |
Ray Milkey | 627f0e5 | 2016-02-24 13:38:29 -0800 | [diff] [blame] | 12 | for i in {1..5}; do |
| 13 | let status=0 |
| 14 | grep "PENDING_" $aux && let status=status+1 |
| 15 | if [ "$status" == "0" ] |
| 16 | then |
| 17 | exit 0 |
| 18 | fi |
| 19 | sleep 5 |
| 20 | done |
| 21 | exit 1 |