Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Huawei VRPv8 platform to the hier_config platform/driver system, enabling correct negation behavior (undo ...), comment stripping, and Huawei-style sectional exiting (quit) when generating remediation configs.
Changes:
- Added
Platform.HUAWEI_VRPV8and wired it into driver construction and v2→v3 platform mapping. - Implemented a new
HConfigDriverHuaweiVrpv8with Huawei-specific negation andquitsectional exits. - Added a dedicated Huawei VRPv8 driver test suite and refactored sectional exit logic to be driver-overridable.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_driver_huawei_vrpv8.py | Adds tests covering Huawei VRPv8 negation behavior, comment stripping, and quit sectional exits. |
| hier_config/utils.py | Extends v2→v3 platform string mapping to include huawei_vrpv8. |
| hier_config/platforms/huawei_vrpv8/driver.py | New Huawei VRPv8 driver implementing undo negation rules and quit sectional exiting. |
| hier_config/platforms/huawei_vrpv8/init.py | Adds package marker for the new platform module. |
| hier_config/platforms/driver_base.py | Centralizes sectional-exit computation on the driver to support platform overrides. |
| hier_config/models.py | Adds the HUAWEI_VRPV8 platform enum value. |
| hier_config/constructors.py | Registers the new platform driver in get_hconfig_driver. |
| hier_config/child.py | Delegates sectional-exit computation to driver.sectional_exit(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the huawei_vrpv8 platform.
Tests pass,
other huawei versions might also work with this but I chose huawei_vrpv8 naming as it's also used in Netmiko