def main(): try: config.parse_args() config.set_middleware_defaults() request_statistics.init_stats() policy.init() logging.setup(CONF, 'murano') workers = CONF.murano.api_workers if not workers: workers = processutils.get_worker_count() launcher = service.launch(CONF, server.ApiService(), workers=workers, restart_method='mutate') app = app_loader.load_paste_app('murano') port, host = (CONF.bind_port, CONF.bind_host) launcher.launch_service(wsgi.Service(app, port, host)) launcher.launch_service(server.NotificationService()) launcher.launch_service(stats.StatsCollectingService()) launcher.wait() except RuntimeError as e: sys.stderr.write("ERROR: %s\n" % e) sys.exit(1)
def main(): try: hybrid.patch() config.parse_args() config.set_middleware_defaults() request_statistics.init_stats() policy.init() logging.setup(CONF, 'murano') launcher = service.ServiceLauncher(CONF) app = app_loader.load_paste_app('murano') port, host = (CONF.bind_port, CONF.bind_host) launcher.launch_service(wsgi.Service(app, port, host)) launcher.launch_service(server.ApiService()) launcher.launch_service(server.NotificationService()) launcher.launch_service(stats.StatsCollectingService()) launcher.launch_service(scheduler.SchedulerService()) launcher.wait() except RuntimeError as e: sys.stderr.write("ERROR: %s\n" % e) sys.exit(1)
def __init__(self): super(StatsCollectingService, self).__init__() request_statistics.init_stats() self._hostname = socket.gethostname() self._stats_db = db_stats.Statistics() self._prev_time = time.time() self._notifier = status_reporter.Notification()
def __init__(self, *args, **kwargs): super(ControllerTest, self).__init__(*args, **kwargs) #cfg.CONF.set_default('host', 'server.test') self.api_version = '1.0' self.tenant = 'test_tenant' self.mock_policy_check = None request_statistics.init_stats()
def __init__(self, *args, **kwargs): super(ControllerTest, self).__init__(*args, **kwargs) # cfg.CONF.set_default('host', 'server.test') self.api_version = '1.0' self.tenant = 'test_tenant' self.mock_policy_check = None self.mapper = routes.Mapper() self.api = router.API(self.mapper) request_statistics.init_stats()
def __init__(self, *args, **kwargs): super(ControllerTest, self).__init__(*args, **kwargs) # cfg.CONF.set_default('host', 'server.test') self.api_version = "1.0" self.tenant = "test_tenant" self.mock_policy_check = None self.mapper = routes.Mapper() self.api = router.API(self.mapper) request_statistics.init_stats()
def init_application(): i18n.enable_lazy() LOG = logging.getLogger('murano.api') logging.register_options(cfg.CONF) cfg.CONF(project='murano') logging.setup(cfg.CONF, 'murano') config.set_middleware_defaults() request_statistics.init_stats() policy.init() port = cfg.CONF.bind_port host = cfg.CONF.bind_host LOG.info(_('Starting Murano REST API on %(host)s:%(port)s'), { 'host': host, 'port': port }) return app_loader.load_paste_app('murano')
def main(): try: config.parse_args() logging.setup(CONF, 'murano-cfapi') request_statistics.init_stats() policy.init() launcher = service.ServiceLauncher(CONF) cfapp = app_loader.load_paste_app('cloudfoundry') cfport, cfhost = (config.CONF.cfapi.bind_port, config.CONF.cfapi.bind_host) launcher.launch_service(wsgi.Service(cfapp, cfport, cfhost)) launcher.wait() except RuntimeError as e: sys.stderr.write("ERROR: %s\n" % e) sys.exit(1)
def main(): try: config.parse_args() log.setup('murano') request_statistics.init_stats() policy.init() launcher = service.ServiceLauncher() app = config.load_paste_app('murano') port, host = (config.CONF.bind_port, config.CONF.bind_host) launcher.launch_service(wsgi.Service(app, port, host)) launcher.launch_service(server.get_rpc_service()) launcher.launch_service(server.get_notification_service()) launcher.launch_service(stats.StatsCollectingService()) launcher.wait() except RuntimeError, e: sys.stderr.write("ERROR: %s\n" % e) sys.exit(1)
def main(): try: config.parse_args() log.setup('murano') request_statistics.init_stats() policy.init() launcher = service.ServiceLauncher() app = config.load_paste_app('murano') port, host = (config.CONF.bind_port, config.CONF.bind_host) launcher.launch_service(wsgi.Service(app, port, host)) launcher.launch_service(server.get_rpc_service()) launcher.launch_service(server.get_notification_service()) launcher.launch_service(stats.StatsCollectingService()) launcher.wait() except RuntimeError as e: sys.stderr.write("ERROR: %s\n" % e) sys.exit(1)
def init_application(): i18n.enable_lazy() LOG = logging.getLogger('murano.api') logging.register_options(cfg.CONF) # NOTE(hberaud): Call reset to ensure the ConfigOpts object doesn't # already contain registered options if the app is reloaded. cfg.CONF.reset() cfg.CONF(project='murano') logging.setup(cfg.CONF, 'murano') config.set_middleware_defaults() request_statistics.init_stats() policy.init() server.get_notification_listener().start() server.get_rpc_server().start() port = cfg.CONF.bind_port host = cfg.CONF.bind_host LOG.info(_('Starting Murano REST API on %(host)s:%(port)s'), {'host': host, 'port': port}) return app_loader.load_paste_app('murano')
def main(): try: config.parse_args() config.set_middleware_defaults() request_statistics.init_stats() policy.init() logging.setup(CONF, 'murano') launcher = service.ServiceLauncher(CONF) app = app_loader.load_paste_app('murano') port, host = (CONF.bind_port, CONF.bind_host) launcher.launch_service(wsgi.Service(app, port, host)) launcher.launch_service(server.ApiService()) launcher.launch_service(server.NotificationService()) launcher.launch_service(stats.StatsCollectingService()) launcher.wait() except RuntimeError as e: sys.stderr.write("ERROR: %s\n" % e) sys.exit(1)
def __init__(self): super(StatsCollectingService, self).__init__() request_statistics.init_stats() self._hostname = socket.gethostname() self._stats_db = db_stats.Statistics() self._prev_time = time.time()