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