-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[sonic-cfggen] Fix init t1 config to align with YANG #21195
Conversation
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw ms_conflict |
This reverts commit 32692ea.
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Commenter does not have sufficient privileges for PR 21195 in repo sonic-net/sonic-buildimage |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
src/sonic-config-engine/tests/sample_output/t1-smartswitch.json
Outdated
Show resolved
Hide resolved
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
YANG validation check blocked by #21111 |
@@ -238,6 +244,7 @@ def generate_l2_config(data): | |||
# Ports in use should be admin up, unused ports default to admin down | |||
if port in downlinks or port in uplinks: | |||
data['PORT'][port].setdefault('admin_status', 'up') | |||
data['PORT'][port].setdefault('speed', '50000') |
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.
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.
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.
In general, port_config.ini
always contains the speed column.
But the Unit test was using a port_config.ini doesn't contain speed https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-config-engine/tests/t0-sample-port-config.ini
That's probably why we didn't hit yang issue for such long time.
@theasianpianist to review #Closed Refers to: src/sonic-config-engine/config_samples.py:192 in 051a6ee. [](commit_id = 051a6ee, deletion_comment = True) |
This change looks ok to me, did you have a specific concern? |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Why I did it Improve the t1 config to align with YANG validation How I did it Add missing leafref and mandatory field to the config How to verify it YANG validation check on generated config
Re add 202411 to see if it generate PR automatically. |
Cherry-pick PR to 202411: #21641 |
Why I did it
Improve the t1 config to align with YANG validation
Work item tracking
How I did it
Add missing leafref and mandatory field to the config
How to verify it
YANG validation check on generated config
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)