blob: e3406ec451550e1ffe9e5efca0789af99a101a98 [file] [log] [blame]
Thomas Vachuskaeb135642015-07-23 17:35:37 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Checks ONOS summary data
4# -----------------------------------------------------------------------------
5
Jon Hallfb6009d2017-02-15 16:01:17 -08006aux=/tmp/stc/stc-$$.log
Thomas Vachuska4b84baf2015-07-27 10:49:06 -07007trap "rm -f $aux 2>/dev/null" EXIT
Thomas Vachuskaeb135642015-07-23 17:35:37 -07008
Ray Milkey407ef252016-06-14 11:30:52 -07009for i in {1..6}; do
Thomas Vachuskada0665b2016-03-02 19:06:17 -080010 onos ${1:-$OCI} "onos:flows" > $aux
11 if grep "PENDING_" $aux; then
12 sleep 5
13 else
14 cat $aux
Ray Milkey627f0e52016-02-24 13:38:29 -080015 exit 0
16 fi
Ray Milkey627f0e52016-02-24 13:38:29 -080017done
Thomas Vachuskada0665b2016-03-02 19:06:17 -080018cat $aux
Ray Milkey627f0e52016-02-24 13:38:29 -080019exit 1