summaryrefslogtreecommitdiff
path: root/cinderclient/tests
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-05-20 06:05:13 +0000
committerGerrit Code Review <review@openstack.org>2018-05-20 06:05:13 +0000
commit3f6aa2a64835c9984b744d9f9f9127fabb9cdd59 (patch)
tree310ff55a44529ddd162d8729521911f6bbd54519 /cinderclient/tests
parenta45faf0f47111023c78f70843fe3e9ac912add43 (diff)
parent5a1513244caf7acbd41e181419bc8b62bf4bcaba (diff)
downloadpython-cinderclient-3f6aa2a64835c9984b744d9f9f9127fabb9cdd59.tar.gz
Merge "Support availability-zone in volume type"
Diffstat (limited to 'cinderclient/tests')
-rw-r--r--cinderclient/tests/unit/v3/test_shell.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/cinderclient/tests/unit/v3/test_shell.py b/cinderclient/tests/unit/v3/test_shell.py
index 84ca4cb..cff2145 100644
--- a/cinderclient/tests/unit/v3/test_shell.py
+++ b/cinderclient/tests/unit/v3/test_shell.py
@@ -244,6 +244,20 @@ class ShellTest(utils.TestCase):
self.run_command,
'list --group_id fake_id')
+ def test_type_list_with_filters_invalid(self):
+ self.assertRaises(exceptions.UnsupportedAttribute,
+ self.run_command,
+ '--os-volume-api-version 3.51 type-list '
+ '--filters key=value')
+
+ def test_type_list_with_filters(self):
+ self.run_command('--os-volume-api-version 3.52 type-list '
+ '--filters extra_specs={key:value}')
+ self.assert_called(
+ 'GET', '/types?%s' % parse.urlencode(
+ {'extra_specs':
+ {six.text_type('key'): six.text_type('value')}}))
+
@ddt.data("3.10", "3.11")
def test_list_with_group_id_after_3_10(self, version):
command = ('--os-volume-api-version %s list --group_id fake_id' %