Ray Milkey | 9237067 | 2017-02-21 10:30:43 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # ----------------------------------------------------------------------------- |
| 4 | # Invokes the ONOS CLI and looks for a 'maps' entry with the given name |
| 5 | # ----------------------------------------------------------------------------- |
| 6 | |
| 7 | NODE=$1 |
| 8 | MAP=$2 |
| 9 | ID=$3 |
| 10 | |
| 11 | map_text=`( onos ${NODE} onos:maps ) | grep ${MAP}` |
| 12 | |
| 13 | if [ $? -ne 0 ]; then |
| 14 | exit 1 |
| 15 | fi |
| 16 | |
| 17 | map_size=`echo ${map_text} | sed s#^.*size=##` |
| 18 | echo "@stc ${ID}Size=${map_size}" |