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

gNOI System APIs (Reboot, RebootStatus, CancelReboot) changes #308

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

ndas7
Copy link

@ndas7 ndas7 commented Oct 16, 2024

Why I did it

Add support for gNOI System APIs for Reboot, RebootStatus, CancelReboot to forward requests to the Reboot Backend through Redis DB Notification channel.

How I did it

Created separate files for the System APIs under gnoi_system.go

How to verify it

Unit tests and build infrastructure checks

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

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

Description for the changelog

Add support for gNOI System APIs for Reboot, RebootStatus, CancelReboot

Link to config_db schema for YANG module changes

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

@ndas7
Copy link
Author

ndas7 commented Oct 18, 2024

/azpw run

@mssonicbld
Copy link

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ndas7 ndas7 marked this pull request as ready for review October 31, 2024 19:48
hdwhdw
hdwhdw previously approved these changes Nov 15, 2024
Copy link
Contributor

@hdwhdw hdwhdw left a comment

Choose a reason for hiding this comment

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

No major objections. Just some nits.

gnmi_server/gnoi_system_test.go Outdated Show resolved Hide resolved
gnmi_server/gnoi_system.go Outdated Show resolved Hide resolved
gnmi_server/gnoi_system_test.go Show resolved Hide resolved
gnmi_server/gnoi.go Outdated Show resolved Hide resolved
gnmi_server/gnoi_system.go Outdated Show resolved Hide resolved
gnmi_server/gnoi_system.go Outdated Show resolved Hide resolved
@mssonicbld
Copy link

/azp run

Copy link

Pull request contains merge conflicts.

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vvolam
Copy link
Contributor

vvolam commented Jan 8, 2025

@ndas7 could you please merge latest repo changes for easy review? Thank you!

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

@mssonicbld
Copy link

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ndas7
Copy link
Author

ndas7 commented Jan 31, 2025

/azp run

Copy link

Commenter does not have sufficient privileges for PR 308 in repo sonic-net/sonic-gnmi

@ndas7
Copy link
Author

ndas7 commented Jan 31, 2025

/azp run

Copy link

Commenter does not have sufficient privileges for PR 308 in repo sonic-net/sonic-gnmi

@ndas7
Copy link
Author

ndas7 commented Jan 31, 2025

/azpw run

@mssonicbld
Copy link

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

gnmi_server/gnoi_system.go Show resolved Hide resolved
@hdwhdw hdwhdw requested a review from ganglyu January 31, 2025 19:38
)

// Converts a SWSS error code string into a gRPC code.
func SwssToErrorCode(statusStr string) codes.Code {
Copy link
Collaborator

Choose a reason for hiding this comment

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

SwssToErrorCode

I am worried about the naming. These error code are relating to general gNOI API, not relating to Swss (switch state service).

Since it is a minor issue, okay to update in a future PR.

@qiluo-msft
Copy link
Collaborator

Please resolve conflict

Copy link
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

with minor comment

return &resp, nil
}

func HaltSystem() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

@ndas7 As discussed, could you please integrate this commit as well?

Remove old way of HALT Reboot method by vvolam · Pull Request #1 · ndas7/sonic-gnmi?. If you merge the PR, the commit will be integrated to your PR

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.

6 participants