diff options
author | Daniil Baturin <daniil@baturin.org> | 2014-04-06 15:34:46 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2014-04-06 15:34:46 +0200 |
commit | 3a25aaef904600520c9c8a26fc9b251947ca4093 (patch) | |
tree | 4ee854d22a91afbc32dd27f61b2c54ac25ca7638 | |
parent | b4a3df797db20f69c14840142a10557cb7840155 (diff) | |
download | vyatta-op-3a25aaef904600520c9c8a26fc9b251947ca4093.tar.gz vyatta-op-3a25aaef904600520c9c8a26fc9b251947ca4093.zip |
Bug #159: add op mode support for dummy interfaces.
-rwxr-xr-x | gen-monitor-interface-templates.sh | 3 | ||||
-rw-r--r-- | templates/clear/interfaces/dummy/counters/node.def | 2 | ||||
-rw-r--r-- | templates/clear/interfaces/dummy/node.def | 1 | ||||
-rw-r--r-- | templates/clear/interfaces/dummy/node.tag/counters/node.def | 2 | ||||
-rw-r--r-- | templates/clear/interfaces/dummy/node.tag/node.def | 4 | ||||
-rw-r--r-- | templates/show/interfaces/dummy/detail/node.def | 2 | ||||
-rw-r--r-- | templates/show/interfaces/dummy/node.def | 2 | ||||
-rw-r--r-- | templates/show/interfaces/dummy/node.tag/brief/node.def | 2 | ||||
-rw-r--r-- | templates/show/interfaces/dummy/node.tag/node.def | 3 |
9 files changed, 20 insertions, 1 deletions
diff --git a/gen-monitor-interface-templates.sh b/gen-monitor-interface-templates.sh index 67c9e7e..b6e9d5d 100755 --- a/gen-monitor-interface-templates.sh +++ b/gen-monitor-interface-templates.sh @@ -20,7 +20,8 @@ declare -a types=( "pseudo-ethernet" \ "tunnel" \ "vrrp" \ - "vti" + "vti" \ + "dummy" ) TEMPLATE_DIR=generated-templates/monitor/interfaces diff --git a/templates/clear/interfaces/dummy/counters/node.def b/templates/clear/interfaces/dummy/counters/node.def new file mode 100644 index 0000000..08781a6 --- /dev/null +++ b/templates/clear/interfaces/dummy/counters/node.def @@ -0,0 +1,2 @@ +help: Clear all dummy interfaces counters +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf-type="$3" diff --git a/templates/clear/interfaces/dummy/node.def b/templates/clear/interfaces/dummy/node.def new file mode 100644 index 0000000..cc3905d --- /dev/null +++ b/templates/clear/interfaces/dummy/node.def @@ -0,0 +1 @@ +help: Clear dummy interface information diff --git a/templates/clear/interfaces/dummy/node.tag/counters/node.def b/templates/clear/interfaces/dummy/node.tag/counters/node.def new file mode 100644 index 0000000..c75d5fc --- /dev/null +++ b/templates/clear/interfaces/dummy/node.tag/counters/node.def @@ -0,0 +1,2 @@ +help: Clear interface counters for a given dummy interface +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/interfaces/dummy/node.tag/node.def b/templates/clear/interfaces/dummy/node.tag/node.def new file mode 100644 index 0000000..e7abdee --- /dev/null +++ b/templates/clear/interfaces/dummy/node.tag/node.def @@ -0,0 +1,4 @@ +help: Clear interface information for a given dummy interface +allowed: local -a array ; + array=( /sys/class/net/dummy* ) ; + echo -n ${array[@]##*/} diff --git a/templates/show/interfaces/dummy/detail/node.def b/templates/show/interfaces/dummy/detail/node.def new file mode 100644 index 0000000..c4b0479 --- /dev/null +++ b/templates/show/interfaces/dummy/detail/node.def @@ -0,0 +1,2 @@ +help: Show detailed dummy interface information +run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf-type=dummy --action=show diff --git a/templates/show/interfaces/dummy/node.def b/templates/show/interfaces/dummy/node.def new file mode 100644 index 0000000..c0129f2 --- /dev/null +++ b/templates/show/interfaces/dummy/node.def @@ -0,0 +1,2 @@ +help: Show dummy interface information +run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf-type=dummy --action=show-brief diff --git a/templates/show/interfaces/dummy/node.tag/brief/node.def b/templates/show/interfaces/dummy/node.tag/brief/node.def new file mode 100644 index 0000000..fe16173 --- /dev/null +++ b/templates/show/interfaces/dummy/node.tag/brief/node.def @@ -0,0 +1,2 @@ +help: Show summary of specified dummy interface information +run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" --action=show-brief diff --git a/templates/show/interfaces/dummy/node.tag/node.def b/templates/show/interfaces/dummy/node.tag/node.def new file mode 100644 index 0000000..361f2c3 --- /dev/null +++ b/templates/show/interfaces/dummy/node.tag/node.def @@ -0,0 +1,3 @@ +help: Show specified dummy interface information +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show dummy +run: ${vyatta_bindir}/vyatta-show-interfaces.pl --intf="$4" |