-
Notifications
You must be signed in to change notification settings - Fork 57
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
Client side code for GNOI.System.SetPackage #358
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (4)
gnoi_client/system/set_package.go:75
- The error message should be more descriptive. Suggestion: 'missing -package_filename: Destination path and filename of the package is required for the SetPackage operation.'
return fmt.Errorf("missing -package_filename")
gnoi_client/system/set_package.go:78
- The error message should be more descriptive. Suggestion: 'missing -package_version: Version of the package is required for the SetPackage operation.'
return fmt.Errorf("missing -package_version")
gnoi_client/system/set_package.go:81
- The error message should be more descriptive. Suggestion: 'missing -package_url: URL to download the package from is required for the SetPackage operation. Direct transfer is not supported yet.'
return fmt.Errorf("missing -package_url. Direct transfer is not supported yet")
gnoi_client/system/set_package.go:85
- The error message should be more descriptive. Suggestion: '-package_activate=false is not yet supported: The package will always be activated after setting it.'
return fmt.Errorf("-package_activate=false is not yet supported")
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Please check why coverage checker could not detect new code, and add missing UT. #Closed |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@qiluo-msft UT added with grpc mocks. |
Why I did it
Supports system.SetPackage, see sonic-net/SONiC#1906
This PR also improve ease of use for client by not using (in this
System.SetPackage
specifically) the generic-jsonin
flag where we pass a json string, in favor of a more readable and verifiable flags like-package_filename
and-package_url
.How I did it
Client side code for system.SetPackage.
How to verify it
On physical switches:
Server already have placeholder code so the unimplemented error is expected.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Add System.SetPackage function to gnoi_client.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)