Skip to content

Commit

Permalink
remove support for the v1 REST API
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Aug 24, 2013
1 parent 291306f commit 4cbf3ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/test/unit/test_www_rest.py
Expand Up @@ -42,7 +42,7 @@ def test_versions(self):
rsrc = rest.RestRootResource(master)
self.assertEqual(sorted(rsrc.listNames()),
sorted([ 'latest' ] +
[ 'v%d' % v for v in range(1, self.maxVersion+1) ]))
[ 'v%d' % v for v in range(2, self.maxVersion+1) ]))

def test_versions_limited(self):
master = self.make_master(url='h:/a/b/')
Expand Down
10 changes: 0 additions & 10 deletions master/buildbot/www/rest.py
Expand Up @@ -27,8 +27,6 @@
from buildbot.data import base, resultspec
from buildbot.data import exceptions
from buildbot.util import json
from buildbot.status.web.status_json import JsonStatusResource

class BadRequest(Exception):
pass

Expand Down Expand Up @@ -70,13 +68,6 @@ def render(self, request):
return json.dumps(dict(api_versions=api_versions))


# API version 1 was the 0.8.x status_json.py API

class V1RootResource(JsonStatusResource):
def __init__(self, master):
self.master = master
JsonStatusResource.__init__(self,master.status)

URL_ENCODED = "application/x-www-form-urlencoded"
JSON_ENCODED = "application/json"
JSONRPC_CODES = dict(parse_error= -32700,
Expand Down Expand Up @@ -478,5 +469,4 @@ def _toJson(self, obj):
if isinstance(obj, base.Link):
return obj.makeUrl(self.base_url, self.apiVersion)

RestRootResource.addApiVersion(1, V1RootResource)
RestRootResource.addApiVersion(2, V2RootResource)
6 changes: 6 additions & 0 deletions master/docs/developer/www.rst
Expand Up @@ -65,6 +65,12 @@ It is also designed, in keeping with REST principles, to be discoverable.
As such, the details of the paths and resources are not documented here.
Begin at the root URL, and see the :ref:`Data_API` documentation for more information.

Versions
~~~~~~~~

The API described here is version 2.
The ad-hoc API from Buildbot-0.8.x, version 1, is no longer supported.

Getting
~~~~~~~

Expand Down

0 comments on commit 4cbf3ce

Please sign in to comment.