|
@ -10,6 +10,7 @@ import tools.path_const as P |
|
|
import tools.config_tool as config_tool |
|
|
import tools.config_tool as config_tool |
|
|
import tools.file_tool as file_tool |
|
|
import tools.file_tool as file_tool |
|
|
import model.component |
|
|
import model.component |
|
|
|
|
|
import model.table |
|
|
|
|
|
|
|
|
PROGRAM_NAME = "check_configuration" |
|
|
PROGRAM_NAME = "check_configuration" |
|
|
|
|
|
|
|
@ -18,7 +19,7 @@ def startPyJob(job): |
|
|
job.m.logDebug("--- start " + PROGRAM_NAME + " ------>>>>") |
|
|
job.m.logDebug("--- start " + PROGRAM_NAME + " ------>>>>") |
|
|
components = job.par.component.split(",") |
|
|
components = job.par.component.split(",") |
|
|
for c in components: |
|
|
for c in components: |
|
|
print("component "+c) |
|
|
job.m.logInfo("------------------------------------------\ncheck component "+c) |
|
|
checkComponent(job, c) |
|
|
checkComponent(job, c) |
|
|
job.m.setMsg("Job " + PROGRAM_NAME + " fertig") |
|
|
job.m.setMsg("Job " + PROGRAM_NAME + " fertig") |
|
|
job.m.logDebug("<<<<<<<<----- " + PROGRAM_NAME + " ------") |
|
|
job.m.logDebug("<<<<<<<<----- " + PROGRAM_NAME + " ------") |
|
@ -50,7 +51,33 @@ def checkComponent(job, componentName): |
|
|
if len(configTree["conf"][x]) != 1: |
|
|
if len(configTree["conf"][x]) != 1: |
|
|
job.m.setWarn("none is not the only subject in "+x) |
|
|
job.m.setWarn("none is not the only subject in "+x) |
|
|
continue |
|
|
continue |
|
|
|
|
|
comps = model.component.select_components(job, None, None) |
|
|
|
|
|
job.m.logInfo("Komponenten pruefen") |
|
|
|
|
|
for c in configTree["conf"][model.component.CP_SUBJECT_COMPS]: |
|
|
|
|
|
if c in ["none"]: |
|
|
|
|
|
continue |
|
|
|
|
|
if c not in comps: |
|
|
|
|
|
job.m.setError(componentName + ": component " + c + " does not exist") |
|
|
|
|
|
job.m.logInfo("- " + componentName + " uses component " + c) |
|
|
|
|
|
job.m.logInfo("Steps pruefen") |
|
|
|
|
|
for v in configTree["conf"][model.component.CP_SUBJECT_STEPS]: |
|
|
|
|
|
if v == "none": |
|
|
|
|
|
continue |
|
|
|
|
|
job.m.logInfo("- "+componentName + " uses variant "+v) |
|
|
|
|
|
job.m.logInfo("Tabellen pruefen") |
|
|
|
|
|
tables = model.table.select_tables(job, None, None) |
|
|
|
|
|
for t in configTree["conf"][model.component.CP_SUBJECT_TABLES]: |
|
|
|
|
|
if t == "none": |
|
|
|
|
|
continue |
|
|
|
|
|
if t in tables: |
|
|
|
|
|
job.m.logInfo("- "+componentName + " uses table " + t) |
|
|
|
|
|
else: |
|
|
|
|
|
job.m.setError(componentName + ": table " + t + " ist not defined.") |
|
|
|
|
|
job.m.logInfo("Artefakte pruefen") |
|
|
|
|
|
for a in configTree["conf"][model.component.CP_SUBJECT_ARTS]: |
|
|
|
|
|
if t == "none": |
|
|
|
|
|
continue |
|
|
|
|
|
job.m.logInfo("- "+componentName + " uses artifact " + a) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
if __name__ == '__main__': |
|
|