summaryrefslogtreecommitdiff
path: root/op-mode-definitions/show-interfaces-wireguard.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-07-22 22:52:47 +0200
committerChristian Poessinger <christian@poessinger.com>2021-07-22 22:52:47 +0200
commit688022de47c366cffbf14f0f3cda511cea585ebc (patch)
tree84c297f1453438deae93818c81656fd20b8379b0 /op-mode-definitions/show-interfaces-wireguard.xml.in
parent4e4dacee281059fdbca6531ace53f22817a62650 (diff)
downloadvyos-1x-688022de47c366cffbf14f0f3cda511cea585ebc.tar.gz
vyos-1x-688022de47c366cffbf14f0f3cda511cea585ebc.zip
xml: op-mode: move "show interfaces wireguard" to dedicated file
Diffstat (limited to 'op-mode-definitions/show-interfaces-wireguard.xml.in')
-rw-r--r--op-mode-definitions/show-interfaces-wireguard.xml.in60
1 files changed, 60 insertions, 0 deletions
diff --git a/op-mode-definitions/show-interfaces-wireguard.xml.in b/op-mode-definitions/show-interfaces-wireguard.xml.in
new file mode 100644
index 000000000..be22bbf98
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-wireguard.xml.in
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="wireguard">
+ <properties>
+ <help>Show Wireguard interface information</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py --type wireguard</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/wireguard.py --showinterface "$4"</command>
+ <children>
+ <leafNode name="allowed-ips">
+ <properties>
+ <help>Show all IP addresses allowed for the specified interface</help>
+ </properties>
+ <command>sudo wg show "$4" allowed-ips</command>
+ </leafNode>
+ <leafNode name="endpoints">
+ <properties>
+ <help>Show all endpoints for the specified interface</help>
+ </properties>
+ <command>sudo wg show "$4" endpoints</command>
+ </leafNode>
+ <leafNode name="peers">
+ <properties>
+ <help>Show all peer IDs for the specified interface</help>
+ </properties>
+ <command>sudo wg show "$4" peers</command>
+ </leafNode>
+ <leafNode name="summary">
+ <properties>
+ <help>Shows current configuration and device information</help>
+ </properties>
+ <command>sudo wg show "$4"</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="wireguard">
+ <properties>
+ <help>Show Wireguard interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wireguard --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed Wireguard interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wireguard --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>