summaryrefslogtreecommitdiff
path: root/cinderclient/v2
diff options
context:
space:
mode:
Diffstat (limited to 'cinderclient/v2')
-rw-r--r--cinderclient/v2/shell.py20
-rw-r--r--cinderclient/v2/volumes.py8
2 files changed, 4 insertions, 24 deletions
diff --git a/cinderclient/v2/shell.py b/cinderclient/v2/shell.py
index 20c7bd6..b83175e 100644
--- a/cinderclient/v2/shell.py
+++ b/cinderclient/v2/shell.py
@@ -100,14 +100,6 @@ def _translate_attachments(info):
'Use the show command to see which fields are available. '
'Unavailable/non-existent fields will be ignored. '
'Default=None.')
-@utils.arg('--sort_key',
- metavar='<sort_key>',
- default=None,
- help=argparse.SUPPRESS)
-@utils.arg('--sort_dir',
- metavar='<sort_dir>',
- default=None,
- help=argparse.SUPPRESS)
@utils.arg('--sort',
metavar='<key>[:<direction>]',
default=None,
@@ -147,16 +139,8 @@ def do_list(cs, args):
for field_title in args.fields.split(','):
field_titles.append(field_title)
- # --sort_key and --sort_dir deprecated in kilo and is not supported
- # with --sort
- if args.sort and (args.sort_key or args.sort_dir):
- raise exceptions.CommandError(
- 'The --sort_key and --sort_dir arguments are deprecated and are '
- 'not supported with --sort.')
-
volumes = cs.volumes.list(search_opts=search_opts, marker=args.marker,
- limit=args.limit, sort_key=args.sort_key,
- sort_dir=args.sort_dir, sort=args.sort)
+ limit=args.limit, sort=args.sort)
shell_utils.translate_volume_keys(volumes)
# Create a list of servers to which the volume is attached
@@ -178,7 +162,7 @@ def do_list(cs, args):
if search_opts['all_tenants']:
key_list.insert(1, 'Tenant ID')
- if args.sort_key or args.sort_dir or args.sort:
+ if args.sort:
sortby_index = None
else:
sortby_index = 0
diff --git a/cinderclient/v2/volumes.py b/cinderclient/v2/volumes.py
index 3cc0d4a..4c380fb 100644
--- a/cinderclient/v2/volumes.py
+++ b/cinderclient/v2/volumes.py
@@ -281,7 +281,7 @@ class VolumeManager(base.ManagerWithFind):
return self._get("/volumes/%s" % volume_id, "volume")
def list(self, detailed=True, search_opts=None, marker=None, limit=None,
- sort_key=None, sort_dir=None, sort=None):
+ sort=None):
"""Lists all volumes.
:param detailed: Whether to return detailed volume info.
@@ -289,9 +289,6 @@ class VolumeManager(base.ManagerWithFind):
:param marker: Begin returning volumes that appear later in the volume
list than that represented by this volume id.
:param limit: Maximum number of volumes to return.
- :param sort_key: Key to be sorted; deprecated in kilo
- :param sort_dir: Sort direction, should be 'desc' or 'asc'; deprecated
- in kilo
:param sort: Sort information
:rtype: list of :class:`Volume`
"""
@@ -299,8 +296,7 @@ class VolumeManager(base.ManagerWithFind):
resource_type = "volumes"
url = self._build_list_url(resource_type, detailed=detailed,
search_opts=search_opts, marker=marker,
- limit=limit, sort_key=sort_key,
- sort_dir=sort_dir, sort=sort)
+ limit=limit, sort=sort)
return self._list(url, resource_type, limit=limit)
def delete(self, volume, cascade=False):