|
|
@ -63,7 +63,7 @@ class Entity: |
|
|
|
LIST_SUBTABLES = [] |
|
|
|
PREFIX_SUBTABLE = "" |
|
|
|
|
|
|
|
def __init__(self, job, entityname: str="" , name: str="", args: dict={}): |
|
|
|
def __init__(self, job, entityname: str = "", name: str = "", args: dict = {}): |
|
|
|
import model.table |
|
|
|
self.job = job |
|
|
|
if entityname == "": |
|
|
@ -110,7 +110,8 @@ class Entity: |
|
|
|
self.ddls[entityname][model.table.LISTNAME_FIELDS] = listFields |
|
|
|
self.ddls[entityname][model.table.LISTNAME_NODES] = listNodes |
|
|
|
self.ddls[entityname][model.table.LISTNAME_SUBTABLE] = listSubtables |
|
|
|
# check LISTEN |
|
|
|
# check LISTEN ... hard coded vs. configuered |
|
|
|
# TODO why hard coded const ?? |
|
|
|
for f in listFields: |
|
|
|
if f not in self.LIST_FIELDS: |
|
|
|
raise Exception(entityname + " " + str(self) + " a check list <-> LIST_FIELDS " + f) |
|
|
@ -127,21 +128,23 @@ class Entity: |
|
|
|
if f in B.LIST_DATA_NODE or f[:1] == "_": |
|
|
|
continue |
|
|
|
if f not in listNodes: |
|
|
|
raise Exception(entityname + " " + str(self) + " b check list <-> LIST_NODES " + f) |
|
|
|
raise Exception(entityname + " " + str(self) + " b check list <-> LIST_NODES " + f) |
|
|
|
for f in self.LIST_SUBTABLES: |
|
|
|
if f not in listSubtables: |
|
|
|
raise Exception(entityname + " " + str(self) + " b check list <-> LIST_SUBTABLES " + f) |
|
|
|
raise Exception(entityname + " " + str(self) + " b check list <-> LIST_SUBTABLES " + f) |
|
|
|
|
|
|
|
|
|
|
|
def get_unique_names(self, job, storage="", project="", application="", gran="", args={}, ttype: str=""): |
|
|
|
def get_unique_names(self, job, storage = "", project = "", application = "", gran = "", |
|
|
|
ttype: str = "", args: dict = {}) -> list: |
|
|
|
""" |
|
|
|
gets the entity-names from the defined storage - the field name must be an unique identifier |
|
|
|
:param job: |
|
|
|
:param opt. storage: values db / files - default files |
|
|
|
:param opt. project: select-criteria if used and defined |
|
|
|
:param opt. application: select-criteria if used and defined |
|
|
|
:param opt. gran: granularity values testcase / testsuite / testplan |
|
|
|
:param opt. args additional args |
|
|
|
:param storage: opt. values db / files - default files |
|
|
|
:param project: opt. select-criteria if used and defined |
|
|
|
:param application: opt. select-criteria if used and defined |
|
|
|
:param gran: opt. granularity values testcase / testsuite / testplan |
|
|
|
:param ttype: opt. ddd |
|
|
|
:param args: opt. additional args |
|
|
|
:return: list of entity-names |
|
|
|
""" |
|
|
|
entityNames = [] |
|
|
@ -157,10 +160,10 @@ class Entity: |
|
|
|
""" |
|
|
|
reads the entity-names from file-storage |
|
|
|
:param job: |
|
|
|
:param opt. project: select-criteria if used and defined |
|
|
|
:param opt. application: select-criteria if used and defined |
|
|
|
:param opt. gran: granularity values testcase / testsuite / testplan |
|
|
|
:param opt. args additional args |
|
|
|
:param project: opt. select-criteria if used and defined |
|
|
|
:param application: opt. select-criteria if used and defined |
|
|
|
:param gran: opt. granularity values testcase / testsuite / testplan |
|
|
|
:param args: opt. additional args |
|
|
|
:return: list of entity-names |
|
|
|
""" |
|
|
|
raise Exception(B.EXCEPT_NOT_IMPLEMENT) |
|
|
@ -169,11 +172,11 @@ class Entity: |
|
|
|
""" |
|
|
|
gets the entity-names from the defined storage |
|
|
|
:param job: |
|
|
|
:param opt. storage: values db / files - default files |
|
|
|
:param opt. project: select-criteria if used and defined |
|
|
|
:param opt. application: select-criteria if used and defined |
|
|
|
:param opt. gran: granularity values testcase / testsuite / testplan |
|
|
|
:param opt. args additional args |
|
|
|
:param storage: opt. values db / files - default files |
|
|
|
:param project: opt. select-criteria if used and defined |
|
|
|
:param application: opt. select-criteria if used and defined |
|
|
|
:param gran: opt. granularity values testcase / testsuite / testplan |
|
|
|
:param args: opt. additional args |
|
|
|
:return: list of entity-names |
|
|
|
""" |
|
|
|
entities = [] |
|
|
@ -194,10 +197,10 @@ class Entity: |
|
|
|
""" |
|
|
|
reads the entity-names from file-storage |
|
|
|
:param job: |
|
|
|
:param opt. project: select-criteria if used and defined |
|
|
|
:param opt. application: select-criteria if used and defined |
|
|
|
:param opt. gran: granularity values testcase / testsuite / testplan |
|
|
|
:param opt. args additional args |
|
|
|
:param project: select-criteria if used and defined |
|
|
|
:param application: select-criteria if used and defined |
|
|
|
:param gran: granularity values testcase / testsuite / testplan |
|
|
|
:param args additional args |
|
|
|
:return: list of entity-names |
|
|
|
""" |
|
|
|
raise Exception(B.EXCEPT_NOT_IMPLEMENT) |
|
|
@ -603,6 +606,9 @@ class Entity: |
|
|
|
sql = dbi.getSchemaIndex(table, "actual") + "\n" |
|
|
|
return sql |
|
|
|
|
|
|
|
def get_schema(self, tableName, tableObject): |
|
|
|
pass |
|
|
|
|
|
|
|
def insert_entity(self, job): |
|
|
|
""" |
|
|
|
inserts the entity into the database |
|
|
@ -634,3 +640,4 @@ def read_spec(job, testentity, testgran, specpath): |
|
|
|
spec[key] = val |
|
|
|
return spec |
|
|
|
|
|
|
|
|
|
|
|