@args('-a', '--all', dest='all', metavar='<all>', action='store_true', default=False,
help='Remove all registry records and all files in %s area' % Hierarchy().basedir)
@args('-a', '--all', dest='all', metavar='<all>', action='store_true', default=False,
help='Remove all registry records and all files in %s area' % Hierarchy().basedir)
# for convenience we re-create the schema here, so there's no need for an explicit
# service sfa restart
# however in some (upgrade) scenarios this might be wrong
# for convenience we re-create the schema here, so there's no need for an explicit
# service sfa restart
# however in some (upgrade) scenarios this might be wrong
logger.info("re-creating empty schema")
dbschema.init_or_upgrade()
# remove the server certificate and all gids found in /var/lib/sfa/authorities
logger.info("re-creating empty schema")
dbschema.init_or_upgrade()
# remove the server certificate and all gids found in /var/lib/sfa/authorities
logger.info("Purging cached certificates")
for (dir, _, files) in os.walk('/var/lib/sfa/authorities'):
for file in files:
logger.info("Purging cached certificates")
for (dir, _, files) in os.walk('/var/lib/sfa/authorities'):
for file in files:
logger.info("Purging registry filesystem cache")
preserved_files = [ 'server.key', 'server.cert']
for (dir,_,files) in os.walk(Hierarchy().basedir):
logger.info("Purging registry filesystem cache")
preserved_files = [ 'server.key', 'server.cert']
for (dir,_,files) in os.walk(Hierarchy().basedir):
- if hasattr(command_instance, '__call__'):
- action = ''
- command = command_instance.__call__
- else:
- print script_name + " category action [<args>]"
- print "Available actions for %s category:" % category
- for k in actions:
- print "\t%s" % k
- sys.exit(2)
# ensure options are valid
options = getattr(command, 'options', [])
# ensure options are valid
options = getattr(command, 'options', [])