summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-08-01 19:52:57 +0200
committerChristian Poessinger <christian@poessinger.com>2022-08-01 19:52:57 +0200
commit36e7cad8dd88578a48648b7bcde5fc889d70fe02 (patch)
tree0228c2eaf39d5258c45698df219ed670342e0401 /op-mode-definitions
parentb2ff1407330e383a9fff688376377efc534bcfbc (diff)
downloadvyos-1x-36e7cad8dd88578a48648b7bcde5fc889d70fe02.tar.gz
vyos-1x-36e7cad8dd88578a48648b7bcde5fc889d70fe02.zip
op-mode: macsec: T4537: add "show|monitor log macsec" CLI commands
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/monitor-log.xml.in17
-rw-r--r--op-mode-definitions/show-log.xml.in17
2 files changed, 34 insertions, 0 deletions
diff --git a/op-mode-definitions/monitor-log.xml.in b/op-mode-definitions/monitor-log.xml.in
index fbe37c9db..8a02e1f08 100644
--- a/op-mode-definitions/monitor-log.xml.in
+++ b/op-mode-definitions/monitor-log.xml.in
@@ -195,6 +195,23 @@
</leafNode>
</children>
</node>
+ <node name="macsec">
+ <properties>
+ <help>Monitor last lines of MACsec</help>
+ </properties>
+ <command>journalctl --no-hostname --boot --follow --unit "wpa_supplicant-macsec@*.service"</command>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Monitor last lines of specific MACsec interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py -t macsec</script>
+ </completionHelp>
+ </properties>
+ <command>SRC=$(cli-shell-api returnValue interfaces macsec "$5" source-interface); journalctl --no-hostname --boot --follow --unit "wpa_supplicant-macsec@$SRC.service"</command>
+ </tagNode>
+ </children>
+ </node>
<leafNode name="snmp">
<properties>
<help>Monitor last lines of Simple Network Monitoring Protocol (SNMP)</help>
diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in
index 7769c5f52..24a1b5f3e 100644
--- a/op-mode-definitions/show-log.xml.in
+++ b/op-mode-definitions/show-log.xml.in
@@ -220,6 +220,23 @@
</properties>
<command>journalctl --no-hostname --boot --unit opennhrp.service</command>
</leafNode>
+ <node name="macsec">
+ <properties>
+ <help>Show log for MACsec</help>
+ </properties>
+ <command>journalctl --no-hostname --boot --unit "wpa_supplicant-macsec@*.service"</command>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Show MACsec log on specific interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py -t macsec</script>
+ </completionHelp>
+ </properties>
+ <command>SRC=$(cli-shell-api returnValue interfaces macsec "$5" source-interface); journalctl --no-hostname --boot --unit "wpa_supplicant-macsec@$SRC.service"</command>
+ </tagNode>
+ </children>
+ </node>
<node name="openvpn">
<properties>
<help>Show log for OpenVPN</help>