Merge "Implement container_list"
This commit is contained in:
commit
51d3cb88a6
|
@ -27,6 +27,7 @@ from magnum.api.controllers.v1 import collection
|
||||||
from magnum.api.controllers.v1 import types
|
from magnum.api.controllers.v1 import types
|
||||||
from magnum.api.controllers.v1 import utils as api_utils
|
from magnum.api.controllers.v1 import utils as api_utils
|
||||||
from magnum.common import exception
|
from magnum.common import exception
|
||||||
|
from magnum.conductor import api
|
||||||
from magnum import objects
|
from magnum import objects
|
||||||
|
|
||||||
|
|
||||||
|
@ -231,7 +232,8 @@ class ContainersController(rest.RestController):
|
||||||
marker_obj = objects.Container.get_by_uuid(pecan.request.context,
|
marker_obj = objects.Container.get_by_uuid(pecan.request.context,
|
||||||
marker)
|
marker)
|
||||||
|
|
||||||
containers = objects.Container.list(pecan.request.context, limit,
|
backend_api = api.API(context=pecan.request.context)
|
||||||
|
containers = backend_api.container_list(pecan.request.context, limit,
|
||||||
marker_obj, sort_key=sort_key,
|
marker_obj, sort_key=sort_key,
|
||||||
sort_dir=sort_dir)
|
sort_dir=sort_dir)
|
||||||
|
|
||||||
|
|
|
@ -92,8 +92,9 @@ class API(rpc_service.API):
|
||||||
def container_create(self, uuid, container):
|
def container_create(self, uuid, container):
|
||||||
return self._call('container_create', container=container)
|
return self._call('container_create', container=container)
|
||||||
|
|
||||||
def container_list(self):
|
def container_list(self, context, limit, marker, sort_key, sort_dir):
|
||||||
return self._call('container_list')
|
return objects.Container.list(context, limit, marker, sort_key,
|
||||||
|
sort_dir)
|
||||||
|
|
||||||
def container_delete(self, uuid):
|
def container_delete(self, uuid):
|
||||||
return self._call('container_delete', uuid=uuid)
|
return self._call('container_delete', uuid=uuid)
|
||||||
|
|
Loading…
Reference in New Issue