add get_special_tasks() RPC, useful for scripts looking at repairs on a machine etc
Signed-off-by: Steve Howard <showard@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3452 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/rpc_interface.py b/frontend/afe/rpc_interface.py
index 5712f0e..dc13ea0 100644
--- a/frontend/afe/rpc_interface.py
+++ b/frontend/afe/rpc_interface.py
@@ -650,6 +650,14 @@
return float(complete_count) / total_count
+# special tasks
+
+def get_special_tasks(**filter_data):
+ return rpc_utils.prepare_rows_as_nested_dicts(
+ models.SpecialTask.query_objects(filter_data),
+ ('host', 'queue_entry'))
+
+
# support for host detail view
def get_host_queue_entries_and_special_tasks(hostname, query_start=None,