-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DPB][YANG] extended yang-model - added 'buffer_model' field #6464
[DPB][YANG] extended yang-model - added 'buffer_model' field #6464
Conversation
Could you please review |
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.
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? |
@@ -215,6 +215,26 @@ def initTest(self): | |||
'value': 'disable' | |||
} | |||
}, | |||
'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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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', |
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.
Same Here.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
@praveen-li, done
/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. |
@@ -1263,6 +1293,738 @@ | |||
} | |||
}, | |||
|
|||
"SAMPLE_CONFIG_DB_JSON": { |
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.
I think, this diff is not expected ?
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.
@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 <[email protected]>
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 <[email protected]>
…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 <[email protected]>
Signed-off-by: Vadym Hlushko [email protected]
- 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)