OSPF: Add possibility to check status in CLI

Use vtysh for now.
This commit is contained in:
Mattias Walström
2024-01-08 10:04:44 +01:00
committed by Joachim Wiberg
parent 20cc36864a
commit c0e7a6c03c
+20
View File
@@ -283,6 +283,26 @@
</ACTION>
</COMMAND>
<COMMAND name="ospf" help="Show routing table">
<PARAM name="name" ptype="/STRING" help="neighbor, interfaces or bfd" min="0" max="1">
<COMPL>
<ACTION sym="printl">neighbor</ACTION>
<ACTION sym="printl">interfaces</ACTION>
<ACTION sym="printl">bfd</ACTION>
</COMPL>
</PARAM>
<ACTION sym="script">
if [ -z "$KLISH_PARAM_name" ]; then
vtysh -c "show ip ospf"
elif [ "$KLISH_PARAM_name" == "neighbor" ];then
vtysh -c "show ip ospf neighbor"
elif [ "$KLISH_PARAM_name" == "interfaces" ];then
vtysh -c "show ip ospf interface"
elif [ "$KLISH_PARAM_name" == "bfd" ];then
vtysh -c "show bfd peers"
fi
</ACTION>
</COMMAND>
<COMMAND name="routes" help="Show routing table">
<PARAM name="name" ptype="/STRING" help="ipv4 or ipv6" min="0" max="1">
<COMPL>