[GCU] Prohibit removal of PFC_WD POLL_INTERVAL field #2777
Merged
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.
What I did
-Add new infrastructure to GCU for validation of moves that YANG models are unable to capture
-Prohibit deletion of PFC_WD POLL_INTERVAL field
How I did it
How to verify it
Attempt to delete POLL_INTERVAL field using GCU
Please note that this is different than the create-only extension, which is described here: https://github.com/sonic-net/SONiC/blob/master/doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md#313-using-yang-models-to-host-flags-for-move-validation
create-only is programmed as a MoveValidator in GCU, but that is different than the use case necessary for this PR. We don't want to validate each intermediate move to get to the final state, as is done by MoveValidators- we just need to validate the initial request. Additionally, MoveValidators continue searching for a different move that is 'valid' if it finds one invalid - possibly by deleting the parent and then readding other children. This is not the behavior we desire. We only need a check of the initial request (reflected in Json diff).
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)