Skip to content
Snippets Groups Projects
Commit 9434ade7 authored by David Schmitz's avatar David Schmitz
Browse files

vnet_router: update

parent ff1b6fa0
No related branches found
No related tags found
No related merge requests found
......@@ -55,17 +55,17 @@
# (built from router-container/Dockerfile , but currently fails to be rebuilt):
FROM cejkat/fod-router
# 2. copy vnet_router management script + snmp feeder pass_persisttest_bgpflowspec (+ pass_persisttest only for testing/demonstration)
COPY vnet_router/fod_vnet_router /
COPY vnet_router/snmp/pass_persisttest_bgpflowspec /
COPY vnet_router/snmp/snmp-release/pass_persisttest /
##
# 3. install all dependencies in advance (/fod_vnet_router --init.sysstart will check again and might install anything still missing)
# 2. install all dependencies in advance (/fod_vnet_router --init.sysstart will check again and might install anything still missing)
RUN apt-get -qqy update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -qqy install mininet iptables iproute2 tcpdump tshark iputils-ping iputils-tracepath hping3 gawk sshpass lsof strace snmpd snmp
# 3. copy vnet_router management script + snmp feeder pass_persisttest_bgpflowspec (+ pass_persisttest only for testing/demonstration)
COPY vnet_router/fod_vnet_router /
COPY vnet_router/snmp/pass_persisttest_bgpflowspec /
COPY vnet_router/snmp/snmp-release/pass_persisttest /
##
# 4. default start command:
......
......@@ -125,11 +125,25 @@ elif [ "$1" = "--loop" ]; then #arg
elif [ "$1" = "--process1" ]; then #arg
shift 1
"$0" --get_netconf_data "$@" | "$0" --parse_netconf_to_ruleinfo | "$0" --process_ruleinfo
tmpfile1="$(mktemp XXXXXXXXXXXX.list)"
set -o pipefail
"$0" --get_netconf_data "$@" | "$0" --parse_netconf_to_ruleinfo > "$tmpfile1"
status1="$?"
if [ "$status1" != 0 ]; then
echo "$0: get_netconf_data failed: $status1" 1>&2
rm -f "$tmpfile1"
exit "$status1"
else
"$0" --process_ruleinfo < "$tmpfile1"
rm -f "$tmpfile1"
fi
elif [ "$1" = "--get_ruleinfo" ]; then #arg
shift 1
set -o pipefail
"$0" --get_netconf_data | "$0" --parse_netconf_to_ruleinfo
elif [ "$1" = "--process_netconf" ]; then #arg
......@@ -152,6 +166,7 @@ elif [ "$1" = "--parse_netconf_to_ruleinfo" -o "$1" = "--parse" ]; then #arg
shift 1
which gawk &>/dev/null || apt-get install gawk 1>&2
exec gawk '
function esc1(val) {
......@@ -212,7 +227,6 @@ elif [ "$1" = "--parse_netconf_to_ruleinfo" -o "$1" = "--parse" ]; then #arg
' FS='[<>]'
elif [ "$1" = "--process_ruleinfo" ]; then #arg
shift 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment