-def set_geni_table_prefix(x):
- global GENI_TABLE_PREFIX
-
- GENI_TABLE_PREFIX = x
-
-def geni_records_purge(cninfo):
- global GENI_TABLE_PREFIX
-
- cnx = DB(cninfo['dbname'], cninfo['address'], port=cninfo['port'], user=cninfo['user'], passwd=cninfo['password'])
- tableList = cnx.get_tables()
- for table in tableList:
- if table.startswith(GENI_TABLE_PREFIX) or \
- table.startswith('public.' + GENI_TABLE_PREFIX) or \
- table.startswith('public."' + GENI_TABLE_PREFIX):
- report.trace("dropping table " + table)
- cnx.query("DROP TABLE " + table)
+ @staticmethod
+ def geni_records_purge(cninfo):
+
+ cnx = DB(cninfo['dbname'], cninfo['address'],
+ port=cninfo['port'], user=cninfo['user'], passwd=cninfo['password'])
+ tableList = cnx.get_tables()
+ for table in tableList:
+ if table.startswith(GeniTable.GENI_TABLE_PREFIX) or \
+ table.startswith('public.' + GeniTable.GENI_TABLE_PREFIX) or \
+ table.startswith('public."' + GeniTable.GENI_TABLE_PREFIX):
+ report.trace("dropping table " + table)
+ cnx.query("DROP TABLE " + table)