blob: 96e66ed166822f7da0b12ab77f04e2cceead90a3 [file] [log] [blame]
Sanika Kulkarniff079b02020-07-08 15:55:36 -07001# -*- coding: utf-8 -*-
2# Copyright 2020 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6"""An cherry app to play as a fake Telemetry service.
7
8This is a short term solution in order to deprecation devserver.py from labs.
9"""
10from __future__ import absolute_import
11from __future__ import division
12from __future__ import print_function
13
14import cherrypy # pylint: disable=import-error
15
16
17def get_config():
18 """Get cherrypy config for this application."""
19 return {
20 '/': {
21 'request.dispatch': cherrypy.dispatch.MethodDispatcher(),
22 }
23 }
24
25
26@cherrypy.expose
27class FakeTelemetry(object):
28 """An application to handle fake telemetry requests."""
29 def GET(self, **kwargs):
30 """A URL handler for setting up telemetry."""
31 archive_url = kwargs.get('archive_url')
32 return 'Fake Telemetry: To be implemented. Archive URL: %s\n' % archive_url