New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yang models fixed to make config apply-patch work #9517
base: master
Are you sure you want to change the base?
yang models fixed to make config apply-patch work #9517
Conversation
Signed-off-by: Marat Gubaiev <marat_gubaiev@jabil.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add UT for these changes.
@@ -404,6 +404,46 @@ module sonic-crm { | |||
type threshold; | |||
} | |||
|
|||
leaf srv6_my_sid_entry_threshold_type{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[](http://example.com/codeflow?start=0&length=2)
Mixing tabs and spaces in the same file. We prefer 4 spaces than 1 tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please check with other reviewers.
…roved. some unit-tests' issues fixed
done |
} | ||
|
||
leaf srv6_nexthop_low_threshold { | ||
type threshold; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
indentation
@MaratGubaiev can you please fix the build failure? So that we can merge. Thanks. |
@MaratGubaiev can you please help to sign the EasyCLA and address the conflicts? Thanks. |
Long time no response from the submitter, we will duplicate a new PR to track and close this one. |
@qiluo-msft will help to create a new PR. Thanks. |
Why I did it
fixing sonic-net/sonic-utilities#1935 Running "sudo config apply-patch ..." in latest (as of 11/15) master image applied in SONiC switches fails with inability to parse config for given yang models.
Note that the updates described in the issue are not actual any more because of new changes in the yang models.
How I did it
I improved yang models to make them correspond to config.
TODO
"collector_vrf" type is set to "string". It should be more accurate type.
How to verify it
Perform
sudo config apply-patch <some_patch>.json-patch
Patch should be applied and there should be no errors*.
Example of a dummy patch
Example of an empty patch
NOTE that errors might be caused by improper config.
E.g. I changedto
to avoid libyang error