Add UpdateUserAccountTypes command to redfish_command (#9059)

* Add UpdateUserAccountTypes command to redfish_command

https://github.com/ansible-collections/community.general/issues/9058

* Add changelog fragment

* Update changelogs/fragments/9059-redfish_command-updateuseraccounttypes.yml

Update changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Scott Seekamp 2024-10-28 14:10:48 -06:00 committed by GitHub
parent d0b4e91cac
commit 3506f73da1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 1 deletions

View file

@ -549,6 +549,18 @@ EXAMPLES = '''
AccountLockoutThreshold: 5
AccountLockoutDuration: 600
- name: Update user AccountTypes
community.general.redfish_command:
category: Accounts
command: UpdateUserAccountTypes
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
account_username: "{{ account_username }}"
account_types:
- Redfish
- WebUI
- name: Clear Manager Logs with a timeout of 20 seconds
community.general.redfish_command:
category: Manager
@ -810,7 +822,7 @@ CATEGORY_COMMANDS_ALL = {
"Chassis": ["IndicatorLedOn", "IndicatorLedOff", "IndicatorLedBlink"],
"Accounts": ["AddUser", "EnableUser", "DeleteUser", "DisableUser",
"UpdateUserRole", "UpdateUserPassword", "UpdateUserName",
"UpdateAccountServiceProperties"],
"UpdateUserAccountTypes", "UpdateAccountServiceProperties"],
"Sessions": ["ClearSessions", "CreateSession", "DeleteSession"],
"Manager": ["GracefulRestart", "ClearLogs", "VirtualMediaInsert",
"ResetToDefaults",
@ -978,6 +990,7 @@ def main():
"UpdateUserRole": rf_utils.update_user_role,
"UpdateUserPassword": rf_utils.update_user_password,
"UpdateUserName": rf_utils.update_user_name,
"UpdateUserAccountTypes": rf_utils.update_user_accounttypes,
"UpdateAccountServiceProperties": rf_utils.update_accountservice_properties
}