From 1edacb9c1788db06de570d25e274a7a7df8e81e8 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 4 Dec 2021 07:35:53 +0100 Subject: xml: op-mode: add "show bfd" alias node to "show protocols bfd" --- op-mode-definitions/include/bfd-common.xml.i | 54 ++++++++++++++++++++++++++++ op-mode-definitions/show-bfd.xml.in | 8 +++++ op-mode-definitions/show-protocols.xml.in | 45 +---------------------- 3 files changed, 63 insertions(+), 44 deletions(-) create mode 100644 op-mode-definitions/include/bfd-common.xml.i create mode 100644 op-mode-definitions/show-bfd.xml.in (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/include/bfd-common.xml.i b/op-mode-definitions/include/bfd-common.xml.i new file mode 100644 index 000000000..eebfbdad4 --- /dev/null +++ b/op-mode-definitions/include/bfd-common.xml.i @@ -0,0 +1,54 @@ + + + + Show Bidirectional Forwarding Detection (BFD) + + + + + Show all Bidirectional Forwarding Detection (BFD) peer status + + vtysh -c "show bfd peers" + + + + Show Bidirectional Forwarding Detection (BFD) peer counters + + vtysh -c "show bfd peers counters" + + + + + + Show Bidirectional Forwarding Detection (BFD) peer status + + + + + vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 'BEGIN { regex = sprintf("(peer %s.*)vrf", BFD_PEER) } { if (match($0, regex, bfd_peer_value)) peer=bfd_peer_value[1] } END { if (peer) system("vtysh -c \"show bfd " peer "\"") }' + + + + Show Bidirectional Forwarding Detection (BFD) peer counters + + vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 'BEGIN { regex = sprintf("(peer %s.*)vrf", BFD_PEER) } { if (match($0, regex, bfd_peer_value)) peer=bfd_peer_value[1] } END { if (peer) system("vtysh -c \"show bfd " peer " counters\"") }' + + + + + + Show Bidirectional Forwarding Detection peers + + vtysh -c "show bfd peers" + + + + Show Bidirectional Forwarding Detection (BFD) peers brief + + vtysh -c "show bfd peers brief" + + + + + + diff --git a/op-mode-definitions/show-bfd.xml.in b/op-mode-definitions/show-bfd.xml.in new file mode 100644 index 000000000..7339c92a2 --- /dev/null +++ b/op-mode-definitions/show-bfd.xml.in @@ -0,0 +1,8 @@ + + + + + #include + + + diff --git a/op-mode-definitions/show-protocols.xml.in b/op-mode-definitions/show-protocols.xml.in index d595e2c3c..48bfa10dc 100644 --- a/op-mode-definitions/show-protocols.xml.in +++ b/op-mode-definitions/show-protocols.xml.in @@ -7,50 +7,7 @@ Show protocol specific information - - - Show Bidirectional Forwarding Detection (BFD) - - - - - Show all Bidirectional Forwarding Detection (BFD) peer status - - vtysh -c "show bfd peers" - - - - Show Bidirectional Forwarding Detection (BFD) peer counters - - vtysh -c "show bfd peers counters" - - - - - - Show Bidirectional Forwarding Detection (BFD) peer status - - - - - vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 'BEGIN { regex = sprintf("(peer %s.*)vrf", BFD_PEER) } { if (match($0, regex, bfd_peer_value)) peer=bfd_peer_value[1] } END { if (peer) system("vtysh -c \"show bfd " peer "\"") }' - - - - Show Bidirectional Forwarding Detection (BFD) peer counters - - vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 'BEGIN { regex = sprintf("(peer %s.*)vrf", BFD_PEER) } { if (match($0, regex, bfd_peer_value)) peer=bfd_peer_value[1] } END { if (peer) system("vtysh -c \"show bfd " peer " counters\"") }' - - - - - - Show Bidirectional Forwarding Detection (BFD) peers brief - - vtysh -c "show bfd peers brief" - - - + #include Show static protocol parameters -- cgit v1.2.3