Add support for Redfish PowerCycle reset type (#7113)

* Add support for Redfish PowerCycle reset type

* Add changelog frament
This commit is contained in:
Scott Seekamp 2023-08-14 13:59:24 -06:00 committed by GitHub
parent 55cfd27be9
commit 6a558734f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -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':