示例#1
0
 def _test_api_workers(self, config_value, expected_passed_value):
     if config_value is not None:
         cfg.CONF.set_override('api_workers', config_value)
     with mock.patch('neutron.wsgi.Server') as mock_server:
         service.run_wsgi_app(mock.sentinel.app)
     start_call = mock_server.return_value.start.call_args
     expected_call = mock.call(
         mock.ANY, mock.ANY, mock.ANY, workers=expected_passed_value)
     self.assertEqual(expected_call, start_call)
示例#2
0
 def _test_api_workers(self, config_value, expected_passed_value):
     if config_value is not None:
         cfg.CONF.set_override('api_workers', config_value)
     with mock.patch('neutron.wsgi.Server') as mock_server:
         service.run_wsgi_app(mock.sentinel.app)
     start_call = mock_server.return_value.start.call_args
     expected_call = mock.call(
         mock.ANY, mock.ANY, mock.ANY, workers=expected_passed_value)
     self.assertEqual(expected_call, start_call)
示例#3
0
def pecan_wsgi_server():
    LOG.info(_LI("Pecan WSGI server starting..."))
    application = pecan_app.setup_app()
    neutron_api = service.run_wsgi_app(application)
    wsgi_eventlet.start_api_and_rpc_workers(neutron_api)