Skip to content

Fix huawei bgp route and plugin validation/transform order#327

Merged
jdhall75 merged 3 commits into
thatmattlove:mainfrom
JelsonRodrigues:fix/huawei-ne8k-bgp-route
Jun 10, 2025
Merged

Fix huawei bgp route and plugin validation/transform order#327
jdhall75 merged 3 commits into
thatmattlove:mainfrom
JelsonRodrigues:fix/huawei-ne8k-bgp-route

Conversation

@JelsonRodrigues

@JelsonRodrigues JelsonRodrigues commented May 26, 2025

Copy link
Copy Markdown
Contributor

Description

  • Fixed bgp route timeout by adding | no-more to the command, disableing the CLI pagination
  • Created a builtin plugin to transform the IP/MASK to IP MASK as accepted by the Huawei CLI
  • Fixed the plugins to validade the rules and then transform the input, or else, the transform will break validation

Related Issues

Fixes #315
Fixes #187

Motivation and Context

Some built-in directives do not work on Huawei devices and Huawei routers are very popular in Brazil.

Tests

Tested changes on Debian 13 (trixie/sid) with Podman 4.9.3. All tests were made building the image with the compose file and executed as container, so Python, Next and everything else were in the versions defined on the Dockerfile.
Tested on two Huawei NE8000 Routers with multiple inputs: IPv4, IPv6, IPv4/mask, IPv6/mask

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
Create builtin plugin to transform input field before passing to Huawei device
Transformation must occur after validation, or else the transformation will possibly make the validation fail

@jdhall75 jdhall75 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this! I know there are some people that are looking for this fix.

@jdhall75 jdhall75 merged commit 23522da into thatmattlove:main Jun 10, 2025
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Impossibile to use command "BGP Route" with Huawei NetEngine 8000 Error in bgp_router query on Huawei

2 participants