summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-07-22 11:08:08 +0200
committerDaniil Baturin <daniil@baturin.org>2019-07-22 11:08:08 +0200
commit6af7b74e2b80b014a80c0c8531b7e219194a9d92 (patch)
tree2fc50e087eb759ecc9a73dbc486d537d651c200c /op-mode-definitions
parentb050fe61956f710e61d8e3a8139c971a23e702f9 (diff)
parentd99bf6a3a623433e743bb2d1d72e2ef3e0ab5057 (diff)
downloadvyos-1x-6af7b74e2b80b014a80c0c8531b7e219194a9d92.tar.gz
vyos-1x-6af7b74e2b80b014a80c0c8531b7e219194a9d92.zip
Merge branch 'current' into equuleus
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/dhcp.xml61
-rw-r--r--op-mode-definitions/ipoe-server.xml26
-rw-r--r--op-mode-definitions/pppoe-server.xml2
-rw-r--r--op-mode-definitions/pptp-server.xml2
-rw-r--r--op-mode-definitions/show-protocols-bfd.xml30
-rw-r--r--op-mode-definitions/version.xml6
6 files changed, 118 insertions, 9 deletions
diff --git a/op-mode-definitions/dhcp.xml b/op-mode-definitions/dhcp.xml
index a7d09304e..f142cdd0e 100644
--- a/op-mode-definitions/dhcp.xml
+++ b/op-mode-definitions/dhcp.xml
@@ -9,7 +9,7 @@
<children>
<node name="server">
<properties>
- <help>Show DHCP information</help>
+ <help>Show DHCP server information</help>
</properties>
<children>
<node name="leases">
@@ -20,9 +20,30 @@
<children>
<tagNode name="pool">
<properties>
- <help>Show DHCP leases for a specific pool</help>
+ <help>Show DHCP server leases for a specific pool</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script>
+ </completionHelp>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $4</command>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $6</command>
+ </tagNode>
+ <tagNode name="sort">
+ <properties>
+ <help>Show DHCP server leases sorted by the specified key</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed sort</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --sort $6</command>
+ </tagNode>
+ <tagNode name="state">
+ <properties>
+ <help>Show DHCP server leases with a specific state (can be multiple, comma-separated)</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed state</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --state $(echo $6 | tr , " ")</command>
</tagNode>
</children>
</node>
@@ -35,8 +56,11 @@
<tagNode name="pool">
<properties>
<help>Show DHCP server statistics for a specific pool</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script>
+ </completionHelp>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $4</command>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $6</command>
</tagNode>
</children>
</node>
@@ -59,6 +83,35 @@
<help>Show DHCPv6 server leases</help>
</properties>
<command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases</command>
+ <children>
+ <tagNode name="pool">
+ <properties>
+ <help>Show DHCPv6 server leases for a specific pool</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --allowed pool</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --pool $6</command>
+ </tagNode>
+ <tagNode name="sort">
+ <properties>
+ <help>Show DHCPv6 server leases sorted by the specified key</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --allowed sort</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --sort $6</command>
+ </tagNode>
+ <tagNode name="state">
+ <properties>
+ <help>Show DHCPv6 server leases with a specific state (can be multiple, comma-separated)</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --allowed state</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --state $(echo $6 | tr , " ")</command>
+ </tagNode>
+ </children>
</node>
</children>
</node>
diff --git a/op-mode-definitions/ipoe-server.xml b/op-mode-definitions/ipoe-server.xml
new file mode 100644
index 000000000..ea14e9a5c
--- /dev/null
+++ b/op-mode-definitions/ipoe-server.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ipoe-server">
+ <properties>
+ <help>show ipoe-server status</help>
+ </properties>
+ <children>
+ <leafNode name="sessions">
+ <properties>
+ <help>Show active IPoE server sessions</help>
+ </properties>
+ <command>/usr/bin/accel-cmd -p 2002 show sessions ifname,called-sid,calling-sid,ip,ip6,ip6-dp,rate-limit,state,uptime,sid</command>
+ </leafNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show IPoE server statistics</help>
+ </properties>
+ <command>/usr/bin/accel-cmd -p 2002 show stat</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/pppoe-server.xml b/op-mode-definitions/pppoe-server.xml
index d8a518573..a2366c710 100644
--- a/op-mode-definitions/pppoe-server.xml
+++ b/op-mode-definitions/pppoe-server.xml
@@ -11,7 +11,7 @@
<properties>
<help>Show active PPPoE server sessions</help>
</properties>
- <command>/usr/bin/accel-cmd 'show sessions ifname,username,ip,calling-sid,rate-limit,state,uptime,rx-bytes,tx-bytes'</command>
+ <command>/usr/bin/accel-cmd 'show sessions ifname,username,ip,ip6,ip6-dp,calling-sid,rate-limit,state,uptime,rx-bytes,tx-bytes'</command>
</leafNode>
<leafNode name="statistics">
<properties>
diff --git a/op-mode-definitions/pptp-server.xml b/op-mode-definitions/pptp-server.xml
index 7f141dc53..388063885 100644
--- a/op-mode-definitions/pptp-server.xml
+++ b/op-mode-definitions/pptp-server.xml
@@ -9,7 +9,7 @@
<children>
<leafNode name="sessions">
<properties>
- <help>Show active PPPoE server sessions</help>
+ <help>Show active PPTP server sessions</help>
</properties>
<command>/usr/bin/accel-cmd -p 2003 'show sessions'</command>
</leafNode>
diff --git a/op-mode-definitions/show-protocols-bfd.xml b/op-mode-definitions/show-protocols-bfd.xml
new file mode 100644
index 000000000..3c682d6f7
--- /dev/null
+++ b/op-mode-definitions/show-protocols-bfd.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="protocols">
+ <children>
+ <node name="bfd">
+ <children>
+ <node name="peer">
+ <properties>
+ <help>Show all Bidirectional Forwarding Detection (BFD) peer status</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bfd peers"</command>
+ </node>
+ <tagNode name="peer">
+ <properties>
+ <help>Show Bidirectional Forwarding Detection (BFD) peer status</help>
+ <completionHelp>
+ <script>/usr/bin/vtysh -c "show bfd peer" | grep peer | awk '{print $2}'</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bfd peer $5"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/version.xml b/op-mode-definitions/version.xml
index 593785f7a..57931fdff 100644
--- a/op-mode-definitions/version.xml
+++ b/op-mode-definitions/version.xml
@@ -6,19 +6,19 @@
<properties>
<help>Show system version information</help>
</properties>
- <command>${vyos_op_scripts_dir}/version.py</command>
+ <command>sudo ${vyos_op_scripts_dir}/version.py</command>
<children>
<leafNode name="funny">
<properties>
<help>Show system version and some fun stuff</help>
</properties>
- <command>${vyos_op_scripts_dir}/version.py --funny</command>
+ <command>sudo ${vyos_op_scripts_dir}/version.py --funny</command>
</leafNode>
<leafNode name="all">
<properties>
<help>Show system version and versions of all packages</help>
</properties>
- <command>${vyos_op_scripts_dir}/version.py --all</command>
+ <command>sudo ${vyos_op_scripts_dir}/version.py --all</command>
</leafNode>
</children>
</node>