From 30c38a64e486f8a79c7e0803f585a750c0bc74a4 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 8 Jul 2009 18:23:26 +0000 Subject: [PATCH] checking nuke.py back in under its new name --- sfa/plc/sfa-nuke-plc.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 sfa/plc/sfa-nuke-plc.py 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() -- 2.43.0