[autotest] Add create_suite_job() site RPC.

Add create_suite_job() RPC to autotest using the site_rpc mechanism.
Also add support to atest to call this RPC.

The purpose of this RPC is to stage a build on the dev server (if
necessary), image N machines with it, and then run the desired
suite on those machines.

BUG=chromium-os:25573
TEST=atest suite create -b x86-mario -i x86-mario-release/R19-1675.0.0-a1-b1588 test_suites/control.dummy

Change-Id: I09288fe6ffc675e5b111f7f59e349015f52ebb8e
Reviewed-on: https://gerrit.chromium.org/gerrit/15279
Tested-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Scott Zawalski <scottz@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Scott Zawalski <scottz@chromium.org>
diff --git a/server/cros/control_file_getter.py b/server/cros/control_file_getter.py
index 84e6979..796e566 100644
--- a/server/cros/control_file_getter.py
+++ b/server/cros/control_file_getter.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
@@ -94,7 +94,11 @@
         """
         if not self._files and not self.get_control_file_list():
             raise ControlFileNotFound('No control files found.')
-        regexp = re.compile(os.path.join(test_name, 'control'))
+
+        if 'control' not in test_name:
+            regexp = re.compile(os.path.join(test_name, 'control'))
+        else:
+            regexp = re.compile(test_name)
         candidates = filter(regexp.search, self._files)
         if not candidates:
             raise ControlFileNotFound('No control file for ' + test_name)
@@ -182,6 +186,12 @@
         self._build = build
 
 
+    @staticmethod
+    def create(build, ds=None):
+        """Wraps constructor.  Can be mocked for testing purposes."""
+        return DevServerGetter(build, ds)
+
+
     def _get_control_file_list(self):
         """
         Gather a list of paths to control files from |self._dev_server|.