Added rest functionality to the v2 apis

Co-Authored-By: Digambar Patil <>
Co-Authored-By: Steven Dake <>

Change-Id: Ifafcbe09d65de2f31aa5f2cbfbfd76da5bf0f05a
digambar 2014-09-09 23:07:51 +05:30 committed by Davanum Srinivas (dims)
parent b49297b831
commit 227e1dd272
1 changed files with 2 additions and 18 deletions

View File

@ -1,22 +1,6 @@
from pecan import expose, redirect
from webob.exc import status_map
from api.controllers import v2
class RootController(object):
@expose(generic=True, template='index.html')
def index(self):
return dict()
def index_post(self, q):
redirect('' % q)
def error(self, status):
status = int(status)
except ValueError: # pragma: no cover
status = 500
message = getattr(status_map.get(status), 'explanation', '')
return dict(status=status, message=message)
v2 = v2.VersionController()