|
@@ -11,9 +11,8 @@ class MigrationController(object):
|
|
|
super(MigrationController, self).__init__()
|
|
super(MigrationController, self).__init__()
|
|
|
|
|
|
|
|
def show(self, req, id):
|
|
def show(self, req, id):
|
|
|
- return migration_view.format_migration(
|
|
|
|
|
- req, self._migration_api.get_migration(
|
|
|
|
|
- req.environ["coriolis.context"], id))
|
|
|
|
|
|
|
+ return migration_view.single(req, self._migration_api.get_migration(
|
|
|
|
|
+ req.environ["coriolis.context"], id))
|
|
|
|
|
|
|
|
def index(self, req):
|
|
def index(self, req):
|
|
|
return migration_view.collection(
|
|
return migration_view.collection(
|
|
@@ -49,8 +48,8 @@ class MigrationController(object):
|
|
|
|
|
|
|
|
def create(self, req, body):
|
|
def create(self, req, body):
|
|
|
origin, destination, instances = self._validate_create_body(body)
|
|
origin, destination, instances = self._validate_create_body(body)
|
|
|
- self._migration_api.start(
|
|
|
|
|
- req.environ['coriolis.context'], origin, destination, instances)
|
|
|
|
|
|
|
+ return migration_view.single(req, self._migration_api.start(
|
|
|
|
|
+ req.environ['coriolis.context'], origin, destination, instances))
|
|
|
|
|
|
|
|
def delete(self, req, id):
|
|
def delete(self, req, id):
|
|
|
self._migration_api.stop(req.environ['coriolis.context'], id)
|
|
self._migration_api.stop(req.environ['coriolis.context'], id)
|