-
Notifications
You must be signed in to change notification settings - Fork 685
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
Add show reboot-cause history
cli
#1210
Conversation
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.
As comments. Also, since reboot-cause
is now a group, can you please move this functionality to a new file, reboot_cause.py
and import the file in main.py? There are a number of other examples.
This pull request introduces 1 alert when merging 7182079 into ef5f212 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 1ac64c6 into ef5f212 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 24f8dd0 into 061f428 - view on LGTM.com new alerts:
|
please paste code coverage number. |
This comment has been minimized.
This comment has been minimized.
retest this please! |
retest this please! |
retest this please |
retest this please |
retest this please |
can you fix unit test failure? |
@lguohan yes, I'm checking it. I got some other errors on sonic-utilities builds so I'm doing a clean up build to reproduce this unit test failure. |
[2020-11-28T07:13:01.701Z] ----------- coverage: platform linux, python 3.7.3-final-0 ----------- |
What I did
To make the reboot cause history information available for telemetry service, during processing the reboot-cause on boot, the information is saved in state-db.
The cli command show reboot-cause is changed to support the new file format and file name.
New command show reboot-cause history is added to display the reboot-cause information which is stored in state-db.
How I did it
Add the 'show reboot-cause history' command to read up to the10 previous reboot-cause information from state-db and display them.
Read the last reboot-cause from the new file "previous-reboot-cause.json" and process the data to display for show reboot-cause
How to verify it
Unit test added.
Verified also in DUT
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)
HLD : sonic-net/SONiC#669