-
Notifications
You must be signed in to change notification settings - Fork 662
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
[SmartSwitch] Extend reboot script for rebooting SmartSwitch #3566
base: master
Are you sure you want to change the base?
Conversation
460146c
to
c72fbc0
Compare
8746356
to
d6fc624
Compare
Increase code coverage as well
1. Move module base functions to utilties_common/module_base.py 2. Use load_platform_chassis from utilities_common/util_base.py 3. Write unit tests accordingly
utilities_common/module_base.py
Outdated
Returns: | ||
bool: True if the reboot command was successfully sent, False otherwise. | ||
""" | ||
module_index = util.try_get(self.platform_chassis.get_module_index, module_name, default=INVALID_MODULE_INDEX) |
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.
The current util_base.py try_get implemntation does not accept function arguments, may need to be modified
For reboot, is it also possible to check the CONFIG_DB entry for the admin state for the DPUs? if the CONFIG_DB entry is missing or set to down, then we do not need to reboot the DPUs at all |
Co-authored-by: Gagan Punathil Ellath <[email protected]>
Co-authored-by: Gagan Punathil Ellath <[email protected]>
Instantiate ModuleHelper() before calling its functions
What I did
Extended reboot script for SmartSwitch cases to reboot entire SmartSwitch or a specific DPU
How I did it
Implemented changes according to https://github.com/sonic-net/SONiC/blob/605c3a56ac2717dbbb638433e7bb13054fc05a31/doc/smart-switch/reboot/reboot-hld.md
How to verify it
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)