From b09167f33d3c79e7ccc27e0fc484cc5fbcdb9943 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Mon, 5 Dec 2016 16:25:28 +0000 Subject: acl: The ACL plugin. This is the commit from the accumulated work in the github ACL branch, to move it to gerrit. Change-Id: I85a6b0df0d3dd3c3c7588e92a1e22c553e4b6ef7 Signed-off-by: Andrew Yourtchenko --- plugins/acl-plugin/test/run-python | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 plugins/acl-plugin/test/run-python (limited to 'plugins/acl-plugin/test/run-python') diff --git a/plugins/acl-plugin/test/run-python b/plugins/acl-plugin/test/run-python new file mode 100755 index 00000000000..215eb17aa8d --- /dev/null +++ b/plugins/acl-plugin/test/run-python @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Do all the legwork to run a scapy shell with APIs available for load +# +CURR_DIR=`pwd` +ROOT_DIR=`git rev-parse --show-toplevel` +cd $ROOT_DIR +sudo apt-get install -y python-virtualenv +# uncomment the line below to enable build of plugins and api each time +# make plugins && make build-vpp-api || exit +virtualenv virtualenv +virtualenv/bin/pip install ipaddress +virtualenv/bin/pip install scapy +# install the python API into the virtualenv +cd $ROOT_DIR/vpp-api/python/ +$ROOT_DIR/virtualenv/bin/python setup.py install +# install the python ACL plugin API into the virtualenv +ACL_PLUGIN_SETUP_DIR=`find $ROOT_DIR/build-root -name acl-plugin` +cd $ACL_PLUGIN_SETUP_DIR; +$ROOT_DIR/virtualenv/bin/python setup.py install +cd $ROOT_DIR +# figure out the shared library path and start scapy +export LD_LIBRARY_PATH=`pwd`/`find . -name "libpneum.so" -exec dirname {} \; | grep lib64 | head -n 1` +cd $CURR_DIR +sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH $ROOT_DIR/virtualenv/bin/python $1 $2 $3 $4 $5 $6 $7 $8 $9 + + + -- cgit 1.2.3-korg