Rewrite 'traceroute' in python re-using the same logic and code as for 'ping' op-mode. The main reason is to simplify adding options for the 'traceroute' (there is a lack of options, such as no possibility to show source interface/address, check backwards-hops count, choose between ICMP/UDP/TCP, specify TTL, etc.). Not sure if the structure is fully compatible with the requirements for the command. The current implementation for 'ping' is not able to display help descriptions for the available command options:
vyos@vyos:~$ ping 8.8.8.8 Possible completions: <Enter> Execute the current command adaptive Ping options allow-broadcast audible bypass-route count deadline do-not-fragment flood interface interval mark no-loopback numeric pattern quiet record-route size source-address timestamp tos ttl verbose vrf
The same happens when re-using similar logic with 'traceroute':
vyos@vyos:~$ traceroute 8.8.8.8 Possible completions: <Enter> Execute the current command backward-hops Traceroute options bypass do-not-fragment first-ttl icmp interface lookup-as mark no-resolve port source-address tcp tos ttl udp vrf
Maybe we can use this as a temporary replacement until a better solution is found. Maybe all similar op-mode commands can have the same structure and use the same logic for future simplicity, code reuse and standardized implementation (such as ping, traceroute, ssh, SCP, telnet, FTP, etc.)?