From c72cbf80d0674a745fef2effb3c2f6dbcf5bf98e Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Tue, 15 Dec 2015 15:08:54 -0800 Subject: Add vppctl as a simple cli interface to vpp This patch provides a pretty simple hack on top of vpe_api_test to give users a cli interface to vpp. Example: sudo vppctl show api client sudo vppctl show int It has the advantage that users can use bash shell scripting and history with it. Change-Id: I621dd8e29269e14a83b4887f20adcfbe5f946b99 Signed-off-by: Ed Warnicke --- build-data/packages/vppctl.mk | 11 +++++++++++ build-data/platforms/vpp.mk | 2 +- vppctl/Makefile.am | 2 ++ vppctl/configure.ac | 4 ++++ vppctl/vppctl | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 build-data/packages/vppctl.mk create mode 100644 vppctl/Makefile.am create mode 100644 vppctl/configure.ac create mode 100755 vppctl/vppctl diff --git a/build-data/packages/vppctl.mk b/build-data/packages/vppctl.mk new file mode 100644 index 00000000..a5f8757b --- /dev/null +++ b/build-data/packages/vppctl.mk @@ -0,0 +1,11 @@ +vppctl_configure_depend = \ + vppinfra-install \ + dpdk-install \ + svm-install \ + vlib-api-install \ + vlib-install \ + vnet-install \ + vpp-install \ + vpp-api-test-install + + diff --git a/build-data/platforms/vpp.mk b/build-data/platforms/vpp.mk index a09b0307..b84fc976 100644 --- a/build-data/platforms/vpp.mk +++ b/build-data/platforms/vpp.mk @@ -16,7 +16,7 @@ vpp_arch = native vpp_native_tools = vppapigen vpp_root_packages = vpp vlib vlib-api vnet svm dpdk vpp-api-test \ - vpp-japi + vpp-japi vppctl vpp_configure_args_vpp = --with-dpdk vnet_configure_args_vpp = --with-dpdk diff --git a/vppctl/Makefile.am b/vppctl/Makefile.am new file mode 100644 index 00000000..d556cb2a --- /dev/null +++ b/vppctl/Makefile.am @@ -0,0 +1,2 @@ + +dist_bin_SCRIPTS = vppctl diff --git a/vppctl/configure.ac b/vppctl/configure.ac new file mode 100644 index 00000000..04210194 --- /dev/null +++ b/vppctl/configure.ac @@ -0,0 +1,4 @@ +AC_INIT([vppctl], [1.0]) +AM_INIT_AUTOMAKE([foreign -Wall -Werror]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/vppctl/vppctl b/vppctl/vppctl new file mode 100755 index 00000000..b789493f --- /dev/null +++ b/vppctl/vppctl @@ -0,0 +1,2 @@ +#!/bin/bash +echo exec ${@} | vpe_api_test | sed 's/vat# //g' -- cgit 1.2.3-korg