Converted PriorityMembers and PriorityZone to Lists#414
Open
computeythings wants to merge 1 commit intofortinetdev:mainfrom
Open
Converted PriorityMembers and PriorityZone to Lists#414computeythings wants to merge 1 commit intofortinetdev:mainfrom
computeythings wants to merge 1 commit intofortinetdev:mainfrom
Conversation
…orityZones to TypeList to enforce order
79966ab to
94ebd43
Compare
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.
Summary
Converted the schema type of the system.sdwan.service.priority_members and system.sdwan.service.priority_zone to lists to ensure deterministic order and detect changes in that order.
Problem
Current resources were configured as Sets which ignored order and would change priority order when pushed to the default sorted order.
Solution
Changed schema to TypeList from TypeSet.
Modified the respective flatten functions to detect tf_exists on list size and compare value based on list index.
Removed dynamic_sort_subtable on the flatten functions - these should not be auto-sorted.
Testing
Tested on live devices. Confirmed drift is detected from live config and re-ordering values is correctly registered as a change.
Notes
Tested on FortiGate 400F FortiOS v7.4.7
Fixes #356