summaryrefslogtreecommitdiff
path: root/cinderclient
diff options
context:
space:
mode:
authorwanghao <sxmatch1986@gmail.com>2020-03-02 16:53:23 +0800
committerBrian Rosmaita <rosmaita.fossdev@gmail.com>2020-04-06 10:19:39 -0400
commit26a55de681c64410d0c22e4e579100f318dcc79e (patch)
treea02fa33df29ca6843b81126dab752949e7a41120 /cinderclient
parent7e8d5ca15a655f9d706c36e4bb3a7ede53f4b03e (diff)
downloadpython-cinderclient-26a55de681c64410d0c22e4e579100f318dcc79e.tar.gz
Add support for Block Storage API mv 3.60
Change I1f43c37c2266e43146637beadc027ccf6dec017e adds time-comparison filtering to the volume list calls (summary and detail) in the Block Storage API microversion 3.60. The current cinderclient filter support will pass these filters correctly, so the only change needed on the client side is to bump the MAX_VERSION so that the client can make calls to mv 3.60. Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com> Change-Id: Ib4b7cbc7e527c0524336e139e127f19accfb7568 Partially-Implements: bp support-to-query-cinder-resources-filter-by-time-comparison-operators
Diffstat (limited to 'cinderclient')
-rw-r--r--cinderclient/api_versions.py2
-rw-r--r--cinderclient/tests/unit/v3/test_shell.py18
2 files changed, 19 insertions, 1 deletions
diff --git a/cinderclient/api_versions.py b/cinderclient/api_versions.py
index 54d2fce..2d22199 100644
--- a/cinderclient/api_versions.py
+++ b/cinderclient/api_versions.py
@@ -29,7 +29,7 @@ LOG = logging.getLogger(__name__)
# key is a deprecated version and value is an alternative version.
DEPRECATED_VERSIONS = {"2": "3"}
DEPRECATED_VERSION = "2.0"
-MAX_VERSION = "3.59"
+MAX_VERSION = "3.60"
MIN_VERSION = "3.0"
_SUBSTITUTIONS = {}
diff --git a/cinderclient/tests/unit/v3/test_shell.py b/cinderclient/tests/unit/v3/test_shell.py
index 06c3d44..6a25238 100644
--- a/cinderclient/tests/unit/v3/test_shell.py
+++ b/cinderclient/tests/unit/v3/test_shell.py
@@ -149,6 +149,24 @@ class ShellTest(utils.TestCase):
u'list --filters name=abc --filters size=1',
'expected':
'/volumes/detail?name=abc&size=1'},
+ {'command':
+ u'list --filters created_at=lt:2020-01-15T00:00:00',
+ 'expected':
+ '/volumes/detail?created_at=lt%3A2020-01-15T00%3A00%3A00'},
+ {'command':
+ u'list --filters updated_at=gte:2020-02-01T00:00:00,'
+ u'lt:2020-03-01T00:00:00',
+ 'expected':
+ '/volumes/detail?updated_at=gte%3A2020-02-01T00%3A00%3A00%2C'
+ 'lt%3A2020-03-01T00%3A00%3A00'},
+ {'command':
+ u'list --filters updated_at=gte:2020-02-01T00:00:00,'
+ u'lt:2020-03-01T00:00:00 --filters created_at='
+ u'lt:2020-01-15T00:00:00',
+ 'expected':
+ '/volumes/detail?created_at=lt%3A2020-01-15T00%3A00%3A00'
+ '&updated_at=gte%3A2020-02-01T00%3A00%3A00%2C'
+ 'lt%3A2020-03-01T00%3A00%3A00'},
# testcases for list group
{'command':
'group-list --filters name=456',