def get_frontend_routes(): # pragma: no cover endpoints_services = [ legacy_api.BuildBucketApi, config_api.ConfigApi, swarmbucket_api.SwarmbucketApi, ] routes = [ webapp2.Route(r'/_ah/start', DummyStartHandler), webapp2.Route(r'/', MainHandler), webapp2.Route(r'/b/<build_id:\d+>', BuildRPCHandler), webapp2.Route(r'/build/<build_id:\d+>', ViewBuildHandler), ] routes.extend(endpoints_webapp2.api_routes(endpoints_services)) # /api routes should be removed once clients are hitting /_ah/api. routes.extend( endpoints_webapp2.api_routes(endpoints_services, base_path='/api') ) prpc_server = prpc.Server() prpc_server.add_interceptor(auth.prpc_interceptor) if modules.get_current_module_name() == 'beefy': prpc_server.add_interceptor(_beefy_service_interceptor) prpc_server.add_service(access.AccessServicer()) prpc_server.add_service(api.BuildsApi()) routes += prpc_server.get_routes() return routes
def get_frontend_routes(): # pragma: no cover routes = [ webapp2.Route(r'/', MainHandler), webapp2.Route(r'/b/<build_id:\d+>', BuildHandler), endpoints_webapp2.discovery_service_route(), ] routes += endpoints_webapp2.api_routes(api.BuildBucketApi) routes += endpoints_webapp2.api_routes(swarmbucket_api.SwarmbucketApi) return routes
def get_routes(): return endpoints_webapp2.api_routes( [ SwarmingServerService, SwarmingTaskService, SwarmingTasksService, SwarmingQueuesService, SwarmingBotService, SwarmingBotsService, # components.config endpoints for validation and configuring of luci-config # service URL. config.ConfigApi ], base_path='/api')
def get_routes(): return endpoints_webapp2.api_routes(IsolateService)
def setUp(self): super(Webapp2EndpointsTestCase, self).setUp() self._app = webtest.TestApp(webapp2.WSGIApplication( endpoints_webapp2.api_routes(self.api_service_cls), debug=True), extra_environ={'REMOTE_ADDR': '127.0.0.1'})
def get_routes(): return endpoints_webapp2.api_routes([ config.ConfigApi, IsolateService, ], base_path='/api')
def get_routes(): return endpoints_webapp2.api_routes(config.ConfigApi)