-
Notifications
You must be signed in to change notification settings - Fork 738
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
Add gnmi test for smartswitch #16053
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
tests/gnmi/helper.py
Outdated
@@ -96,6 +96,7 @@ def apply_cert_config(duthost): | |||
dut_command += "--config_table_name GNMI_CLIENT_CERT " | |||
dut_command += "--client_auth cert " | |||
dut_command += "--enable_crl=true " | |||
dut_command += "--zmq_address=tcp://127.0.0.1:8100 " |
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.
Updated.
tests/gnmi/test_gnmi_smartswitch.py
Outdated
result = duthost.shell("show chassis module status") | ||
for line in result['stdout_lines']: | ||
module_status = line.split() | ||
if "Online" in module_status: |
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.
Updated.
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 initialize name_idx, oper_status_idx to something (like NULL) before the loop, and check valid values after the loop.
I understand the python code is working, but not robust, and easy to trigger bug, if there is global variable with the same names.
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.
tests/gnmi/test_gnmi_smartswitch.py
Outdated
redis_port = data['INSTANCES']['redis']['port'] | ||
file_name = "vnet.txt" | ||
vni = "1000" | ||
guid = "559c6ce8-26ab-4193-b946-ccc6e8f930b2" |
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.
Now I use uuid to generate guid.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Description of PR
Summary:
Fixes # (issue)
Microsoft ADO: 28940620
Type of change
Back port request
Approach
What is the motivation for this PR?
Add gnmi end to end test for smartswitch
How did you do it?
Use GNMI to update the DASH_VNET_TABLE, and use redis cli to verify the DASH_VNET_TABLE in APPL_DB.
Only run test for smartswitch device.
How did you verify/test it?
Run gnmi end to end test
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation