SUMMARY
While trying to fix an OSPFv3-related problem, I tried to use the `show ipv6 ospfv3` commands to debug the router state, only to discover those weren't giving the expected results, either displaying irrelevant data, or simply failing to run.
STEPS TO REPRODUCE
Enter configure mode on a blank router and type the following commands:
```
set interfaces ethernet eth0 address 2001:db0:dead:f00d::1/64
set protocols ospfv3 area 0.0.0.0 interface eth0
set protocols ospfv3 parameters router-id 192.0.2.1
commit
```
Exit configure mode and try the `show ipv6 ospfv3` commands.
OBSERVED RESULT
Some commands fail to work:
```
vyos@vyos:~$ show ipv6 ospfv3 area 0.0.0.0
% Unknown command: show ipv6 ospf6 area area spf tree
vyos@vyos:~$ show ipv6 ospfv3 linkstate detail
% Command incomplete: show ipv6 ospf6 linkstate
vyos@vyos:~$ show ipv6 ospfv3 linkstate network
% Command incomplete: show ipv6 ospf6 linkstate network
vyos@vyos:~$ show ipv6 ospfv3 linkstate router
% Command incomplete: show ipv6 ospf6 linkstate router
```
Commands under `show ipv6 ospfv3 database` only show the entire database whatever is typed. Here are some comparisons between VyOS and FRR output:
```
vyos@vyos:~$ show ipv6 ospfv3 database type-7
Area Scoped Link State Database (Area 0.0.0.0)
Type LSId AdvRouter Age SeqNum Payload
INP 0.0.0.0 192.0.2.1 1390 80000001 2001:db0:dead:f00d::/64
I/F Scoped Link State Database (I/F eth0 in Area 0.0.0.0)
Type LSId AdvRouter Age SeqNum Payload
Lnk 0.0.0.2 192.0.2.1 1390 80000001 fe80::605e:afff:fe84:767b
AS Scoped Link State Database
Type LSId AdvRouter Age SeqNum Payload
ASE 0.0.0.1 192.0.2.1 1389 80000001 2001:db0:dead:f00d::/64
vyos@vyos:~$ sudo vtysh -c 'show ipv6 ospf6 database type-7'
I/F Scoped Link State Database (I/F eth0 in Area 0.0.0.0)
Type LSId AdvRouter Age SeqNum Payload
vyos@vyos:~$ show ipv6 ospfv3 database any 0.0.0.1 detail
Area Scoped Link State Database (Area 0.0.0.0)
Type LSId AdvRouter Age SeqNum Payload
INP 0.0.0.0 192.0.2.1 1442 80000001 2001:db0:dead:f00d::/64
I/F Scoped Link State Database (I/F eth0 in Area 0.0.0.0)
Type LSId AdvRouter Age SeqNum Payload
Lnk 0.0.0.2 192.0.2.1 1442 80000001 fe80::605e:afff:fe84:767b
AS Scoped Link State Database
Type LSId AdvRouter Age SeqNum Payload
ASE 0.0.0.1 192.0.2.1 1441 80000001 2001:db0:dead:f00d::/64
vyos@vyos:~$ sudo vtysh -c 'show ipv6 ospf6 database * 0.0.0.1 detail'
Area Scoped Link State Database (Area 0.0.0.0)
I/F Scoped Link State Database (I/F eth0 in Area 0.0.0.0)
AS Scoped Link State Database
Age: 1453 Type: AS-External
Link State ID: 0.0.0.1
Advertising Router: 192.0.2.1
LS Sequence Number: 0x80000001
CheckSum: 0x2c7a Length: 36
Duration: 00:24:13
Bits: ---
Metric: 0
Prefix Options: xxx
Referenced LSType: 0
Prefix: 2001:db0:dead:f00d::/64
```
EXPECTED RESULT
The output for these op-mode commands should match output in vtysh.
SOFTWARE/OS VERSIONS
VyOS 1.4-rolling-202102040221
ADDITIONAL INFORMATION
The database commands bug seems to be related to the use of `${@:4}` to select the end of the commands. I've had better results by calling `cut -d' ' -f4-` on `$@`. Other issues include missing or wrong nodes in the XML definitions. I attach a patch for vyos-1x which fixes this and should (hopefully) match FRR show commands one-to-one. Please note the patch creates a new file `op-mode-definitions/include/ospfv3-any-linkstate-id.xml.i`: {F1144305}