mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
43 lines
1.6 KiB
Python
43 lines
1.6 KiB
Python
"""Arista Command Model."""
|
|
|
|
# Project
|
|
from hyperglass.configuration.models.commands.common import CommandSet, CommandGroup
|
|
|
|
_ipv4_default = {
|
|
"bgp_route": "show ip bgp {target}",
|
|
"bgp_aspath": "show ip bgp regexp {target}",
|
|
"bgp_community": "show ip bgp community {target}",
|
|
"ping": "ping ip {target} source {source}",
|
|
"traceroute": "traceroute ip {target} source {source}",
|
|
}
|
|
_ipv6_default = {
|
|
"bgp_route": "show ipv6 bgp {target}",
|
|
"bgp_aspath": "show ipv6 bgp regexp {target}",
|
|
"bgp_community": "show ipv6 bgp community {target}",
|
|
"ping": "ping ipv6 {target} source {source}",
|
|
"traceroute": "traceroute ipv6 {target} source {source}",
|
|
}
|
|
_ipv4_vpn = {
|
|
"bgp_route": "show ip bgp {target} vrf {vrf}",
|
|
"bgp_aspath": "show ip bgp regexp {target} vrf {vrf}",
|
|
"bgp_community": "show ip bgp community {target} vrf {vrf}",
|
|
"ping": "ping vrf {vrf} ip {target} source {source}",
|
|
"traceroute": "traceroute vrf {vrf} ip {target} source {source}",
|
|
}
|
|
_ipv6_vpn = {
|
|
"bgp_route": "show ipv6 bgp {target} vrf {vrf}",
|
|
"bgp_aspath": "show ipv6 bgp regexp {target} vrf {vrf}",
|
|
"bgp_community": "show ipv6 bgp community {target} vrf {vrf}",
|
|
"ping": "ping vrf {vrf} ipv6 {target} source {source}",
|
|
"traceroute": "traceroute vrf {vrf} ipv6 {target} source {source}",
|
|
}
|
|
|
|
|
|
class AristaCommands(CommandGroup):
|
|
"""Validation model for default arista commands."""
|
|
|
|
ipv4_default: CommandSet = CommandSet(**_ipv4_default)
|
|
ipv6_default: CommandSet = CommandSet(**_ipv6_default)
|
|
ipv4_vpn: CommandSet = CommandSet(**_ipv4_vpn)
|
|
ipv6_vpn: CommandSet = CommandSet(**_ipv6_vpn)
|