From: Tony Mack Date: Wed, 8 Jul 2009 18:23:26 +0000 (+0000) Subject: checking nuke.py back in under its new name X-Git-Tag: sfa-0.9-0@14641~103 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=30c38a64e486f8a79c7e0803f585a750c0bc74a4;p=sfa.git checking nuke.py back in under its new name --- diff --git a/sfa/plc/sfa-nuke-plc.py b/sfa/plc/sfa-nuke-plc.py new file mode 100755 index 00000000..e347f2b9 --- /dev/null +++ b/sfa/plc/sfa-nuke-plc.py @@ -0,0 +1,32 @@ +## +# Delete all the database records for Geni. This tool is used to clean out Geni +# records during testing. +# +# Authority info (maintained by the hierarchy module in a subdirectory tree) +# is not purged by this tool and may be deleted by a command like 'rm'. +## + +import getopt +import sys + +from sfa.trust.hierarchy import * +from sfa.util.record import * +from sfa.util.genitable import * +from sfa.util.config import * + +def process_options(): + global hrn + + (options, args) = getopt.getopt(sys.argv[1:], '', []) + for opt in options: + name = opt[0] + val = opt[1] + +def main(): + process_options() + + print "purging geni records from database" + geni_records_purge(get_default_dbinfo()) + +if __name__ == "__main__": + main()