mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
framework/config: Fix JobSpec.from_pod
This commit is contained in:
parent
95e9d14f9d
commit
2cd0c1a3f1
@ -511,8 +511,8 @@ class Configuration(object):
|
|||||||
def from_pod(cls, pod):
|
def from_pod(cls, pod):
|
||||||
instance = cls()
|
instance = cls()
|
||||||
for cfg_point in cls.config_points:
|
for cfg_point in cls.config_points:
|
||||||
if name in pod:
|
if cfg_point.name in pod:
|
||||||
value = pod.pop(name)
|
value = pod.pop(cfg_point.name)
|
||||||
if hasattr(cfg_point.kind, 'from_pod'):
|
if hasattr(cfg_point.kind, 'from_pod'):
|
||||||
value = cfg_point.kind.from_pod(value)
|
value = cfg_point.kind.from_pod(value)
|
||||||
cfg_point.set_value(instance, value)
|
cfg_point.set_value(instance, value)
|
||||||
@ -922,7 +922,7 @@ class JobSpec(Configuration):
|
|||||||
def from_pod(cls, pod):
|
def from_pod(cls, pod):
|
||||||
job_id = pod.pop('id')
|
job_id = pod.pop('id')
|
||||||
instance = super(JobSpec, cls).from_pod(pod)
|
instance = super(JobSpec, cls).from_pod(pod)
|
||||||
instance['id'] = job_id
|
instance.id = job_id
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user