Remove unused 'detail' parameter

This parameter is not used in server. This patch removes it from
client side.

Change-Id: Iec5479bd8f6b72f13292e9de9c9001ea495ef3ad
This commit is contained in:
Hongbin Lu 2018-06-16 19:23:42 +00:00
parent faa9528401
commit 1118d8052a
8 changed files with 11 additions and 39 deletions

View File

@ -383,11 +383,10 @@ class ContainerManagerTest(testtools.TestCase):
def _test_containers_list_with_filters(self, limit=None, marker=None,
sort_key=None, sort_dir=None,
detail=False, expect=[]):
expect=[]):
containers_filter = self.mgr.list(limit=limit, marker=marker,
sort_key=sort_key,
sort_dir=sort_dir,
detail=detail)
sort_dir=sort_dir)
self.assertEqual(expect, self.api.calls)
self.assertThat(containers_filter, matchers.HasLength(2))

View File

@ -120,11 +120,10 @@ class ImageManagerTest(testtools.TestCase):
def _test_image_list_with_filters(
self, limit=None, marker=None,
sort_key=None, sort_dir=None,
detail=False, expect=[]):
expect=[]):
images_filter = self.mgr.list(limit=limit, marker=marker,
sort_key=sort_key,
sort_dir=sort_dir,
detail=detail)
sort_dir=sort_dir)
self.assertEqual(expect, self.api.calls)
self.assertThat(images_filter, matchers.HasLength(2))

View File

@ -101,11 +101,10 @@ class ServiceManagerTest(testtools.TestCase):
def _test_service_list_with_filters(
self, limit=None, marker=None,
sort_key=None, sort_dir=None,
detail=False, expect=[]):
expect=[]):
services_filter = self.mgr.list(limit=limit, marker=marker,
sort_key=sort_key,
sort_dir=sort_dir,
detail=detail)
sort_dir=sort_dir)
self.assertEqual(expect, self.api.calls)
self.assertThat(services_filter, matchers.HasLength(2))

View File

@ -53,7 +53,7 @@ class CapsuleManager(base.Manager):
return self._create(self._path(), new)
def list(self, marker=None, limit=None, sort_key=None,
sort_dir=None, detail=False, all_projects=False):
sort_dir=None, all_projects=False):
"""Retrieve a list of capsules.
:param all_projects: Optional, list containers in all projects
@ -75,9 +75,6 @@ class CapsuleManager(base.Manager):
:param sort_dir: Optional, direction of sorting, either 'asc' (the
default) or 'desc'.
:param detail: Optional, boolean whether to return detailed information
about containers.
:returns: A list of containers.
"""
@ -88,8 +85,6 @@ class CapsuleManager(base.Manager):
sort_dir, all_projects)
path = ''
if detail:
path += 'detail'
if filters:
path += '?' + '&'.join(filters)

View File

@ -44,7 +44,7 @@ class ContainerManager(base.Manager):
return '/v1/containers'
def list(self, marker=None, limit=None, sort_key=None,
sort_dir=None, detail=False, all_projects=False, **kwargs):
sort_dir=None, all_projects=False, **kwargs):
"""Retrieve a list of containers.
:param all_projects: Optional, list containers in all projects
@ -66,9 +66,6 @@ class ContainerManager(base.Manager):
:param sort_dir: Optional, direction of sorting, either 'asc' (the
default) or 'desc'.
:param detail: Optional, boolean whether to return detailed information
about containers.
:returns: A list of containers.
"""
@ -78,8 +75,6 @@ class ContainerManager(base.Manager):
filters = utils.common_filters(marker, limit, sort_key,
sort_dir, all_projects)
path = ''
if detail:
path += 'detail'
if filters:
path += '?' + '&'.join(filters)

View File

@ -31,7 +31,7 @@ class HostManager(base.Manager):
return '/v1/hosts/'
def list(self, marker=None, limit=None, sort_key=None,
sort_dir=None, detail=False):
sort_dir=None):
"""Retrieve a list of hosts.
:param marker: Optional, the UUID of an host, eg the last
@ -50,9 +50,6 @@ class HostManager(base.Manager):
:param sort_dir: Optional, direction of sorting, either 'asc' (the
default) or 'desc'.
:param detail: Optional, boolean whether to return detailed information
about hosts.
:returns: A list of hosts.
"""
@ -62,8 +59,6 @@ class HostManager(base.Manager):
filters = utils.common_filters(marker, limit, sort_key, sort_dir)
path = ''
if detail:
path += 'detail'
if filters:
path += '?' + '&'.join(filters)

View File

@ -36,7 +36,7 @@ class ImageManager(base.Manager):
return '/v1/images/'
def list(self, marker=None, limit=None, sort_key=None,
sort_dir=None, detail=False):
sort_dir=None):
"""Retrieve a list of images.
:param marker: Optional, the UUID of an image, eg the last
@ -55,9 +55,6 @@ class ImageManager(base.Manager):
:param sort_dir: Optional, direction of sorting, either 'asc' (the
default) or 'desc'.
:param detail: Optional, boolean whether to return detailed information
about images.
:returns: A list of images.
"""
@ -67,8 +64,6 @@ class ImageManager(base.Manager):
filters = utils.common_filters(marker, limit, sort_key, sort_dir)
path = ''
if detail:
path += 'detail'
if filters:
path += '?' + '&'.join(filters)

View File

@ -29,7 +29,7 @@ class ServiceManager(base.Manager):
return '/v1/services/%s' % id if id else '/v1/services'
def list(self, marker=None, limit=None, sort_key=None,
sort_dir=None, detail=False):
sort_dir=None):
"""Retrieve list of zun services.
:param marker: Optional, the ID of a zun service, eg the last
@ -49,9 +49,6 @@ class ServiceManager(base.Manager):
:param sort_dir: Optional, direction of sorting, either 'asc' (the
default) or 'desc'.
:param detail: Optional, boolean whether to return detailed information
about services.
:returns: A list of services.
"""
@ -61,8 +58,6 @@ class ServiceManager(base.Manager):
filters = utils.common_filters(marker, limit, sort_key, sort_dir)
path = ''
if detail:
path += 'detail'
if filters:
path += '?' + '&'.join(filters)