[DPB][YANG] extended yang-model - added 'buffer_model' field#6464
Conversation
|
Could you please review |
praveen-li
left a comment
There was a problem hiding this comment.
Kindly add a test case for pattern:
To add Test for sonic-yang-module:
1.) Add example Config at:
https://github.com/Azure/sonic-buildimage/blob/e52581e919c95e861cf630c9c7e1a840fc5e8ebd/src/sonic-yang-models/tests/yang_model_tests/yangTest.json#L2
Example config should be in sonic-yang format.
2.) Add matching detail and expected error string at:
https://github.com/Azure/sonic-buildimage/blob/e52581e919c95e861cf630c9c7e1a840fc5e8ebd/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py#L52
If You add a new leaf in YANG Models:
Then add the corresponding config in the same format as in configDB.json at:
https://github.com/Azure/sonic-buildimage/blob/4cf9316ec349f80deceb0d7665b0aaf85bfe2599/src/sonic-yang-models/tests/yang_model_tests/yangTest.json#L1038
And build both:
sonic_yang_mgmt-1.0-py3-none-any.whl
sonic_yang_models-1.0-py3-none-any.whl
Build tests will make sure, Translation works for new leaves in YANG models.
|
@praveen-li could you please review? |
| }, | ||
| 'DEVICE_METADATA_CORRECT_BUFFER_MODEL_PATTERN': { | ||
| 'desc': 'DEVICE_METADATA correct value for BUFFER_MODEL field', | ||
| 'eStr': self.defaultYANGFailure['Verify'], |
There was a problem hiding this comment.
Just Say self.defaultYANGFailure['None']
And Remove:
'verify': {'xpath': '/sonic-device_metadata:sonic-device_metadata/DEVICE_METADATA/localhost/buffer_model',
'key': 'sonic-device_metadata:buffer_model',
'value': 'dynamic'
We usually use verify for default statements in YANG.
| 'DEVICE_METADATA_CORRECT_BUFFER_MODEL_PATTERN2': { | ||
| 'desc': 'DEVICE_METADATA correct value for BUFFER_MODEL field', | ||
| 'eStr': self.defaultYANGFailure['Verify'], | ||
| 'verify': {'xpath': '/sonic-device_metadata:sonic-device_metadata/DEVICE_METADATA/localhost/buffer_model', |
|
@praveen-li could you please review? |
|
retest Azure.sonic-buildimage please |
| "platform": "x86_64-mlnx_msn4700-r0", | ||
| "hostname": "DUT-ASW", | ||
| "bgp_asn": "65000", | ||
| "buffer_model": "separated" |
There was a problem hiding this comment.
It will be great if the value itself can be "incorrect_pattern" instead of "separated".
ping me after that and I will approve, thx a lot.
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@lguohan seems like KVM tests are stuck for more than a day. is this is known? how can we overcome it? |
|
@lguohan we have no KVM test results. how can we merge? |
|
/AzurePipelines run |
|
Commenter does not have sufficient privileges for PR 6464 in repo Azure/sonic-buildimage |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/AzurePipleines run |
|
@lguohan Azure.sonic-buildimage is pending results for that last few days. Can you please help to merge? |
|
Hi @vadymhlushko-mlnx - Could you please join YANG subgroup meeting 2/25 (10-11am pst) to review with the YANG community, thanks. |
|
Hi - Please add more information in the description of the PR why schema changes, config_db changes are needed for YANG subgroup team to review and approve. |
| leaf buffer_model { | ||
| type string { | ||
| pattern "dynamic|traditional"; | ||
| } |
There was a problem hiding this comment.
please add description for this leaf to describe the function name.
There was a problem hiding this comment.
Hi @lguohan,
This leaf is added for dynamic buffer calculation.
The dynamic model represents the model in which the buffer configurations, like the headroom sizes and buffer pool sizes, are dynamically calculated based on the ports' speed, cable length, and MTU. This model is used by Mellanox so far.
The traditional model represents the model in which all the buffer configurations are statically configured in CONFIG_DB tables. This is the default model used by all other vendors.
There was a problem hiding this comment.
yes, can you add description field in the leaf node?
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@praveen-li , who to sign off this pr? |
There was a problem hiding this comment.
I think, this diff is not expected ?
There was a problem hiding this comment.
@praveen-li, I did git rebase, so this diff is expected because there was a merge conflicts, because "SAMPLE_CONFIG_DB_JSON" keys increased with new fields in yangTest.json file.
@lguohan : I have requested a changes on this PR, after that I can approve it. |
19ae560 to
a95a900
Compare
|
@vadymhlushko-mlnx please handle conflicts. |
…est cases Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
a95a900 to
90529e3
Compare
|
@praveen-li, could you please review? I have reworked this PR, according to the last changes in |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@praveen-li could you please also approve? |
1 similar comment
|
@praveen-li could you please also approve? |
|
Hi @neethajohn - Could you please take a look, thanks. |
|
@praveen-li could you please merge? |
|
removed the 202012 label. I don't think we should have it on 202012. DPB should be released as part of 202106. |
@liat-grozovik T0/T1 support is planned with 202012. Don't we need DPB supported for that? Just would like to confirm. Thanks. |
…est cases (sonic-net#6464) - Why I did it The fix for the issue [DPB][YANG] sonic-device_metadata.yang is not aligned with newest changes in CONFIG_DB - How I did it CONFIG_DB was extended with the field buffer_model - added representation of this field inside the sonic-device_metadata.yang - How to verify it Run the command config interface breakout <interface> <breakout_mode> Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
…est cases (sonic-net#6464) - Why I did it The fix for the issue [DPB][YANG] sonic-device_metadata.yang is not aligned with newest changes in CONFIG_DB - How I did it CONFIG_DB was extended with the field buffer_model - added representation of this field inside the sonic-device_metadata.yang - How to verify it Run the command config interface breakout <interface> <breakout_mode> Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
Signed-off-by: Vadym Hlushko vadymh@nvidia.com
- Why I did it
The fix for the issue [DPB][YANG] sonic-device_metadata.yang is not aligned with newest changes in CONFIG_DB
- How I did it
CONFIG_DB was extended with the field
buffer_model- added representation of this field inside the sonic-device_metadata.yang- How to verify it
Run the command
config interface breakout <interface> <breakout_mode>- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)