Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/action/get_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later

# Retrieves list of tasks from Itential Platform. Supports filtering via parameters.
# Returns: List of task objects with their status and details.
# Returns: List of task objects with their status, details, and type.
# Example:
# - name: Get tasks by status
# itential.platform.get_tasks:
Expand Down Expand Up @@ -33,6 +33,6 @@ def run(self, tmp=None, task_vars=None):

method = "GET"

params["include"] = "name,status"
params["include"] = "name,status,type"

return make_request(task_vars, method, endpoint, params=params)
2 changes: 1 addition & 1 deletion plugins/action/restart_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ def run(self, tmp=None, task_vars=None):
response = make_request(task_vars, method, endpoint)
results.append(response)

return {"results": results} # Always return a list
return {"results": results}
6 changes: 2 additions & 4 deletions tests/unit/test_input_action_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
@pytest.mark.parametrize("action_module_class, input_args, expected_endpoint, expected_method, expected_params", [
(GetJobs, {"status": "running", "name": "greg"}, "/operations-manager/jobs", "GET", {
"equals[status]": "running",
"equals[name]": "greg",
"include": "name,status"
"equals[name]": "greg"
}),
(GetTasks, {"status": "running", "name": "greg"}, "/operations-manager/tasks", "GET", {
"equals[status]": "running",
"equals[name]": "greg",
"include": "name,status"
"equals[name]": "greg"
}),
])
@patch("ansible_collections.itential.core.plugins.module_utils.http.send_request")
Expand Down