rename directory
[sfa.git] / plc / nuke.py
1 ##
2 # Delete all the database records for Geni. This tool is used to clean out Geni
3 # records during testing.
4 #
5 # Authority info (maintained by the hierarchy module in a subdirectory tree)
6 # is not purged by this tool and may be deleted by a command like 'rm'.
7 ##
8
9 import getopt
10 import sys
11
12 from hierarchy import *
13 from record import *
14 from genitable import *
15 from config import *
16
17 def process_options():
18    global hrn
19
20    (options, args) = getopt.getopt(sys.argv[1:], '', [])
21    for opt in options:
22        name = opt[0]
23        val = opt[1]
24
25 def main():
26     process_options()
27
28     print "purging geni records from database"
29     geni_records_purge(get_default_dbinfo())
30
31 if __name__ == "__main__":
32     main()