Skip to content

[DO NOT MERGE] [SONiC Hackathon] tests for gRIBi server functionality on SONiC - #28322

Draft
randy-nexthop wants to merge 2 commits into
sonic-net:masterfrom
randy-nexthop:gribi-tests
Draft

randy-nexthop wants to merge 2 commits into
sonic-net:masterfrom
randy-nexthop:gribi-tests

Conversation

@randy-nexthop

Copy link
Copy Markdown

Description of PR

As a part of the SONiC hackathon, we are adding a new feature to SONiC to support writing routes over gRIBi. Associated sonic-mgmt tests are in this PR.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605

Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:

Tested branch

  • master
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • N/A

Test result

Approach

What is the motivation for this PR?

sonic-mgmt tests for a new feature.

How did you do it?

Tested various gRIBi features.

How did you verify/test it?

Tested on latest image w/ gRIBi support.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

randy-nexthop and others added 2 commits September 30, 2026 11:19
grpcurl -format json pretty-prints each streamed message over several
lines, so the line-by-line fallback in call_server_streaming and
call_bidirectional_streaming found nothing to parse once a call returned
more than one message. Decode the output as a stream of JSON values.

Co-authored-by: Alton Lo <alton@nexthop.ai>
Co-authored-by: t-benyu_microsoft <t-benyu@microsoft.com>
Signed-off-by: randy-nexthop <randy@nexthop.ai>
Drive gribid over gRIBI from the PTF container with grpcurl (through
PtfGrpc and gRPC reflection) and check each route against APPL_STATE_DB
and ASIC_DB: IPv4 ECMP add, group replace and delete, IPv6, a next hop
with no neighbor (FIB_FAILED, nothing in the ASIC), a route in a VRF
built from an uplink PortChannel, and the feature disable stopping the
server. Skips on images without the gribi feature or without
SYSTEM_DEFAULTS|swss_zmq enabled.

routeorch reports route results, gRIBI's FIB acknowledgements, only when
orchagent runs with -F, so the module fixture enables
suppress-fib-pending (with a config reload) and restores it afterwards.
pytest_assert and pytest_require are imported under aliases, since
pytest reads any pytest_* name in a conftest as a hook.

All six tests pass on a t0 hardware testbed.

Co-authored-by: Alton Lo <alton@nexthop.ai>
Co-authored-by: t-benyu_microsoft <t-benyu@microsoft.com>
Signed-off-by: randy-nexthop <randy@nexthop.ai>
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Missing ID

One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via:

Co-authored-by: name <email>

Supported Co-authored-by: formats include:

  1. Anything <id+login@users.noreply.github.com> - it will locate your GitHub user by id part.
  2. Anything <login@users.noreply.github.com> - it will locate your GitHub user by login part.
  3. Anything <public-email> - it will locate your GitHub user by public-email part. Note that this email must be made public on Github.
  4. Anything <other-email> - it will locate your GitHub user by other-email part but only if that email was used before for any other CLA as a main commit author.
  5. login <any-valid-email> - it will locate your GitHub user by login part, note that login part must be at least 3 characters long.

Alternatively, if the co-author should not be included, remove the Co-authored-by: line from the commit message.

Please update your commit message(s) by doing git commit --amend and then git push [--force] and then request re-running CLA check via commenting on this pull request:

/easycla

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants