|
|
@ -31,98 +31,98 @@ def get_entity_object(job, entityname: str, name: str="", args: dict={}): |
|
|
|
if name == "" and len(args) == 0 and Magazin.hasEntity(entityname): |
|
|
|
return Magazin.getEntity(entityname) |
|
|
|
if entityname in [B.SUBJECT_STEPS, B.SUBJECT_STEP]: |
|
|
|
entity = getStep(job, name, args) |
|
|
|
entity = getStep(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_STORIES, B.SUBJECT_STORY, "storys"]: |
|
|
|
entity = getStory(job, name, args) |
|
|
|
entity = getStory(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_VARIANTS, B.SUBJECT_VARIANT]: |
|
|
|
entity = getVariant(job, name, args) |
|
|
|
entity = getVariant(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_DATATABLES, B.SUBJECT_DATATABLE]: |
|
|
|
entity = getDatatable(job, name, args) |
|
|
|
entity = getDatatable(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_USECASES, B.SUBJECT_USECASE]: |
|
|
|
entity = getUsecase(job, name, args) |
|
|
|
entity = getUsecase(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_PROJECTS, B.SUBJECT_PROJECT]: |
|
|
|
entity = getProject(job, name, args) |
|
|
|
entity = getProject(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_APPS, B.SUBJECT_APP]: |
|
|
|
entity = getApplication(job, name, args) |
|
|
|
entity = getApplication(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_COMPS, B.SUBJECT_COMP]: |
|
|
|
entity = getComponent(job, name, args) |
|
|
|
entity = getComponent(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_ARTIFACTS, B.SUBJECT_ARTIFACT]: |
|
|
|
entity = getEnvironment(job, name, args) |
|
|
|
entity = getArtifact(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_TESTCASES, B.SUBJECT_TESTCASE]: |
|
|
|
entity = getTestcase(job, name, args) |
|
|
|
entity = getTestcase(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_TESTSUITES, B.SUBJECT_TESTSUITE]: |
|
|
|
entity = getTestsuite(job, name, args) |
|
|
|
entity = getTestsuite(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_TESTPLANS, B.SUBJECT_TESTPLAN]: |
|
|
|
entity = getTestplan(job, name, args) |
|
|
|
entity = getTestplan(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_USERS, B.SUBJECT_USER]: |
|
|
|
entity = getUser(job, name, args) |
|
|
|
entity = getUser(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_REL, B.SUBJECT_RELS]: |
|
|
|
entity = getRelease(job, name, args) |
|
|
|
entity = getRelease(job, entityname, name, args) |
|
|
|
elif entityname in [B.SUBJECT_ENVIRONMENT, B.SUBJECT_ENVIRONMENTS]: |
|
|
|
entity = getEnvironment(job, name, args) |
|
|
|
entity = getEnvironment(job, entityname, name, args) |
|
|
|
else: |
|
|
|
return None |
|
|
|
if name == "" and len(args) == 0 and not Magazin.hasEntity(entityname): |
|
|
|
return Magazin.setEntity(entityname, entity) |
|
|
|
return entity |
|
|
|
|
|
|
|
def getRelease(job=None, name: str="", args: dict={}): |
|
|
|
def getRelease(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.prelease |
|
|
|
return model.prelease.Release(job, name, args) |
|
|
|
return model.prelease.Release(job, entityname, name, args) |
|
|
|
|
|
|
|
def getEnvironment(job=None, name: str="", args: dict={}): |
|
|
|
def getEnvironment(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.environment |
|
|
|
return model.environment.Environment(job, name, args) |
|
|
|
return model.environment.Environment(job, entityname, name, args) |
|
|
|
|
|
|
|
def getArtifact(job=None, name: str="", args: dict={}): |
|
|
|
def getArtifact(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.artifact |
|
|
|
return model.artifact.Artifact(job, name, args) |
|
|
|
return model.artifact.Artifact(job, entityname, name, args) |
|
|
|
|
|
|
|
def getApplication(job=None, name: str="", args: dict={}): |
|
|
|
def getApplication(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.application |
|
|
|
return model.application.Application(job, name, args) |
|
|
|
return model.application.Application(job, entityname, name, args) |
|
|
|
|
|
|
|
def getProject(job=None, name: str="", args: dict={}): |
|
|
|
def getProject(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.project |
|
|
|
return model.project.Project(job, name, args) |
|
|
|
return model.project.Project(job, entityname, name, args) |
|
|
|
|
|
|
|
def getComponent(job=None, name: str="", args: dict={}): |
|
|
|
def getComponent(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.component |
|
|
|
return model.component.Component(job, name, args) |
|
|
|
return model.component.Component(job, entityname, name, args) |
|
|
|
|
|
|
|
def getTestplan(job=None, name: str="", args: dict={}): |
|
|
|
def getTestplan(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.testplan |
|
|
|
return model.testplan.Testplan(job, name, args) |
|
|
|
return model.testplan.Testplan(job, entityname, name, args) |
|
|
|
|
|
|
|
def getTestsuite(job=None, name: str="", args: dict={}): |
|
|
|
def getTestsuite(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.testsuite |
|
|
|
return model.testsuite.Testsuite(job, name, args) |
|
|
|
return model.testsuite.Testsuite(job, entityname, name, args) |
|
|
|
|
|
|
|
def getTestcase(job=None, name: str="", args: dict={}): |
|
|
|
def getTestcase(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.testcase |
|
|
|
return model.testcase.Testcase(job, name, args) |
|
|
|
return model.testcase.Testcase(job, entityname, name, args) |
|
|
|
|
|
|
|
def getStep(job=None, name: str="", args: dict={}): |
|
|
|
def getStep(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.step |
|
|
|
return model.step.Step(job, name, args) |
|
|
|
return model.step.Step(job, entityname, name, args) |
|
|
|
|
|
|
|
def getStory(job=None, name: str="", args: dict={}): |
|
|
|
def getStory(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.story |
|
|
|
return model.story.Story(job, name, args) |
|
|
|
return model.story.Story(job, entityname, name, args) |
|
|
|
|
|
|
|
def getUsecase(job=None, name: str="", args: dict={}): |
|
|
|
def getUsecase(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.usecase |
|
|
|
return model.usecase.Usecase(job, name, args) |
|
|
|
return model.usecase.Usecase(job, entityname, name, args) |
|
|
|
|
|
|
|
def getUser(job=None, name: str="", args: dict={}): |
|
|
|
def getUser(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.user |
|
|
|
return model.user.User(job, name, args) |
|
|
|
return model.user.User(job, entityname, name, args) |
|
|
|
|
|
|
|
def getVariant(job=None, name: str="", args: dict={}): |
|
|
|
def getVariant(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.variant |
|
|
|
return model.variant.Variant(job, name, args) |
|
|
|
return model.variant.Variant(job, entityname, name, args) |
|
|
|
|
|
|
|
def getDatatable(job=None, name: str="", args: dict={}): |
|
|
|
def getDatatable(job=None, entityname: str="" , name: str="", args: dict={}): |
|
|
|
import model.datatable |
|
|
|
return model.datatable.Datatable(job, name, args) |
|
|
|
return model.datatable.Datatable(job, entityname, name, args) |
|
|
|
|
|
|
|