[autotest] Add support for scheduler to honor require_ssp attribute in control file

This CL adds changes to pipe require_ssp attribute in control file to autoserv
command. Following are the work flow:

1. The control file parser stores require_ssp attribute value in afe_jobs table.
2. QueueTask compiles command line list, --require-ssp option will be added to
the command line list if following conditions are met:
  a. AUTOSERV/enable_ssp_container in global config is True
  b. The test is a server-side test
  c. require_ssp for the job entry is None or True.
3. When agent_task tries to call run method to run the command, it will check if
there is any drone supporting server-side packaging first. If no drone is found,
the agent task will will run the command in a drone without using server-side
packaging. A warning will be posted in the autoserv log.
4. If a drone without SSP supported is assigned to a test requires SSP, the test
will be run without ssp.

BUG=chromium:453624
TEST=unittest, local test:
set AUTOSERV/enable_ssp_container to True in shadow config;
Create a job for dummy_PassServer in AFE, check require SSP, confirm the job
succeeds but with a warning in the autoserv log.

Create a job for dummy_PassServer_nossp in AFE, uncheck require SSP, confirm
the job passes without warning in the autoserv log.

set AUTOSERV/enable_ssp_container to False in shadow config, restart scheduler.
Create a job for dummy_PassServer in AFE, check require SSP, confirm the job
succeeds without warning in the autoserv log.

also run test_that in local chroot to make sure test_that is not affected.

DEPLOY=apache,scheduler, db migrate must be done before push this CL to prod.

Change-Id: I02f3d137186676ae570e8380d975a1bcd9ffbb94
Reviewed-on: https://chromium-review.googlesource.com/249841
Reviewed-by: Dan Shi <[email protected]>
Commit-Queue: Dan Shi <[email protected]>
Trybot-Ready: Dan Shi <[email protected]>
Tested-by: Dan Shi <[email protected]>
diff --git a/cli/job.py b/cli/job.py
index ddf4e68..6277f38 100644
--- a/cli/job.py
+++ b/cli/job.py
@@ -364,7 +364,7 @@
     [--one-time-hosts <hosts>] [--email <email>]
     [--dependencies <labels this job is dependent on>]
     [--atomic_group <atomic group name>] [--parse-failed-repair <option>]
-    [--image <http://path/to/image>]
+    [--image <http://path/to/image>] [--require-ssp]
     job_name
 
     Creating a job is rather different from the other create operations,
@@ -430,6 +430,9 @@
         self.parser.add_option('-i', '--image',
                                help='OS image to install before running the '
                                     'test.')
+        self.parser.add_option('--require-ssp',
+                               help='Require server-side packaging',
+                               default=False, action='store_true')
 
 
     @staticmethod
@@ -520,6 +523,8 @@
         else:
             self.data['control_type'] = control_data.CONTROL_TYPE_NAMES.CLIENT
 
+        self.data['require_ssp'] = options.require_ssp
+
         return options, leftover