These 14 commits are when the Protocol Buffers files have changed:
| Commit: | cc3b071 | |
|---|---|---|
| Author: | Dawei Huang | |
| Committer: | GitHub | |
[202511] Cherry-pick gnmi/gnxi testsuite & fixtures updates (#24392) [202511] Cherry-pick gnmi/gnxi testsuite & fixtures updates from master Backport of recent gnmi/gnxi test infrastructure work that has accumulated on master since the 202511 branch cut. All cherry-picks were applied in chronological merge order on top of `202511`. ### Included PRs (in cherry-pick order) 1. #22111 — Fix GNXI testsuite topology markers *(already present on 202511 via earlier backport — empty cherry-pick, skipped)* 2. #22412 — Remove autouse from gnmi test fixtures 3. #22354 — Update gnmi container parameters and add gnxi tests for container upgrade 4. #22553 — Consolidate gnxi tests into gnmi directory 5. #22877 — Refactor gNMI fixtures to couple server config with clients 6. #23755 — Add PtfGnmic client wrapper and gnmic capabilities integration test 7. #23876 — Add UDS transport support to gNMI/gNOI test fixtures 8. #24329 — [conditional_mark] Skip gnmi/test_gnmic.py ### Conflict resolutions - **#22412**: `tests/gnmi/test_gnmi_2038.py` — added on master by #15770 which was never backported to 202511. Dropped that file's hunk; the rest of the autouse removal applied cleanly. - **#22553**: `tests/gnmi/conftest.py` — took master's post-consolidation version (legacy proto-compile / `grpc_channel` fixtures removed). Deleted `tests/gnmi/grpc_utils.py` and `tests/gnmi/test_gnoi_system_grpc.py` consistent with master. The legacy `test_gnoi_system_grpc.py` is superseded by the consolidated `test_gnoi_system.py` which uses the new TLS-managed client framework. - **#23755**: Top-level `Makefile` was added on master by #22506 (not backported here). Dropped the Makefile hunk; the actual test code (`tests/common/ptf_gnmic.py`, `tests/gnmi/test_gnmic.py`) and fixture wiring were applied unchanged. - **#24329**: `tests/common/plugins/conditional_mark/tests_mark_conditions.yaml` — additive merge, kept both new skip blocks. ### PRs deliberately excluded - #22481 (cSONiC testbed) and #22506 (testbed Makefile) — not gnmi/gnxi scope. - #21529, #22248 — already on 202511 via batch backport #23653. ### Verification - Python syntax check (`py_compile`) on all changed `.py` files: all OK. - No 202511-only callers remain for the removed `setup_and_cleanup_protos` / `compile_protos` / `grpc_channel` fixtures (verified via `git grep`). - Pre-commit / Azure pipelines not run locally — relying on the branch CI for full verification. --------- Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
The documentation is generated from this commit.
| Commit: | 3657cce | |
|---|---|---|
| Author: | Dawei Huang | |
| Committer: | GitHub | |
Consolidate gnxi tests into gnmi directory (#22553) * Consolidate gnxi tests into gnmi directory Move gnoi tests from tests/gnxi to tests/gnmi and remove redundant coverage. The gnxi tests use the cleaner ptf_gnoi fixture approach which is now preferred over the old gnoi_request helper and native gRPC stubs. Changes: - Move test_gnoi_file.py from gnxi to gnmi - Replace test_gnoi_system.py with gnxi version using ptf_gnoi fixture - Remove test_gnoi_system_grpc.py (redundant System.Time test) - Remove grpc_utils.py (no longer needed) - Delete tests/gnxi directory Signed-off-by: Dawei Huang <daweihuang@microsoft.com> * Fix stale gnxi references after consolidation into gnmi Update testcases.json and pr_reviewer-by-files.yml to reflect the gnxi -> gnmi test directory migration merged from master. Signed-off-by: Dawei Huang <daweihuang@microsoft.com> * just to rerun pipeline Signed-off-by: Dawei Huang <daweihuang@microsoft.com> * Revert auto-populated reviewer file to fix pre-commit Signed-off-by: Dawei Huang <daweihuang@microsoft.com> --------- Signed-off-by: Dawei Huang <daweihuang@microsoft.com>
The documentation is generated from this commit.
| Commit: | 1d66f0c | |
|---|---|---|
| Author: | Dawei Huang | |
| Committer: | GitHub | |
Add a test for System.Time using gRPC python API (#17068) Description of PR Summary: Add a test for System.Time using gRPC python API Approach Add a test for System.Time, but instead of using our gnoi_client binary, use a generic python API. What is the motivation for this PR? Test interoperability between our golang GNOI server and any client, say using a generic python API. Also serves as a demonstration of how to write a gnoi client in python. How did you do it? git clone proto files in github.com/openconfig/gnoi fix imports in the relevant proto files. compile the proto file into python code using protoc fix import in the generated python code add the testcase How did you verify/test it? on KVM and physical switch:
| Commit: | a9cccf5 | |
|---|---|---|
| Author: | Longxiang Lyu | |
| Committer: | GitHub | |
[202205][dualtor-io] show mux port flaps (#9568) (#10266) What is the motivation for this PR? Cherry-pick PR #9568 into 202205 For dualtor-io tests, log the mux port flaps to better help debug. How did you do it? Add fixture check_simulator_flap_counter to show/check mux port flaps during test execution, and enable it for all dualtor-io testcases. How did you verify/test it? Run dualtor-io tests on both active-standby and active-active testbed. Any platform specific information? Supported testbed topology if it's a new test case? Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
| Commit: | adfff1f | |
|---|---|---|
| Author: | Longxiang Lyu | |
| Committer: | mssonicbld | |
[dualtor-io] show mux port flaps (#9568) Approach What is the motivation for this PR? For dualtor-io tests, log the mux port flaps to better help debug. Signed-off-by: Longxiang Lyu lolv@microsoft.com How did you do it? Add fixture check_simulator_flap_counter to show/check mux port flaps during test execution, and enable it for all dualtor-io testcases. How did you verify/test it? Run dualtor-io tests on both active-standby and active-active testbed. Any platform specific information? Supported testbed topology if it's a new test case?
The documentation is generated from this commit.
| Commit: | ded2afc | |
|---|---|---|
| Author: | Longxiang Lyu | |
| Committer: | GitHub | |
[dualtor-io] show mux port flaps (#9568) Approach What is the motivation for this PR? For dualtor-io tests, log the mux port flaps to better help debug. Signed-off-by: Longxiang Lyu lolv@microsoft.com How did you do it? Add fixture check_simulator_flap_counter to show/check mux port flaps during test execution, and enable it for all dualtor-io testcases. How did you verify/test it? Run dualtor-io tests on both active-standby and active-active testbed. Any platform specific information? Supported testbed topology if it's a new test case?
The documentation is generated from this commit.
| Commit: | b4ddc7f | |
|---|---|---|
| Author: | Cong Hou | |
| Committer: | GitHub | |
Add semicolons back to the proto files (#8761) Approach What is the motivation for this PR? Fix the gRPC proto files for nic simulator. How did you do it? Revert the change of the proto files made by PR#8017 How did you verify/test it? Use testbed-cli.sh to deploy the dualtor-aa topology, all steps passed. Any platform specific information? Supported testbed topology if it's a new test case?
| Commit: | 8e61063 | |
|---|---|---|
| Author: | Longxiang Lyu | |
| Committer: | GitHub | |
[dualtor][active-active] Add grpc server failure dualtor io testcases (#8475) Approach What is the motivation for this PR? As the subject, cherry-pick into 202205 branch Signed-off-by: Longxiang Lyu lolv@microsoft.com How did you do it? add mgmt rpc SetNicServerAdminState to nic_simulator add fixture stop_nic_grpc_server to simulator grpc server failure add two testcases: test_grpc_server_failure_config_standby_config_auto_upstream_active test_grpc_server_failure_config_standby_config_auto_downstream_standby How did you verify/test it? verified on dualtor-mixed testbed Any platform specific information?
| Commit: | d4495dc | |
|---|---|---|
| Author: | xwjiang-ms | |
| Committer: | GitHub | |
[pre-commit] Fix style issues in test scripts under `ansible/c*` to (#8017) What is the motivation for this PR? pre-commit is a static analysis tool introduced recently. This tool is not able to do diff-only check. It checks the whole files touched by PR. We can't blame PR author for legacy issues. That's why currently the pre-commit check is only optional. To ensure that we can make pre-commit a mandatory check for PRs submitted to this repository, we need to fix all the legacy issues complained by pre-commit. How did you do it? This change fixes the style issues of test scripts under ansible/c* to ansible/h*` folder
| Commit: | 3f49080 | |
|---|---|---|
| Author: | Longxiang Lyu | |
| Committer: | GitHub | |
[dualtor][active-active] Add grpc server failure dualtor io testcases (#7979) Approach What is the motivation for this PR? As the subject. Signed-off-by: Longxiang Lyu lolv@microsoft.com How did you do it? add mgmt rpc SetNicServerAdminState to nic_simulator add fixture stop_nic_grpc_server to simulator grpc server failure add two testcases: test_grpc_server_failure_config_standby_config_auto_upstream_active test_grpc_server_failure_config_standby_config_auto_downstream_standby How did you verify/test it? verified on dualtor-mixed testbed
| Commit: | 701652c | |
|---|---|---|
| Author: | xwjiang-ms | |
| Committer: | GitHub | |
[pre-commit] Fix style issues in test scripts under `tests/common/dualtor/nic_simulator` folder (#6913) * [pre-commit] Fix style issues in test scripts under `tests/common/dualtor/nic_simulator` folder What is the motivation for this PR? pre-commit is a static analysis tool introduced recently. This tool is not able to do diff-only check. It checks the whole files touched by PR. We can't blame PR author for legacy issues. That's why currently the pre-commit check is only optional. To ensure that we can make pre-commit a mandatory check for PRs submitted to this repository, we need to fix all the legacy issues complained by pre-commit. How did you do it? This change fixes the style issues of test scripts under `tests/common/dualtor/nic_simulator` folder How did you verify/test it? Any platform specific information? Supported testbed topology if it's a new test case?
| Commit: | 4a258c1 | |
|---|---|---|
| Author: | Longxiang Lyu | |
| Committer: | GitHub | |
[dualtor][active-active] Enable `test_link_drop` (#6200) Approach What is the motivation for this PR? Enable test_link_drop on mux ports of cable type active-active How did you do it? 1. Add rpc call SetDrop for nic_simulator to drop flow, both upstream/downstream 2. Add fixture set_drop_active_active to call nic_simulator rpc call SetDrop to simulate link drop. 3. Enable two testcases: test_active_link_drop_upstream and test_active_link_drop_downstream_active How did you verify/test it?
| Commit: | 8604fa0 | |
|---|---|---|
| Author: | Longxiang Lyu | |
| Committer: | GitHub | |
[nic_simulator] Correct proto service definitions (#5570) Approach What is the motivation for this PR? Correct protocol buffer service definitions. Signed-off-by: Longxiang Lyu lolv@microsoft.com How did you do it? 1. modify nic_simulator_grpc_service.proto to have versions APIs. 2. modify nic_simulator.py accordingly to reflect protocol buffer changes. How did you verify/test it? Ensure nic_simulator_client.py could interacts with server.
| Commit: | 4cfce43 | |
|---|---|---|
| Author: | Longxiang Lyu | |
| Committer: | GitHub | |
[dualtor] Add `nic_simulator` (#5413) ### Approach #### What is the motivation for this PR? Add `nic_simulator` to act as gRPC server to respond to requests from DUT operates in dualtor `active-active` mode. Signed-off-by: Longxiang Lyu <lolv@microsoft.com> #### How did you do it? Add script `nic_simulator.py` to start per-port gRPC server for a dualtor `active-active` setup testbed. It should run in the server NiCs namespace, and it basically does the following few things after it starts: 1. scans for all the ports in the namespace that follows the server NiC name pattern(`eth%d`) and finds its corresponding OVS bridge, the bridge will be verified to have the following topology: ``` +--------------+ PTF (host_if) --+ +----- upper_if | OVS bridge | netns (server_nic) --+ +----- lower_if +--------------+ ``` 2. starts to set up the flows for each OVS bridge collected in step1, the initial forwarding state is `(active, active)`. * the flows added: * `FLOW I`: for packets from `upper_if`, it will be duplicated to `host_if` and `server_nic`. * `FLOW II`: for packets from `lower_if`, it will be duplicated to `host_if` and `server_nic`. * `FLOW III`: for packets from `server_nic`, it will be duplicated to `upper_if` and `lower_if`. * `FLOW IV`: for packets from `host_if`, it will be directed to either `upper_if` or `lower_if`. 3. starts the gRPC services(one port, one server) to query/set the forwarding state of the bridge. * if upper ToR forwarding state is set to `standby`, `nic_simulator` will modify `FLOW IV` to let packets from `host_if` only be directed to lower ToR(`active`) **TODO** 1. Add RPC calls to cover testing scenarios like link drop and link down. 2. Add client authentication. 3. Implement `RPC` call `QueryOperationPortState` 4. add logging interceptors to the RPC calls. #### How did you verify/test it? 1. run the `nic_simulator.py` 2. run the `nic_simulator_client.py` to verify `nic_simulator` operations.