def main(): utils.read_config('designate', sys.argv) logging.setup('designate') server = sink_service.Service() service.serve(server, workers=CONF['service:sink'].workers) service.wait()
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') utils.setup_gmr(log_dir=cfg.CONF.log_dir) server = sink_service.Service() service.serve(server, workers=CONF['service:sink'].workers) service.wait()
def setUp(self): super(TestSinkService, self).setUp() self.stdlog = fixtures.StandardLogging() self.useFixture(self.stdlog) self.CONF.set_override('enabled_notification_handlers', ['fake'], 'service:sink') self.service = service.Service()
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') gmr.TextGuruMeditation.setup_autorun(version) hookpoints.log_hook_setup() server = sink_service.Service(threads=CONF['service:sink'].threads) service.serve(server, workers=CONF['service:sink'].workers) service.wait()
def test_notification_without_handler(self): CONF.set_override('enabled_notification_handlers', [], 'service:sink') self.service = service.Service() event_type = 'compute.instance.create.end' fixture = self.get_notification_fixture('nova', event_type) self.service.info(self.context, None, event_type, fixture['payload'], None) self.assertIn('No designate-sink handlers enabled or loaded', self.stdlog.logger.output)
def setUp(self): super(TestSinkNotification, self).setUp() self.stdlog = fixtures.StandardLogging() self.useFixture(self.stdlog) CONF.set_override('enabled_notification_handlers', [fake.FakeHandler.__plugin_name__], 'service:sink') CONF.set_override('allowed_event_types', ['compute.instance.create.end'], 'handler:fake') self.context = mock.Mock() self.service = service.Service()
def main(): utils.read_config('designate', sys.argv) logging.setup(CONF, 'designate') gmr.TextGuruMeditation.setup_autorun(version) hookpoints.log_hook_setup() server = sink_service.Service() heartbeat = service.Heartbeat(server.service_name, server.tg) service.serve(server, workers=CONF['service:sink'].workers) heartbeat.start() service.wait()
def main(): utils.read_config('designate', sys.argv) logging.setup('designate') launcher = service.launch(sink_service.Service(), CONF['service:sink'].workers) launcher.wait()
def get_sink_service(self): return sink_service.Service()