summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2021-05-26 21:44:26 +0300
committerGitHub <noreply@github.com>2021-05-26 20:44:26 +0200
commit87ccd1b8242b7b58897c33b30a43a2f42fc43e39 (patch)
treea35ae1c32e9e1fd65693ea9c7cfc2f332f34bae7
parent32bc1e5babd1bd31909a93ca1818998bf46db003 (diff)
downloadvyos-1x-87ccd1b8242b7b58897c33b30a43a2f42fc43e39.tar.gz
vyos-1x-87ccd1b8242b7b58897c33b30a43a2f42fc43e39.zip
ospfv3: T3581: Fix op-mode for linkstate
-rw-r--r--op-mode-definitions/include/ospfv3-detail.xml.i2
-rw-r--r--op-mode-definitions/show-ipv6-ospfv3.xml.in30
-rwxr-xr-xsrc/op_mode/vtysh_wrapper.sh3
3 files changed, 26 insertions, 9 deletions
diff --git a/op-mode-definitions/include/ospfv3-detail.xml.i b/op-mode-definitions/include/ospfv3-detail.xml.i
index 76096fbc8..d5e3b373d 100644
--- a/op-mode-definitions/include/ospfv3-detail.xml.i
+++ b/op-mode-definitions/include/ospfv3-detail.xml.i
@@ -4,6 +4,6 @@
<help>Show detailed information</help>
</properties>
<!-- FRR uses ospf6 where we use ospfv3, thus alter the command -->
- <command>vtysh -c "show ipv6 ospf6 ${@:4}"</command>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
</node>
<!-- included end -->
diff --git a/op-mode-definitions/show-ipv6-ospfv3.xml.in b/op-mode-definitions/show-ipv6-ospfv3.xml.in
index 9227fdae1..7a6d12eaa 100644
--- a/op-mode-definitions/show-ipv6-ospfv3.xml.in
+++ b/op-mode-definitions/show-ipv6-ospfv3.xml.in
@@ -381,18 +381,34 @@
</properties>
<children>
#include <include/ospfv3-detail.xml.i>
- <node name="network">
+ <tagNode name="network">
<properties>
- <help>Show linkstate Network information</help>
+ <help>Show linkstate Network information (Router ID)</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
</properties>
- <command>vtysh -c "show ipv6 ospf6 linkstate network"</command>
- </node>
- <node name="router">
+ <children>
+ <tagNode name="link-state-id">
+ <properties>
+ <help>Specify Link state ID as IPv4 address notation</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>vtysh -c "show ipv6 ospf6 linkstate network $6 $8"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ <tagNode name="router">
<properties>
<help>Show linkstate Router information</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
</properties>
- <command>vtysh -c "show ipv6 ospf6 linkstate router"</command>
- </node>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </tagNode>
</children>
</node>
<node name="neighbor">
diff --git a/src/op_mode/vtysh_wrapper.sh b/src/op_mode/vtysh_wrapper.sh
index 47d88330b..09980e14f 100755
--- a/src/op_mode/vtysh_wrapper.sh
+++ b/src/op_mode/vtysh_wrapper.sh
@@ -1,4 +1,5 @@
#!/bin/sh
declare -a tmp
-tmp=$@
+# FRR uses ospf6 where we use ospfv3, thus alter the command
+tmp=$(echo $@ | sed -e "s/ospfv3/ospf6/")
vtysh -c "$tmp"