Open ethamitc opened 5 months ago
Hello,
Glad you were able to work around this by using the custom directives method. I would be happy to add support for other versions of VyOS, I just need the commands for each of the command types defined in built-in directives:
If you can provide these for each of the versions where they differ, I should be able to add native support.
Thanks!
I have not messed with 1.3 in quite awhile, i can dig up the syntax for it later, But this is the syntax i for VyOS 1.4 in the commands.yml, vrf should be "default" for the default vrf. 1.5 should be the same as 1.4 right now, but 1.5 could change later on but i wouldn't expect it to.
ipv4_default:
bgp_route: "show bgp vrf {vrf} ipv4 {target}"
bgp_aspath: "show bgp vrf {vrf} ipv4 regexp {target}"
bgp_community: "show bgp vrf {vrf} ipv4 community {target}"
ping: "ping {target} vrf {vrf} source-address {source} count 5"
traceroute: "traceroute {target} vrf {vrf} source-address {source}"
ipv6_default:
bgp_route: "show bgp vrf {vrf} ipv6 {target}"
bgp_aspath: "show bgp vrf {vrf} ipv6 regexp {target}"
bgp_community: "show bgp vrf {vrf} ipv6 community {target}"
ping: "ping {target} vrf {vrf} source-address {source} count 5"
traceroute: "traceroute {target} vrf {vrf} source-address {source}"
On 1.3
Similar to 1.4 as the default vrf is just "default", but the VRF support on 1.3 is very limited and does not work with dynamic protocols (BGP, OSPF, ect), only static/connected routes. I do think someone may have a niche use for having VRF support for ping and traceroute on 1.3, if you don't want to do that just remove "vrf
show ip bgp x.x.x.x/x
show ipv6 bgp x::x/x
show ip bgp regexp <expression>
show ipv6 bgp regexp <expression>
show ip bgp community <community>
show ipv6 bgp community <community>
ping x.x.x.x vrf <insert vrf here>
ping x::x vrf <insert vrf here>
traceroute vrf <insert vrf here> x.x.x.x
traceroute vrf <insert vrf here> x::x
Feature Description
Currently in Hyperglass, theirs 1 directive for VyOS, However between the versions of VyOS (1.3, 1.4, 1.5) the command formats change. It would be nice to specify the version of VyOS and allow hyperglass to use the commands applicable to that version.
Eg. devices.yaml
Is your feature request related to a problem? Please describe.
By default, if you are not running the version of VyOS the commands we're build for, commands will fail. This wasn't a huge issue for me as I was able to just modify the vyos directive files and rebuild, but I feel like the user should be able to specify and just have it work.