diff --git a/cinderclient/tests/unit/v2/test_shell.py b/cinderclient/tests/unit/v2/test_shell.py index d7e556bac..3ed441cd5 100644 --- a/cinderclient/tests/unit/v2/test_shell.py +++ b/cinderclient/tests/unit/v2/test_shell.py @@ -505,6 +505,10 @@ class ShellTest(utils.TestCase): self.assert_called('GET', '/snapshots/detail?' 'status=available&volume_id=1234') + def test_snapshot_list_filter_name(self): + self.run_command('snapshot-list --name abc') + self.assert_called('GET', '/snapshots/detail?name=abc') + @mock.patch("cinderclient.utils.print_list") def test_snapshot_list_sort(self, mock_print_list): self.run_command('snapshot-list --sort id') diff --git a/cinderclient/v3/shell.py b/cinderclient/v3/shell.py index d0ed94c8e..9c456a6cf 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,