From 6aaca3a4bdc77c804e21ad0a3c1ab5ce4d7d8686 Mon Sep 17 00:00:00 2001 From: Saurabh Mohan Date: Thu, 9 Aug 2012 13:14:49 -0700 Subject: Bugfix 8217: VTI: add clear and monitor interfaces commands. Add support for interface vti for operational commands clear and monitor. --- templates/clear/interfaces/vti/counters/node.def | 2 ++ templates/clear/interfaces/vti/node.def | 1 + templates/clear/interfaces/vti/node.tag/counters/node.def | 2 ++ templates/clear/interfaces/vti/node.tag/node.def | 4 ++++ 4 files changed, 9 insertions(+) create mode 100644 templates/clear/interfaces/vti/counters/node.def create mode 100644 templates/clear/interfaces/vti/node.def create mode 100644 templates/clear/interfaces/vti/node.tag/counters/node.def create mode 100644 templates/clear/interfaces/vti/node.tag/node.def (limited to 'templates/clear') diff --git a/templates/clear/interfaces/vti/counters/node.def b/templates/clear/interfaces/vti/counters/node.def new file mode 100644 index 0000000..8b81d1f --- /dev/null +++ b/templates/clear/interfaces/vti/counters/node.def @@ -0,0 +1,2 @@ +help: Clear all vti interface counters +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf-type="$3" diff --git a/templates/clear/interfaces/vti/node.def b/templates/clear/interfaces/vti/node.def new file mode 100644 index 0000000..1448e18 --- /dev/null +++ b/templates/clear/interfaces/vti/node.def @@ -0,0 +1 @@ +help: Clear vti interface information diff --git a/templates/clear/interfaces/vti/node.tag/counters/node.def b/templates/clear/interfaces/vti/node.tag/counters/node.def new file mode 100644 index 0000000..8832a04 --- /dev/null +++ b/templates/clear/interfaces/vti/node.tag/counters/node.def @@ -0,0 +1,2 @@ +help: Clear interface counters for a given vti interface +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/interfaces/vti/node.tag/node.def b/templates/clear/interfaces/vti/node.tag/node.def new file mode 100644 index 0000000..b7cfb64 --- /dev/null +++ b/templates/clear/interfaces/vti/node.tag/node.def @@ -0,0 +1,4 @@ +help: Clear interface information for a given vti interface +allowed: local -a array ; + array=( /sys/class/net/vti* ) ; + echo -n ${array[@]##*/} -- cgit v1.2.3