Example #1
0
    def setup(self):
        # load configuration
        fp = open(self._cfgfile, 'r')
        self.config = json.load(fp)
        fp.close()

        log.init(self.config)

        # broker service
        self.broker = MessageBroker(self.application, self.config)
        # fileserver service
        if self.config['server']['fileserver.enabled']:
            self.fileserver = Fileserver(self.application, self.config,
                                         self.broker)

        # monitor service
        if self.config['server']['monitor.enabled']:
            self.monitor = WebMonitor(self.application, self.config,
                                      self.broker)

        # endpoint service
        if self.config['server']['endpoint.enabled']:
            self.monitor = EndpointService(self.application, self.config,
                                           self.broker)

        return self.application
Example #2
0
    def setup(self):
        # load configuration
        fp = open(self._cfgfile, 'r')
        self.config = json.load(fp)
        fp.close()

        log.init(self.config)

        # fileserver service
        self.fileserver = Fileserver(self.application, self.config)

        return self.application
Example #3
0
    def setup(self):
        # load configuration
        fp = open(self._cfgfile, 'r')
        self.config = json.load(fp)
        fp.close()

        log.init(self.config)

        # broker service
        self.broker = MessageBroker(self.application, self.config)
        # fileserver service
        if self.config['server']['fileserver.enabled']:
            self.fileserver = Fileserver(self.application, self.config, self.broker)

        # monitor service
        if self.config['server']['monitor.enabled']:
            self.monitor = WebMonitor(self.application, self.config, self.broker)

        # endpoint service
        if self.config['server']['endpoint.enabled']:
            self.monitor = EndpointService(self.application, self.config, self.broker)

        return self.application