1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-06-21 15:55:58 +01:00

Instrument intialization, job generation + bits

This commit is contained in:
Sergei Trofimov
2017-02-21 10:55:21 +00:00
parent 390e9ca78a
commit 18d001fd76
12 changed files with 228 additions and 19 deletions

@ -541,10 +541,9 @@ class Configuration(object):
def to_pod(self):
pod = {}
for cfg_point in self.configuration.itervalues():
for cfg_point in self.config_points:
value = getattr(self, cfg_point.name, None)
if value is not None:
pod[cfg_point.name] = _to_pod(cfg_point, value)
pod[cfg_point.name] = _to_pod(cfg_point, value)
return pod
@ -848,6 +847,16 @@ class JobSpec(Configuration):
instance['id'] = job_id
return instance
@property
def section_id(self):
if self.id is not None:
self.id.rsplit('-', 1)[0]
@property
def workload_id(self):
if self.id is not None:
self.id.rsplit('-', 1)[-1]
def __init__(self):
super(JobSpec, self).__init__()
self.to_merge = defaultdict(OrderedDict)
@ -1001,7 +1010,6 @@ class JobGenerator(object):
return specs
def create_job_spec(workload_entry, sections, target_manager, plugin_cache,
disabled_instruments):
job_spec = JobSpec()