Data-Test-Executer Framework speziell zum Test von Datenverarbeitungen mit Datengenerierung, Systemvorbereitungen, Einspielungen, ganzheitlicher diversifizierender Vergleich
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
1.7 KiB

#!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------------------------------------
# Author : Ulrich Carmesin
# Source : gitea.ucarmesin.de
# ---------------------------------------------------------------------------------------------------------
import basic.toolHandling
import utils.data_const as D
import basic.constants as B
import model.entity
class Connection(model.entity.Entity):
name = ""
description = ""
application = ""
usecase = []
story = []
tables = {}
steps = []
def __init__(self, job):
"""
to be initialized by readSpec
:param job:
"""
self.job = job
def get_schema(self, table=""):
dbtype = self.job.conf[B.TOPIC_NODE_DB][B.ATTR_TYPE]
dbi = basic.toolHandling.getDbTool(self.job, None, dbtype)
print(str(dbi))
sql = dbi.getCreateTable("connection")
sql += dbi.getSchemaAttribut("cnid", "id")+","
sql += dbi.getSchemaAttribut("environment", D.TYPE_STR)+","
sql += dbi.getSchemaAttribut("component", D.TYPE_STR)+","
sql += dbi.getSchemaAttribut("type", D.TYPE_STR)+","
sql += dbi.getSchemaAttribut("ip", D.TYPE_STR)+","
sql += dbi.getSchemaAttribut("port", D.TYPE_INT)+","
sql += dbi.getSchemaAttribut("hostname", D.TYPE_STR)+","
sql += dbi.getSchemaAttribut("dompath", D.TYPE_STR)+","
sql += dbi.getSchemaAttribut(B.NODE_ATTRIBUTES, D.TYPE_TEXT)+","
sql += self.getHistoryFields()
sql += ");\n"
sql += dbi.getSchemaIndex("connection", "environment") + "\n"
sql += self.getHistoryIndex("connection")
return sql
#dbi.execStatement(sql)