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

Update GNMI path schema #197

Merged
merged 5 commits into from
Mar 13, 2024
Merged

Conversation

ganglyu
Copy link
Contributor

@ganglyu ganglyu commented Mar 6, 2024

Why I did it

We need to update sonic-gnmi to support new GNMI path schema.
HLD PR: sonic-net/SONiC#1625

How I did it

I add a new element in GNMI path to support database instance.

/APPL_DB/localhost/DASH_VNET_TABLE/vnet1/

The second element is used for target database instance, and it's localhost by default.

How to verify it

Run unit test for sonic-gnmi.
Run end to end test for dash and gnmi.

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)

@ganglyu ganglyu closed this Mar 6, 2024
@ganglyu ganglyu reopened this Mar 6, 2024
@qiluo-msft qiluo-msft requested a review from wen587 March 6, 2024 19:10
// Skip first elem
fullPath.Elem = elems[1:]
// Skip first two elem
// New GNMI path schema, /CONFIG_DB/localhost/PORT
Copy link
Collaborator

@qiluo-msft qiluo-msft Mar 6, 2024

Choose a reason for hiding this comment

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

Do not use "New" in comment. It will loss meaning in long run. Audience have no idea of "Old" when looking at the latest code, if this will be day-one behavior in production. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -8,16 +8,16 @@
test_data_update_normal = [
[
{
'update_path': '/sonic-db:APPL_DB/DASH_QOS',
'get_path': '/sonic-db:APPL_DB/_DASH_QOS',
'update_path': '/sonic-db:APPL_DB/localhost/DASH_QOS',
Copy link

Choose a reason for hiding this comment

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

Do we also use localhost in APPL_DB? I remember the localhost is only used in CONFIG_DB.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

GNMI needs to support multi-asic for APPL_DB, so I use the same schema for APPL_DB.

@qiluo-msft qiluo-msft merged commit d56712a into sonic-net:master Mar 13, 2024
5 checks passed
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.

3 participants