Skip to content

Add patch for gnmi client to support extensive configurations#22273

Merged
qiluo-msft merged 2 commits intosonic-net:masterfrom
ganglyu:update_gnmi_client
Apr 11, 2025
Merged

Add patch for gnmi client to support extensive configurations#22273
qiluo-msft merged 2 commits intosonic-net:masterfrom
ganglyu:update_gnmi_client

Conversation

@ganglyu
Copy link
Contributor

@ganglyu ganglyu commented Apr 9, 2025

Why I did it

The command line has a length limitation, which restricts the number of configurations it can support.

Work item tracking
  • Microsoft ADO (number only):

How I did it

To overcome this limitation, introduce a new argument: arg_file. Users can place extensive configurations within the arg_file, enabling the GNMI client to handle a larger and more complex set of configurations.

How to verify it

Run gnmi end to end test

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

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 requested a review from lguohan as a code owner April 9, 2025 08:30
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ganglyu ganglyu requested review from liuh-80 and removed request for lguohan April 9, 2025 08:31
+ with open(args['arg_file'], 'r') as file:
+ file_content = file.read()
+ simulated_args = shlex.split(file_content)
+ args = vars(argparser.parse_args(simulated_args))
Copy link
Collaborator

@qiluo-msft qiluo-msft Apr 9, 2025

Choose a reason for hiding this comment

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

args

if the command use other command args and arg_file, arg_file will erase all others. better to combine instread of erasing all. we can even support multiple arg_file peacefully together with all old args. #Closed

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #23026

@mssonicbld
Copy link
Collaborator

@ganglyu cherry pick PR didn't pass PR checker. Please check!!!
#23026

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #23151

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants