mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-02-07 09:48:24 +00:00
add huawei bgp route table directive
This commit is contained in:
parent
f0b713ea5e
commit
e9c259dac7
1 changed files with 23 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ __all__ = (
|
|||
"Huawei_BGPRoute",
|
||||
"Huawei_Ping",
|
||||
"Huawei_Traceroute",
|
||||
"Huawei_BGPRouteTable",
|
||||
)
|
||||
|
||||
NAME = "Huawei VRP"
|
||||
|
|
@ -37,6 +38,7 @@ Huawei_BGPRoute = BuiltinDirective(
|
|||
],
|
||||
field=Text(description="IP Address, Prefix, or Hostname"),
|
||||
plugins=["bgp_route_huawei"],
|
||||
table_output="__hyperglass_huawei_bgp_route_table__",
|
||||
platforms=PLATFORMS,
|
||||
)
|
||||
|
||||
|
|
@ -111,3 +113,24 @@ Huawei_Traceroute = BuiltinDirective(
|
|||
field=Text(description="IP Address, Prefix, or Hostname"),
|
||||
platforms=PLATFORMS,
|
||||
)
|
||||
|
||||
# Table Output Directives
|
||||
|
||||
Huawei_BGPRouteTable = BuiltinDirective(
|
||||
id="__hyperglass_huawei_bgp_route_table__",
|
||||
name="BGP Route",
|
||||
rules=[
|
||||
RuleWithIPv4(
|
||||
condition="0.0.0.0/0",
|
||||
action="permit",
|
||||
command="display bgp routing-table {target} | no-more",
|
||||
),
|
||||
RuleWithIPv6(
|
||||
condition="::/0",
|
||||
action="permit",
|
||||
command="display bgp ipv6 routing-table {target} | no-more",
|
||||
),
|
||||
],
|
||||
field=Text(description="IP Address, Prefix, or Hostname"),
|
||||
platforms=PLATFORMS,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue