devserver: Deprecate hostinfo API
This API is not used anywhere, deprecate it.
BUG=chromium:872441
TEST=devserver_integration_test.py
TEST=./devserver.py
Change-Id: I4df936350f74584090efd6ee243456ec3e6a39ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/1828166
Commit-Queue: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: David Haddock <dhaddock@chromium.org>
diff --git a/devserver.py b/devserver.py
index de1ec56..bb89bff 100755
--- a/devserver.py
+++ b/devserver.py
@@ -541,27 +541,6 @@
exposed = True
@cherrypy.expose
- def hostinfo(self, ip):
- """Returns a JSON dictionary containing information about the given ip.
-
- Args:
- ip: address of host whose info is requested
-
- Returns:
- A JSON dictionary containing all or some of the following fields:
- last_event_type (int): last update event type received
- last_event_status (int): last update event status received
- last_known_version (string): last known version reported in update ping
- See the OmahaEvent class in update_engine/omaha_request_action.h for
- event type and status code definitions. If the ip does not exist an empty
- string is returned.
-
- Example URL:
- http://myhost/api/hostinfo?ip=192.168.1.5
- """
- return updater.HandleHostInfoPing(ip)
-
- @cherrypy.expose
def hostlog(self, ip):
"""Returns a JSON object containing a log of host event.
@@ -569,9 +548,14 @@
ip: address of host whose event log is requested, or `all'
Returns:
- A JSON encoded list (log) of dictionaries (events), each of which
- containing a `timestamp' and other event fields, as described under
- /api/hostinfo.
+ A JSON dictionary containing all or some of the following fields:
+ last_event_type (int): last update event type received
+ last_event_status (int): last update event status received
+ last_known_version (string): last known version reported in update ping
+ timestamp: The timestamp the event was received.
+ See the OmahaEvent class in update_engine/omaha_request_action.h for
+ event type and status code definitions. If the ip does not exist an empty
+ string is returned.
Example URL:
http://myhost/api/hostlog?ip=192.168.1.5