mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-06 00:14:02 -07:00
* Update redfish module for compatibility with VirtualMedia resource location from Manager to Systems
* Add changelogs fragments for PR 5124
* Update some issue according to the suggestions
* update changelogs fragment to list new features in the minor_changes catagory
Co-authored-by: Tami YY3 Pan <panyy3@lenovo.com>
(cherry picked from commit 766c109d47
)
Co-authored-by: jixj5 <66418293+jixj5@users.noreply.github.com>
This commit is contained in:
parent
b099a465c5
commit
3e4aae56bd
4 changed files with 93 additions and 18 deletions
|
@ -505,6 +505,20 @@ EXAMPLES = '''
|
|||
username: operator
|
||||
password: supersecretpwd
|
||||
|
||||
- name: Insert Virtual Media
|
||||
community.general.redfish_command:
|
||||
category: Systems
|
||||
command: VirtualMediaInsert
|
||||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
virtual_media:
|
||||
image_url: 'http://example.com/images/SomeLinux-current.iso'
|
||||
media_types:
|
||||
- CD
|
||||
- DVD
|
||||
resource_id: 1
|
||||
|
||||
- name: Insert Virtual Media
|
||||
community.general.redfish_command:
|
||||
category: Manager
|
||||
|
@ -519,6 +533,17 @@ EXAMPLES = '''
|
|||
- DVD
|
||||
resource_id: BMC
|
||||
|
||||
- name: Eject Virtual Media
|
||||
community.general.redfish_command:
|
||||
category: Systems
|
||||
command: VirtualMediaEject
|
||||
baseuri: "{{ baseuri }}"
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
virtual_media:
|
||||
image_url: 'http://example.com/images/SomeLinux-current.iso'
|
||||
resource_id: 1
|
||||
|
||||
- name: Eject Virtual Media
|
||||
community.general.redfish_command:
|
||||
category: Manager
|
||||
|
@ -593,7 +618,7 @@ from ansible.module_utils.common.text.converters import to_native
|
|||
CATEGORY_COMMANDS_ALL = {
|
||||
"Systems": ["PowerOn", "PowerForceOff", "PowerForceRestart", "PowerGracefulRestart",
|
||||
"PowerGracefulShutdown", "PowerReboot", "SetOneTimeBoot", "EnableContinuousBootOverride", "DisableBootOverride",
|
||||
"IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink"],
|
||||
"IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink", "VirtualMediaInsert", "VirtualMediaEject"],
|
||||
"Chassis": ["IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink"],
|
||||
"Accounts": ["AddUser", "EnableUser", "DeleteUser", "DisableUser",
|
||||
"UpdateUserRole", "UpdateUserPassword", "UpdateUserName",
|
||||
|
@ -766,6 +791,10 @@ def main():
|
|||
result = rf_utils.set_boot_override(boot_opts)
|
||||
elif command.startswith('IndicatorLed'):
|
||||
result = rf_utils.manage_system_indicator_led(command)
|
||||
elif command == 'VirtualMediaInsert':
|
||||
result = rf_utils.virtual_media_insert(virtual_media, category)
|
||||
elif command == 'VirtualMediaEject':
|
||||
result = rf_utils.virtual_media_eject(virtual_media, category)
|
||||
|
||||
elif category == "Chassis":
|
||||
result = rf_utils._find_chassis_resource()
|
||||
|
@ -814,9 +843,9 @@ def main():
|
|||
elif command == 'ClearLogs':
|
||||
result = rf_utils.clear_logs()
|
||||
elif command == 'VirtualMediaInsert':
|
||||
result = rf_utils.virtual_media_insert(virtual_media)
|
||||
result = rf_utils.virtual_media_insert(virtual_media, category)
|
||||
elif command == 'VirtualMediaEject':
|
||||
result = rf_utils.virtual_media_eject(virtual_media)
|
||||
result = rf_utils.virtual_media_eject(virtual_media, category)
|
||||
|
||||
elif category == "Update":
|
||||
# execute only if we find UpdateService resources
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue