|
|
@ -294,6 +294,14 @@ EXAMPLES = '''
|
|
|
|
username: "{{ username }}"
|
|
|
|
username: "{{ username }}"
|
|
|
|
password: "{{ password }}"
|
|
|
|
password: "{{ password }}"
|
|
|
|
timeout: 20
|
|
|
|
timeout: 20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Clear Sessions
|
|
|
|
|
|
|
|
redfish_command:
|
|
|
|
|
|
|
|
category: Sessions
|
|
|
|
|
|
|
|
command: ClearSessions
|
|
|
|
|
|
|
|
baseuri: "{{ baseuri }}"
|
|
|
|
|
|
|
|
username: "{{ username }}"
|
|
|
|
|
|
|
|
password: "{{ password }}"
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
RETURN = '''
|
|
|
|
RETURN = '''
|
|
|
@ -317,6 +325,7 @@ CATEGORY_COMMANDS_ALL = {
|
|
|
|
"Accounts": ["AddUser", "EnableUser", "DeleteUser", "DisableUser",
|
|
|
|
"Accounts": ["AddUser", "EnableUser", "DeleteUser", "DisableUser",
|
|
|
|
"UpdateUserRole", "UpdateUserPassword", "UpdateUserName",
|
|
|
|
"UpdateUserRole", "UpdateUserPassword", "UpdateUserName",
|
|
|
|
"UpdateAccountServiceProperties"],
|
|
|
|
"UpdateAccountServiceProperties"],
|
|
|
|
|
|
|
|
"Sessions": ["ClearSessions"],
|
|
|
|
"Manager": ["GracefulRestart", "ClearLogs"],
|
|
|
|
"Manager": ["GracefulRestart", "ClearLogs"],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -433,6 +442,16 @@ def main():
|
|
|
|
if command in led_commands:
|
|
|
|
if command in led_commands:
|
|
|
|
result = rf_utils.manage_indicator_led(command)
|
|
|
|
result = rf_utils.manage_indicator_led(command)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif category == "Sessions":
|
|
|
|
|
|
|
|
# execute only if we find SessionService resources
|
|
|
|
|
|
|
|
resource = rf_utils._find_sessionservice_resource()
|
|
|
|
|
|
|
|
if resource['ret'] is False:
|
|
|
|
|
|
|
|
module.fail_json(msg=resource['msg'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for command in command_list:
|
|
|
|
|
|
|
|
if command == "ClearSessions":
|
|
|
|
|
|
|
|
result = rf_utils.clear_sessions()
|
|
|
|
|
|
|
|
|
|
|
|
elif category == "Manager":
|
|
|
|
elif category == "Manager":
|
|
|
|
MANAGER_COMMANDS = {
|
|
|
|
MANAGER_COMMANDS = {
|
|
|
|
"GracefulRestart": rf_utils.restart_manager_gracefully,
|
|
|
|
"GracefulRestart": rf_utils.restart_manager_gracefully,
|
|
|
|