diff options
author | hagbard <vyosdev@derith.de> | 2018-08-20 21:39:06 +0000 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2018-08-20 21:39:06 +0000 |
commit | b3892fe872202b97d8ed58a60d15d7d0efa7a22f (patch) | |
tree | 985802c21dfef3643905d43e75a0dedad3ae2ddc | |
parent | 9c27337b01bfa3960f75263b838482616d6de2bd (diff) | |
download | vyos-1x-b3892fe872202b97d8ed58a60d15d7d0efa7a22f.tar.gz vyos-1x-b3892fe872202b97d8ed58a60d15d7d0efa7a22f.zip |
T790: wireguard: add status commands
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | op-mode-definitions/wireguard.xml | 34 |
2 files changed, 35 insertions, 1 deletions
@@ -42,7 +42,7 @@ clean: .PHONY: test test: -# PYTHONPATH=python/ python3 -m "nose" --with-xunit src --with-coverage --cover-erase --cover-xml --cover-package src/conf_mode,src/op_mode,src/completion,src/helpers,src/validators --verbose + PYTHONPATH=python/ python3 -m "nose" --with-xunit src --with-coverage --cover-erase --cover-xml --cover-package src/conf_mode,src/op_mode,src/completion,src/helpers,src/validators --verbose .PHONY: sonar sonar: diff --git a/op-mode-definitions/wireguard.xml b/op-mode-definitions/wireguard.xml index 29fce33b6..a7e156d8d 100644 --- a/op-mode-definitions/wireguard.xml +++ b/op-mode-definitions/wireguard.xml @@ -36,6 +36,40 @@ </leafNode> </children> </node> + <node name="interfaces"> + <children> + <tagNode name="wireguard"> + <properties> + <help>show wireguard interface information</help> + <completionHelp> + <script>${vyos_completion_dir}/list_interfaces.py -t wireguard</script> + </completionHelp> + </properties> + <command>sudo wg show "$4"</command> + <children> + <leafNode name="allowed-ips"> + <properties> + <help>show all allowed-ips 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> + <!-- more commands upon request --> + </children> + </tagNode> + </children> + </node> </children> </node> </interfaceDefinition> |