From 44f8faa1e576b534e0aaba0469ceb194d8d371de Mon Sep 17 00:00:00 2001 From: Jelson Stoelben Rodrigues Date: Mon, 26 May 2025 20:11:19 -0300 Subject: [PATCH] fix: timeout when fetching bgp routes Huawei has pagination by default and when the output exceeds 24 lines it expects the user to keep scrooling to display the output. This makes the netmiko time out. By passing "| no-more" the pagination will be disabled for the command --- hyperglass/defaults/directives/huawei.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hyperglass/defaults/directives/huawei.py b/hyperglass/defaults/directives/huawei.py index b517503..f8d3ef0 100644 --- a/hyperglass/defaults/directives/huawei.py +++ b/hyperglass/defaults/directives/huawei.py @@ -27,15 +27,16 @@ Huawei_BGPRoute = BuiltinDirective( RuleWithIPv4( condition="0.0.0.0/0", action="permit", - command="display bgp routing-table {target}", + command="display bgp routing-table {target} | no-more", ), RuleWithIPv6( condition="::/0", action="permit", - command="display bgp ipv6 routing-table {target}", + command="display bgp ipv6 routing-table {target} | no-more", ), ], field=Text(description="IP Address, Prefix, or Hostname"), + plugins=["bgp_route_huawei"], platforms=PLATFORMS, )