summaryrefslogtreecommitdiff
path: root/cinderclient/v3/shell.py
diff options
context:
space:
mode:
authorCao Shufeng <caosf.fnst@cn.fujitsu.com>2016-08-19 02:26:04 -0400
committerCao ShuFeng <caosf.fnst@cn.fujitsu.com>2016-09-12 08:47:23 +0000
commitcd9850b715e2f6fd46bacbe2d864387ce7a4e5f4 (patch)
tree407f03b6aa3cd9c47ce2813977b8babf13bc5ba2 /cinderclient/v3/shell.py
parentce2c1daee5bef64b5c932f4e0ee787694a6309f4 (diff)
downloadpython-cinderclient-cd9850b715e2f6fd46bacbe2d864387ce7a4e5f4.tar.gz
Parse filter item "name" correctly for snapshot-list
Cinderclient will parse filter item "name" to "display_name" when get snapshot list via v2/v3 api. This works for admin user. However for non-admin user, cinder-api[1] removes "display_name" as an invalid filter item and return the full snapshot list. This change use "name" as filter of snapshots rather than "display_name". [1]: https://github.com/openstack/cinder/blob/master/cinder/api/v2/snapshots.py#L87-#L93 Co-Authored-By: cheneydc <dongc@neunn.com> Change-Id: I63b6049a417293534079012dc6ee2a5b25e176be Closes-Bug: #1554538
Diffstat (limited to 'cinderclient/v3/shell.py')
-rw-r--r--cinderclient/v3/shell.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cinderclient/v3/shell.py b/cinderclient/v3/shell.py
index d0ed94c..9c456a6 100644
--- a/cinderclient/v3/shell.py
+++ b/cinderclient/v3/shell.py
@@ -732,7 +732,7 @@ def do_snapshot_list(cs, args):
search_opts = {
'all_tenants': all_tenants,
- 'display_name': args.name,
+ 'name': args.name,
'status': args.status,
'volume_id': args.volume_id,
'project_id': args.tenant,