Fix bypass pair validation to allow default bypass pair conflicts#11
Open
hildebrau wants to merge 1 commit intoPaloAltoNetworks:masterfrom
Open
Fix bypass pair validation to allow default bypass pair conflicts#11hildebrau wants to merge 1 commit intoPaloAltoNetworks:masterfrom
hildebrau wants to merge 1 commit intoPaloAltoNetworks:masterfrom
Conversation
- Modified get_parent_child_dict() to distinguish between real port conflicts and false positives from default bypass pairs - Allows bypass pairs to use ports already in used_parent_name_list if those ports belong to other bypass pairs (which will be removed) - Fixes round-trip workflow (pull_site -> do_site) broken in SDK 6.6.1b1 - Resolves issue where user-specified bypass pairs were incorrectly flagged as conflicts with default bypass pairs
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.
Fix bypass pair validation to allow default bypass pair conflicts
Fixes #10
Description
This PR fixes a validation error in
get_parent_child_dict()that incorrectly flags user-specified bypass pairs as conflicts when they use ports that are already inused_parent_name_listfrom default bypass pairs.The Problem:
When processing
config_interfaces_defaults(which includes both default model interfaces and user-specified interfaces), default bypass pairs are processed first and add their WAN/LAN ports toused_parent_name_list. When user-specified bypass pairs are processed later, the validation incorrectly flags them as conflicts, even though the default bypass pairs will be removed (as they should be when user specifies a config).The Solution:
Modified the validation logic to check if a port conflict is with another bypass pair before throwing an error. This allows bypass pairs to use ports that are already in
used_parent_name_listif those ports belong to other bypass pairs, while still preventing real conflicts with subinterfaces, PPPoE interfaces, virtual interfaces, etc.Code Changes:
prisma_config/do.pylines 5570-5603 in functionget_parent_child_dict()Motivation and Context
This PR addresses issue #10. After upgrading to
prisma_sase 6.6.1b1withprisma_config 6.5.1b2, the round-trip workflow (pull_site→do_site) fails with:This breaks critical workflows:
The configuration is valid in the controller (it was exported from there), but
do_siterejects it during validation. This is a regression that prevents users from performing basic configuration management tasks.How Has This Been Tested?
Test Environment:
prisma_configversion: 6.5.1b2prisma_saseSDK version: 6.6.1b1Test Cases:
do_siteon an existing YAML file that previously failed - SUCCESSpull_site -S ITLAB1 --output ITLAB1_test.ymlfollowed bydo_site ITLAB1_test.yml- SUCCESSTesting Limitations:
Test Output:
The fix successfully allows bypass pairs to be processed without false validation errors while still preventing real conflicts.
Screenshots (if appropriate)
N/A - Terminal output provided in testing section above.
Types of changes
Checklist