aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-api-test
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2016-01-18 10:12:53 -0700
committerEd Warnicke <eaw@cisco.com>2016-01-18 10:14:20 -0700
commit7471c6d7d7e18a8515e49537eb88c8cf7ca6279c (patch)
treea7c23fc0b7cffc1eefd0d4860546cfef3d40411b /vpp-api-test
parent46e88fe905adbd17a82d161042475b1b5a198370 (diff)
Enabled vppctl to provide an interactive shell
Change-Id: Ibfed316570c03a4dd158781c6201f5713837adb4 Signed-off-by: Ed Warnicke <eaw@cisco.com>
Diffstat (limited to 'vpp-api-test')
-rwxr-xr-x[-rw-r--r--]vpp-api-test/scripts/vppctl13
1 files changed, 12 insertions, 1 deletions
diff --git a/vpp-api-test/scripts/vppctl b/vpp-api-test/scripts/vppctl
index b789493f2be..90828f6773b 100644..100755
--- a/vpp-api-test/scripts/vppctl
+++ b/vpp-api-test/scripts/vppctl
@@ -1,2 +1,13 @@
#!/bin/bash
-echo exec ${@} | vpe_api_test | sed 's/vat# //g'
+if [ $# -gt 0 ]; then
+ echo exec ${@} | vpe_api_test | sed 's/vat# //g'
+else
+ echo -n "vpp# "
+ while read CMD; do
+ if [ $CMD == "exit" ]; then
+ exit
+ fi
+ echo exec $CMD | vpe_api_test | sed 's/vat# //g'
+ echo -n "vpp# "
+ done
+fi