Пример #1
0
    def __init__(self, core):
        Statistics.__init__(self, core)
        PullSource.__init__(self)
        Threaded.__init__(self)

        self.whoami = platform.node()
        self.transport = None

        if not HAS_SOUTH:
            msg = "Django south is required for Reporting"
            self.logger.error(msg)
            raise PluginInitError(msg)
Пример #2
0
    def __init__(self, core, datastore):
        Statistics.__init__(self, core, datastore)
        PullSource.__init__(self)
        Threaded.__init__(self)
        Debuggable.__init__(self)

        self.whoami = platform.node()
        self.transport = None

        core.setup.update(REPORTING_COMMON_OPTIONS)
        core.setup.reparse()

        if not HAS_SOUTH:
            msg = "Django south is required for Reporting"
            self.logger.error(msg)
            raise PluginInitError(msg)
Пример #3
0
    def __init__(self, core, datastore):
        Statistics.__init__(self, core, datastore)
        PullSource.__init__(self)
        Threaded.__init__(self)
        Debuggable.__init__(self)

        self.whoami = platform.node()
        self.transport = None

        core.setup.update(REPORTING_COMMON_OPTIONS)
        core.setup.reparse()

        if not HAS_SOUTH:
            msg = "Django south is required for Reporting"
            self.logger.error(msg)
            raise PluginInitError(msg)
Пример #4
0
    def __init__(self, core):
        Statistics.__init__(self, core)
        PullSource.__init__(self)
        Threaded.__init__(self)

        self.whoami = platform.node()
        self.transport = None

        if not HAS_SOUTH:
            msg = "Django south is required for Reporting"
            self.logger.error(msg)
            raise PluginInitError(msg)

        # This must be loaded here for bcfg2-admin
        try:
            self.transport = Bcfg2.Options.setup.reporting_transport()
        except TransportError:
            raise PluginInitError("%s: Failed to instantiate transport: %s" %
                                  (self.name, sys.exc_info()[1]))
        if self.debug_flag:
            self.transport.set_debug(self.debug_flag)
Пример #5
0
    def __init__(self, core, datastore):
        Statistics.__init__(self, core, datastore)
        PullSource.__init__(self)
        self.core = core

        self.whoami = platform.node()
        self.transport = None

        core.setup.update(REPORTING_COMMON_OPTIONS)
        core.setup.reparse()

        if not HAS_SOUTH:
            msg = "Django south is required for Reporting"
            self.logger.error(msg)
            raise PluginInitError(msg)

        try:
            self.transport = load_transport_from_config(core.setup)
        except TransportError:
            msg = "%s: Failed to load transport: %s" % \
                (self.name, traceback.format_exc().splitlines()[-1])
            self.logger.error(msg)
            raise PluginInitError(msg)
Пример #6
0
    def __init__(self, core, datastore):
        Statistics.__init__(self, core, datastore)
        PullSource.__init__(self)
        self.core = core
        self.experimental = True

        self.whoami = platform.node()
        self.transport = None

        core.setup.update(REPORTING_COMMON_OPTIONS)
        core.setup.reparse()

        if not HAS_SOUTH:
            msg = "Django south is required for Reporting"
            self.logger.error(msg)
            raise PluginInitError(msg)

        try:
            self.transport = load_transport_from_config(core.setup)
        except TransportError:
            msg = "%s: Failed to load transport: %s" % \
                (self.name, traceback.format_exc().splitlines()[-1])
            self.logger.error(msg)
            raise PluginInitError(msg)
Пример #7
0
 def set_debug(self, debug):
     rv = Statistics.set_debug(self, debug)
     if self.transport is not None:
         self.transport.set_debug(debug)
     return rv