diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-15 22:15:58 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-15 22:24:35 +0100 |
commit | 2e07d9c1994a14ccb2380744a5388e389eafbd66 (patch) | |
tree | a0d80332f0c011653cdffa1706df4eae4fa795b4 /op-mode-definitions/show-bfd.xml.in | |
parent | 1b0007a01fd541b5f31ed94518e786a998bd6f43 (diff) | |
download | vyos-1x-2e07d9c1994a14ccb2380744a5388e389eafbd66.tar.gz vyos-1x-2e07d9c1994a14ccb2380744a5388e389eafbd66.zip |
op-mode: bfd: T4073: "show protocols bfd peer <ip>" returned invalid session data
Due to the AWK regex pattern data from a different peer was returned as
the first match was shown.
(cherry picked from commit 6f9ba4e577a6470372a478310ea0c49a6400b8e6)
Diffstat (limited to 'op-mode-definitions/show-bfd.xml.in')
-rw-r--r-- | op-mode-definitions/show-bfd.xml.in | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/op-mode-definitions/show-bfd.xml.in b/op-mode-definitions/show-bfd.xml.in new file mode 100644 index 000000000..39e42e6ec --- /dev/null +++ b/op-mode-definitions/show-bfd.xml.in @@ -0,0 +1,56 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="show"> + <children> + <node name="bfd"> + <properties> + <help>Show Bidirectional Forwarding Detection (BFD)</help> + </properties> + <children> + <node name="peer"> + <properties> + <help>Show all Bidirectional Forwarding Detection (BFD) peer status</help> + </properties> + </node> + <tagNode name="peer"> + <properties> + <help>Show Bidirectional Forwarding Detection (BFD) peer status</help> + <completionHelp> + <script>vtysh -c "show bfd peers" | awk '/[:blank:]*peer/ { printf "%s\n", $2 }'</script> + </completionHelp> + </properties> + <command>vtysh -c "show bfd peers" | sed -n "/peer $4 /,/^$/p"</command> + <children> + <leafNode name="counters"> + <properties> + <help>Show Bidirectional Forwarding Detection (BFD) peer counters</help> + </properties> + <command>vtysh -c "show bfd peers counters" | sed -n "/peer $4 /,/^$/p"</command> + </leafNode> + </children> + </tagNode> + <node name="peers"> + <properties> + <help>Show Bidirectional Forwarding Detection peers</help> + </properties> + <command>vtysh -c "show bfd peers"</command> + <children> + <leafNode name="counters"> + <properties> + <help>Show Bidirectional Forwarding Detection (BFD) peer counters</help> + </properties> + <command>vtysh -c "show bfd peers counters"</command> + </leafNode> + <leafNode name="brief"> + <properties> + <help>Show Bidirectional Forwarding Detection (BFD) peers brief</help> + </properties> + <command>vtysh -c "show bfd peers brief"</command> + </leafNode> + </children> + </node> + </children> + </node> + </children> + </node> +</interfaceDefinition> |