Commit 5aee63bd by edems

Snapshots & Storages controller added

parent c167610b
from aiohttp import web
from implementation.storage.OpenstackSnapshotsManager import OpenstackSnapshotManager
class SnapshotsController:
snapshot_manager = None
@staticmethod
def init(app, openstack):
SnapshotsController.snapshot_manager = OpenstackSnapshotManager(openstack)
SnapshotsController.add_routes(app)
@staticmethod
def add_routes(app):
app.add_routes([
......@@ -18,6 +28,8 @@ class SnapshotsController:
@staticmethod
async def list(request):
snapshots = SnapshotsController.snapshot_manager.list()
return web.Response(text='List')
@staticmethod
......
from aiohttp import web
from implementation.storage.OpenstackStorageManager import OpenstackStorageManager
class StoragesController:
storage_manager = None
@staticmethod
def init(app, os):
StoragesController.storage_manager = OpenstackStorageManager(os)
StoragesController.add_routes(app)
@staticmethod
def add_routes(app):
app.add_routes([
......@@ -18,6 +28,10 @@ class StoragesController:
@staticmethod
async def list(request):
volumes = StoragesController.storage_manager.list()
print(volumes)
return web.Response(text='List')
@staticmethod
......
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