Skip to content

[gnoi] PTF-free native gNOI test suite (sonic_grpc.GnoiClient) #26039

Description

@hdwhdw

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

  • sonic-grpc wheel providing GnoiClient + vendored gNOI stubs
    (System, File) — sonic-buildimage (wired into docker-sonic-mgmt).
  • tests/gnoi/ v1 PoC: System.Time + File.Stat over native mTLS,
    validated on a KVM VS testbed — sonic-mgmt (depends on the wheel).
  • Follow-ups: broader gNOI surface (OS, Healthz, …), SmartSwitch DPU
    routing, migrate existing tests/gnmi/test_gnoi_*.py.

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions