Commit 6df75986 by edems

SnapshotsController added

parent 09143acf
from aiohttp import web
class SnapshotsController:
@staticmethod
def add_routes(app):
app.add_routes([
web.get('/snapshots', SnapshotsController.list),
web.post('/snapshots/create/{storage}', SnapshotsController.create),
web.get('/snapshots/{snapshot}', SnapshotsController.get),
web.delete('/snapshots/{snapshot}/delete', SnapshotsController.delete)
])
@staticmethod
async def create(request):
return web.Response(text='Create')
@staticmethod
async def list(request):
return web.Response(text='List')
@staticmethod
async def get(request):
return web.Response(text='Get')
@staticmethod
async def delete(request):
return web.Response(text='Delete')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment