Adds a command line tool to reverify all Repair Failed hosts.
Also adds a convenience function to server.frontend to make this RPC call.
The reverify_hosts RPC now returns a list of hostnames sent to be
reverified so that the command line tool can print a list.
Signed-off-by: Gregory Smith <gps@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4028 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/rpc_interface.py b/frontend/afe/rpc_interface.py
index 765339d..cb9b50a 100644
--- a/frontend/afe/rpc_interface.py
+++ b/frontend/afe/rpc_interface.py
@@ -558,11 +558,14 @@
def reverify_hosts(**filter_data):
"""\
Schedules a set of hosts for verify.
+
+ @returns A list of hostnames that a verify task was created for.
"""
hosts = models.Host.query_objects(filter_data)
models.AclGroup.check_for_acl_violation_hosts(hosts)
models.SpecialTask.schedule_special_task(hosts,
models.SpecialTask.Task.VERIFY)
+ return list(sorted(host.hostname for host in hosts))
def get_jobs(not_yet_run=False, running=False, finished=False, **filter_data):