mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-31 07:43:09 +00:00
[PR #7113/6a558734 backport][stable-7] Add support for Redfish PowerCycle reset type (#7115)
Add support for Redfish PowerCycle reset type (#7113)
* Add support for Redfish PowerCycle reset type
* Add changelog frament
(cherry picked from commit 6a558734f7)
Co-authored-by: Scott Seekamp <sseekamp@coreweave.com>
This commit is contained in:
@@ -1074,7 +1074,12 @@ class RedfishUtils(object):
|
||||
# command should be PowerOn, PowerForceOff, etc.
|
||||
if not command.startswith('Power'):
|
||||
return {'ret': False, 'msg': 'Invalid Command (%s)' % command}
|
||||
reset_type = command[5:]
|
||||
|
||||
# Commands (except PowerCycle) will be stripped of the 'Power' prefix
|
||||
if command == 'PowerCycle':
|
||||
reset_type = command
|
||||
else:
|
||||
reset_type = command[5:]
|
||||
|
||||
# map Reboot to a ResetType that does a reboot
|
||||
if reset_type == 'Reboot':
|
||||
|
||||
Reference in New Issue
Block a user