Skip to content

Conversation

@AleksBelytskyi
Copy link

Description

This PR adds structured output support for the BGP route directive on Huawei VRP devices.
It introduces a parser for the raw response of the commands:

display bgp routing-table {target}
display bgp ipv6 routing-table {target}

The parsed output is converted into a standardized structure compatible with Hyperglass, ensuring consistent display and data handling across different network platforms.

Related Issues

The request likely overlaps with PR #340 in certain areas.
However, this PR focuses on resolving one specific issue. The implementation is clean, well-structured, and scalable.
It complies with the project’s linting standards, is formatted using Black, and all pytest tests have passed successfully.

Motivation and Context

Previously, Hyperglass could not properly interpret BGP route information from Huawei VRP devices because the CLI output was unstructured. This update enables accurate parsing and structured representation of Huawei BGP route data, improving multi-vendor interoperability and user experience.

Tests

Test Environment: Docker on Ubuntu 24.04 + Manual installation on Ubuntu 24.04
Devices Tested: Huawei NE40E and Huawei NetEngine 8000 F
Test Cases:

  • Confirmed correct field extraction and data formatting for both IPv4 and IPv6 routes.
  • Verified correct handling of cases where the device returns Info: The network does not exist. when the route is not present in the RIB.
  • Ensured that routes identified by a Nil value in the AS_PATH are correctly recognized and processed as local prefixes.
  • Validated error handling for malformed responses.

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.

1 participant