mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-01 05:49:09 -07:00
* WDC Redfish support for setting the power mode.
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add change fragment.
* Add extension to changelog fragment.
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2a449eb163
)
Co-authored-by: Mike Moerk <michael.moerk@wdc.com>
This commit is contained in:
parent
73ee9702db
commit
b32b69742b
4 changed files with 164 additions and 13 deletions
|
@ -170,6 +170,18 @@ EXAMPLES = '''
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
|
||||
- name: Set chassis to Low Power Mode
|
||||
community.general.wdc_redfish_command:
|
||||
category: Chassis
|
||||
resource_id: Enclosure
|
||||
command: PowerModeLow
|
||||
|
||||
- name: Set chassis to Normal Power Mode
|
||||
community.general.wdc_redfish_command:
|
||||
category: Chassis
|
||||
resource_id: Enclosure
|
||||
command: PowerModeNormal
|
||||
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
@ -191,7 +203,9 @@ CATEGORY_COMMANDS_ALL = {
|
|||
],
|
||||
"Chassis": [
|
||||
"IndicatorLedOn",
|
||||
"IndicatorLedOff"
|
||||
"IndicatorLedOff",
|
||||
"PowerModeLow",
|
||||
"PowerModeNormal",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -304,6 +318,8 @@ def main():
|
|||
for command in command_list:
|
||||
if command.startswith("IndicatorLed"):
|
||||
result = rf_utils.manage_chassis_indicator_led(command)
|
||||
elif command.startswith("PowerMode"):
|
||||
result = rf_utils.manage_chassis_power_mode(command)
|
||||
|
||||
if result['ret'] is False:
|
||||
module.fail_json(msg=to_native(result['msg']))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue