import basic.program import basic.constants as B import components.component DEFAULT_GRAN = "tc" DEFAULT_APP = "TEST" DEFAULT_ENV = "ENV01" DEFAULT_DIR = "/home/ulrich/6_Projekte/Programme/datest/test/conf/lauf" DEFAULT_TIME = "2022-03-19_12-09-09" DEFAULT_MODE = "unit" gran = "" app = "" env = "" tstamp = "" mode = "" path = "" def getJob(pgran="", papp="", penv="", ptstamp="", pmode=""): job = basic.program.Job.popInstance() if not job is None: job.stopJob() if len(pgran) < 1: gran = DEFAULT_GRAN else: gran = pgran if len(papp) < 1: app = DEFAULT_APP else: app = papp if len(penv) < 1: env = DEFAULT_ENV else: env = penv if len(ptstamp) < 1: tstamp = DEFAULT_TIME else: tstamp = ptstamp if len(pmode) < 1: mode = DEFAULT_MODE else: mode = pmode if gran == "tc": path = DEFAULT_DIR+"/TC0001/"+tstamp elif gran == "ts": path = DEFAULT_DIR + "/testlauf/TST001_" + tstamp job = basic.program.Job("unit") args = {"application": app, "environment": env, "modus": mode, gran+"time": tstamp, gran+"dir": path, "step": 2} # "usecase": "TST001", "tstime": "2022-03-17_17-28"} job.par.setParameterArgs(args) return job def getComp(): comp = components.component.Component() comp.conf = {} comp.name = "testcomp" pass