diff options
| author | Cao Shufeng <caosf.fnst@cn.fujitsu.com> | 2016-08-19 02:26:04 -0400 |
|---|---|---|
| committer | Cao ShuFeng <caosf.fnst@cn.fujitsu.com> | 2016-09-12 08:47:23 +0000 |
| commit | cd9850b715e2f6fd46bacbe2d864387ce7a4e5f4 (patch) | |
| tree | 407f03b6aa3cd9c47ce2813977b8babf13bc5ba2 /cinderclient/v3/shell.py | |
| parent | ce2c1daee5bef64b5c932f4e0ee787694a6309f4 (diff) | |
| download | python-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.py | 2 |
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, |
