Tracking issue for a new PTF-free native gNOI test suite in sonic-mgmt.
Goal
Add a tests/gnoi/ suite that drives gNOI the "API way": an in-process Python
gRPC client (sonic_grpc.gnoi.GnoiClient) running in the sonic-mgmt container
talks mTLS gRPC directly to the DUT gNOI server on the management IP — no PTF
hop, no in-repo stub generation. The client and its vendored gNOI proto stubs
are provided by a standalone sonic-grpc wheel.
Motivation
Today gNOI tests (tests/gnmi/test_gnoi_*.py) shell out to a gRPC CLI
(grpcurl / py_gnmicli.py) on the PTF container. That couples every gNOI test
to PTF, uses stringly-typed dynamic messages, and hides real gRPC status codes
behind text parsing. A native typed client removes the PTF hop and surfaces
grpc.RpcError status codes directly.
Work items
Status
v1 PoC implemented and validated on a KVM VS testbed (vms-kvm-t0): both
System.Time and File.Stat pass over the native mTLS client. PRs linked
below.
Tracking issue for a new PTF-free native gNOI test suite in sonic-mgmt.
Goal
Add a
tests/gnoi/suite that drives gNOI the "API way": an in-process PythongRPC client (
sonic_grpc.gnoi.GnoiClient) running in the sonic-mgmt containertalks mTLS gRPC directly to the DUT gNOI server on the management IP — no PTF
hop, no in-repo stub generation. The client and its vendored gNOI proto stubs
are provided by a standalone
sonic-grpcwheel.Motivation
Today gNOI tests (
tests/gnmi/test_gnoi_*.py) shell out to a gRPC CLI(
grpcurl/py_gnmicli.py) on the PTF container. That couples every gNOI testto PTF, uses stringly-typed dynamic messages, and hides real gRPC status codes
behind text parsing. A native typed client removes the PTF hop and surfaces
grpc.RpcErrorstatus codes directly.Work items
sonic-grpcwheel providingGnoiClient+ vendored gNOI stubs(System, File) — sonic-buildimage (wired into docker-sonic-mgmt).
tests/gnoi/v1 PoC:System.Time+File.Statover native mTLS,validated on a KVM VS testbed — sonic-mgmt (depends on the wheel).
routing, migrate existing
tests/gnmi/test_gnoi_*.py.Status
v1 PoC implemented and validated on a KVM VS testbed (
vms-kvm-t0): bothSystem.TimeandFile.Statpass over the native mTLS client. PRs linkedbelow.