[autotest] Create dynamic_suite child jobs with parent_job_id

Child jobs of a dynamic_suite call are now created with appropriate
parent_job_id pointing back at the suite job.

BUG=chromium-os:38253
TEST=Kick of a suite with run_suite.py. Child jobs have correct parent
job id, as seen in job detail view.

Change-Id: Ie45aac1b741b1282ddf792812480bc1f4d35278a
Reviewed-on: https://gerrit.chromium.org/gerrit/43583
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
diff --git a/frontend/afe/rpc_utils.py b/frontend/afe/rpc_utils.py
index a2781bd..77951b2 100644
--- a/frontend/afe/rpc_utils.py
+++ b/frontend/afe/rpc_utils.py
@@ -1,3 +1,4 @@
+#pylint: disable-msg=C0111
 """\
 Utility functions for rpc_interface.py.  We keep them in a separate file so that
 only RPC interface functions go into that file.
@@ -5,7 +6,7 @@
 
 __author__ = 'showard@google.com (Steve Howard)'
 
-import datetime, os, sys, inspect
+import datetime, os, inspect
 import django.http
 from autotest_lib.frontend.afe import models, model_logic, model_attributes
 
@@ -15,6 +16,7 @@
 def prepare_for_serialization(objects):
     """
     Prepare Python objects to be returned via RPC.
+    @param objects: objects to be prepared.
     """
     if (isinstance(objects, list) and len(objects) and
         isinstance(objects[0], dict) and 'id' in objects[0]):
@@ -642,7 +644,9 @@
                       run_verify=True, email_list='', dependencies=(),
                       reboot_before=None, reboot_after=None,
                       parse_failed_repair=None, hostless=False, keyvals=None,
-                      drone_set=None, parameterized_job=None):
+                      drone_set=None, parameterized_job=None,
+                      parent_job_id=None):
+    #pylint: disable-msg=C0111
     """
     Common code between creating "standard" jobs and creating parameterized jobs
     """
@@ -745,7 +749,8 @@
                    parse_failed_repair=parse_failed_repair,
                    keyvals=keyvals,
                    drone_set=drone_set,
-                   parameterized_job=parameterized_job)
+                   parameterized_job=parameterized_job,
+                   parent_job_id=parent_job_id)
     return create_new_job(owner=owner,
                           options=options,
                           host_objects=host_objects,