[autotest] Support run_suite with suite package and SSP for Brillo.

This change allows one to run run_suite command without using
--run_prod_code for Brillo build.
create_suite_job will use test_suites and control_files packages from
the Brillo build to create suite job and its test jobs.

Server-side packaging is also supported for newer builds that have
autotest_server_package artifact build.

BUG=chromium:584705
TEST=run in local instance, unittest, verify in moblab

Change-Id: Ia96ca4de919b178302580c23f911bb6445016285
Reviewed-on: https://chromium-review.googlesource.com/332431
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Dan Shi <dshi@google.com>
diff --git a/frontend/afe/site_rpc_interface.py b/frontend/afe/site_rpc_interface.py
index ac7e9a4..e709ba7 100644
--- a/frontend/afe/site_rpc_interface.py
+++ b/frontend/afe/site_rpc_interface.py
@@ -107,13 +107,13 @@
     # Ensure components of |build| necessary for installing images are staged
     # on the dev server. However set synchronous to False to allow other
     # components to be downloaded in the background.
-    ds = dev_server.ImageServer.resolve(build)
+    ds = dev_server.resolve(build)
     timings[constants.DOWNLOAD_STARTED_TIME] = formatted_now()
     timer = autotest_stats.Timer('control_files.stage.%s' % (
             ds.get_server_name(ds.url()).replace('.', '_')))
     try:
         with timer:
-            ds.stage_artifacts(build, ['test_suites'])
+            ds.stage_artifacts(image=build, artifacts=['test_suites'])
     except dev_server.DevServerException as e:
         raise error.StageControlFileFailure(
                 "Failed to stage %s: %s" % (build, e))
@@ -209,7 +209,7 @@
 
     suite_name = canonicalize_suite_name(name)
     if run_prod_code:
-        ds = dev_server.ImageServer.resolve(build)
+        ds = dev_server.resolve(build)
         keyvals = {}
         getter = control_file_getter.FileSystemGetter(
                 [_CONFIG.get_config_value('SCHEDULER',
@@ -641,7 +641,7 @@
         raise ValueError('Could not resolve build %s: %s' % (build, e))
 
     try:
-        ds.stage_artifacts(build, ['test_suites'])
+        ds.stage_artifacts(image=build, artifacts=['test_suites'])
     except dev_server.DevServerException as e:
         raise error.StageControlFileFailure(
                 'Failed to stage %s: %s' % (build, e))