Skip to content
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

Support for YANG RPCs #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

faraazbrcm
Copy link

@faraazbrcm faraazbrcm commented Nov 22, 2023

The YANG RPC is supported using gNOI.
The protobufs are auto-generated as part of build from YANG files. The gNOI clients also gets built.

Why I did it

This PR brings in support for YANG RPCs in sonic-gnmi service via gNOI.

How I did it

Generated protobufs from YANG RPCs this is done using pyang plugin and it is hooked up in the sonic-gnmi build.
Protobufs contain RPCs which can be invoked using gNOI.

How to verify it

The gnoi_client application exposes the RPCs generated from YANG, this can be used to verify them.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@faraazbrcm faraazbrcm force-pushed the rpc_from_proto branch 6 times, most recently from 86250a3 to f26f194 Compare November 23, 2023 06:35
TOP_DIR := $(abspath ..)
MGMT_COMMON_DIR := $(TOP_DIR)/sonic-mgmt-common
TOPDIR := .
MGMT_COMMON_DIR := $(TOPDIR)/../sonic-mgmt-common
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MGMT_COMMON_DIR must be an absolute path.. It is used to set env variables like CVL_SCHEMA_PATH etc, used during gotests

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sachinholla . corrected..

@faraazbrcm faraazbrcm force-pushed the rpc_from_proto branch 2 times, most recently from 260d7be to 150ffe6 Compare November 23, 2023 12:40
@faraazbrcm faraazbrcm force-pushed the rpc_from_proto branch 3 times, most recently from 06ba032 to cfc2fc8 Compare December 1, 2023 16:01
@adyeung
Copy link

adyeung commented Jan 18, 2024

@kwangsuk please review

gnmi_server/server.go Outdated Show resolved Hide resolved
@kwangsuk
Copy link

kwangsuk commented Mar 4, 2024

Can you pls update go.mod and go.sum?

gnmi_server/server.go Outdated Show resolved Hide resolved
@kwangsuk
Copy link

kwangsuk commented Mar 4, 2024

Can you please update the following items?

  • Why I did it
  • How I did it
  • How to verify it

The YANG RPC is supported using gNOI.
The protobufs are auto-generated as part of build from YANG files.
The gNOI clients also gets built.
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.

4 participants