Skip to content

Commit

Permalink
Add FullPowerCycle to Power commands (ansible-collections#9729)
Browse files Browse the repository at this point in the history
* Add `FullPowerCycle` to Power commands

* Add changelog fragment

* Rename command

* Fix line length for redfish_command options
  • Loading branch information
sseekamp authored and yeetypete committed Feb 14, 2025
1 parent 0edd816 commit 31ad110
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/9729-redfish-fullpowercycle-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- redfish_command - add ``PowerFullPowerCycle`` to power command options (https://github.com/ansible-collections/community.general/pull/9729).
3 changes: 2 additions & 1 deletion plugins/module_utils/redfish_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,8 @@ def manage_power(self, command, resource_uri, action_name, wait=False,
key = "Actions"
reset_type_values = ['On', 'ForceOff', 'GracefulShutdown',
'GracefulRestart', 'ForceRestart', 'Nmi',
'ForceOn', 'PushPowerButton', 'PowerCycle']
'ForceOn', 'PushPowerButton', 'PowerCycle',
'FullPowerCycle']

# command should be PowerOn, PowerForceOff, etc.
if not command.startswith('Power'):
Expand Down
6 changes: 4 additions & 2 deletions plugins/modules/redfish_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,10 @@
# More will be added as module features are expanded
CATEGORY_COMMANDS_ALL = {
"Systems": ["PowerOn", "PowerForceOff", "PowerForceRestart", "PowerGracefulRestart",
"PowerGracefulShutdown", "PowerReboot", "PowerCycle", "SetOneTimeBoot", "EnableContinuousBootOverride", "DisableBootOverride",
"IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink", "VirtualMediaInsert", "VirtualMediaEject", "VerifyBiosAttributes"],
"PowerGracefulShutdown", "PowerReboot", "PowerCycle", "PowerFullPowerCycle",
"SetOneTimeBoot", "EnableContinuousBootOverride", "DisableBootOverride",
"IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink", "VirtualMediaInsert",
"VirtualMediaEject", "VerifyBiosAttributes"],
"Chassis": ["IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink"],
"Accounts": ["AddUser", "EnableUser", "DeleteUser", "DisableUser",
"UpdateUserRole", "UpdateUserPassword", "UpdateUserName",
Expand Down

0 comments on commit 31ad110

Please sign in to comment.