Thomas Vachuska | eb13564 | 2015-07-23 17:35:37 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Checks ONOS summary data |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
Jon Hall | fb6009d | 2017-02-15 16:01:17 -0800 | [diff] [blame] | 6 | aux=/tmp/stc/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 | |
Ray Milkey | 407ef25 | 2016-06-14 11:30:52 -0700 | [diff] [blame] | 9 | for i in {1..6}; do |
Thomas Vachuska | da0665b | 2016-03-02 19:06:17 -0800 | [diff] [blame] | 10 | onos ${1:-$OCI} "onos:flows" > $aux |
| 11 | if grep "PENDING_" $aux; then |
| 12 | sleep 5 |
| 13 | else |
| 14 | cat $aux |
Ray Milkey | 627f0e5 | 2016-02-24 13:38:29 -0800 | [diff] [blame] | 15 | exit 0 |
| 16 | fi |
Ray Milkey | 627f0e5 | 2016-02-24 13:38:29 -0800 | [diff] [blame] | 17 | done |
Thomas Vachuska | da0665b | 2016-03-02 19:06:17 -0800 | [diff] [blame] | 18 | cat $aux |
Ray Milkey | 627f0e5 | 2016-02-24 13:38:29 -0800 | [diff] [blame] | 19 | exit 1 |