Set execution engine parameters directly instead of using keyvals, to
support cloning of the execution engine job
Signed-off-by: James Ren <jamesren@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4401 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/planner/rpc_utils.py b/frontend/planner/rpc_utils.py
index 5a7f324..577293f 100644
--- a/frontend/planner/rpc_utils.py
+++ b/frontend/planner/rpc_utils.py
@@ -38,12 +38,12 @@
"""
timeout = global_config.global_config.get_config_value(
'PLANNER', 'execution_engine_timeout')
- keyvals = {'server': SERVER,
- 'plan_id': plan.id,
- 'label_name': label.name}
+ control = _get_execution_engine_control(server=SERVER,
+ plan_id=plan.id,
+ label_name=label.name)
options = {'name': plan.name + '_execution_engine',
'priority': afe_models.Job.Priority.MEDIUM,
- 'control_file': _get_execution_engine_control(),
+ 'control_file': control,
'control_type': afe_models.Job.ControlType.SERVER,
'synch_count': None,
'timeout': timeout,
@@ -58,12 +58,13 @@
job.queue(hosts=())
-def _get_execution_engine_control():
+def _get_execution_engine_control(server, plan_id, label_name):
"""
Gets the control file to run the execution engine
"""
- return lazy_load(os.path.join(os.path.dirname(__file__),
- 'execution_engine_control.srv'))
+ control = lazy_load(os.path.join(os.path.dirname(__file__),
+ 'execution_engine_control.srv'))
+ return control % dict(server=server, plan_id=plan_id, label_name=label_name)
def lazy_load(path):