-#!/usr/bin/python
+#!/usr/bin/env python2
# pylint: disable=c0111, c0103, w0402, w0622
from sfa.generic import Generic
from sfa.util.xrn import Xrn
+from sfa.util.sfalogging import logger, init_logger
+
from sfa.storage.record import Record
from sfa.trust.hierarchy import Hierarchy
pprinter = PrettyPrinter(indent=4)
+# if set, will output on stdout
+DEBUG = False
+
try:
help_basedir = Hierarchy().basedir
except Exception:
def import_registry(self):
"""Run the importer"""
+ if not DEBUG:
+ init_logger('import')
from sfa.importer import Importer
importer = Importer()
importer.run()
self.api.manager.Delete(self.api, [xrn], [], {})
-class SliceManagerCommands(AggregateCommands):
-
- def __init__(self, *args, **kwds):
- self.api = Generic.the_flavour().make_api(interface='slicemgr')
-
-
class SfaAdmin:
- CATEGORIES = {'certificate': CertCommands,
- 'registry': RegistryCommands,
- 'aggregate': AggregateCommands,
- 'slicemgr': SliceManagerCommands}
+ CATEGORIES = {
+ 'certificate': CertCommands,
+ 'registry': RegistryCommands,
+ 'aggregate': AggregateCommands,
+ }
# returns (name,class) or (None,None)
def find_category(self, input):