Skip to content
Snippets Groups Projects
Commit e81ad455 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

update joblist

parent 85f1954f
No related branches found
No related tags found
No related merge requests found
Pipeline #458420 passed
......@@ -186,9 +186,12 @@ def build_sub_features(feature_ins, feature):
"""
sub_features = feature.get("subFeatures", [])
### Because of the uniqueness of subfeatures, like ml40::JobList can have many fml40::ForwardingJob in subFeatures
for sub_f in sub_features:
sub_f_name = sub_f.get("name")
if sub_f_name is None:
sub_f_name = sub_f.get("class", "")
sub_f_obj = DT_FACTORY.get(remove_namespace(sub_f_name), None)
sub_f_obj = DT_FACTORY.get(remove_namespace(sub_f.get("class", "")), None)
if sub_f_obj is None:
APP_LOGGER.critical("Subfeature: %s is missing" % sub_f_name)
else:
......
......@@ -6,21 +6,3 @@ def __init__(self, name="", identifier=""):
super().__init__(
name=name,
identifier=identifier)
self.__jobs = list()
self.__json_out = dict()
@property
def jobs(self):
return self.__jobs
@jobs.setter
def jobs(self, value):
self.__jobs = value
def to_json(self):
self.__json_out = super().to_json()
if self.jobs:
self.__json_out["jobs"] = list()
for job in self.jobs:
self.__json_out["jobs"].append(job.to_json())
return self.__json_out
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment