|
|
@ -78,7 +78,8 @@ class Step(model.entity.Entity): |
|
|
|
:param opt. args additional args |
|
|
|
:return: list of entity-names |
|
|
|
""" |
|
|
|
config = self.getConfig(job, P.KEY_BASIC, B.SUBJECT_VARIANTS, tools.config_tool.get_plain_filename(job, "")) |
|
|
|
config = self.getConfig(job, P.KEY_BASIC, B.SUBJECT_VARIANTS, |
|
|
|
tools.config_tool.get_plain_filename(job, ""), B.SUBJECT_STEP) |
|
|
|
outList = list(config[B.SUBJECT_VARIANTS].keys()) |
|
|
|
return outList |
|
|
|
|
|
|
@ -89,21 +90,29 @@ class Step(model.entity.Entity): |
|
|
|
:param name: |
|
|
|
:return: |
|
|
|
""" |
|
|
|
config = self.getConfig(job, P.KEY_BASIC, B.SUBJECT_VARIANTS, tools.config_tool.get_plain_filename(job, name)) |
|
|
|
config = self.getConfig(job, P.KEY_BASIC, B.SUBJECT_VARIANTS, |
|
|
|
tools.config_tool.get_plain_filename(job, name), B.SUBJECT_STEP) |
|
|
|
return self.setAttributes(job, config, name, LIST_FIELDS, LIST_NODES, LIST_SUBTABLES) |
|
|
|
|
|
|
|
def rest_read(self, job, name): |
|
|
|
print("step read "+name) |
|
|
|
variants = tools.config_tool.getConfig(job, P.KEY_BASIC, B.SUBJECT_VARIANTS)["variants"] |
|
|
|
if name not in variants: |
|
|
|
raise Exception("Argument Variant "+name+" nicht definiert.") |
|
|
|
variant = variants[name] |
|
|
|
if not "comp" in variant: |
|
|
|
raise Exception("Keine Komponente zu "+name+" definiert.") |
|
|
|
cm = basic.componentHandling.ComponentManager.getInstance(job) |
|
|
|
comp = cm.getComponent(variant["comp"]) |
|
|
|
print(str(comp)) |
|
|
|
@staticmethod |
|
|
|
def rebuild_data(job, data: dict) -> dict: |
|
|
|
""" |
|
|
|
gets the subtable-tag from filecsv and sets the subtables in order to workable entity-elements |
|
|
|
:param job: |
|
|
|
:param data: |
|
|
|
:return: |
|
|
|
""" |
|
|
|
data = tools.file_type.popSubjectsNode(job, data) |
|
|
|
# data = tools.file_type.popNameNode(job, data) |
|
|
|
return data |
|
|
|
|
|
|
|
@staticmethod |
|
|
|
def check_data(job, data: dict) -> dict: |
|
|
|
checkNodes = {} |
|
|
|
checkNodes[tools.file_type.MUST_NODES] = [] |
|
|
|
checkNodes[tools.file_type.MUSTNT_NODES] = [B.DATA_NODE_OPTION, B.DATA_NODE_DATA, B.DATA_NODE_FIELDS, B.DATA_NODE_HEADER] |
|
|
|
checkNodes[tools.file_type.OPT_NODES] = [B.SUBJECT_COMP, B.NODE_ATTRIBUTES] |
|
|
|
return tools.file_type.check_nodes(job, data, checkNodes) |
|
|
|
|
|
|
|
def getIDName(self): |
|
|
|
""" |
|
|
|