Adds filter support to images.list().

This existed in glance.client, and should exist in the new
client as well! :-)

Change-Id: Iea8c55fcb0f0d30d6dc138072354c3f20d1288cf
This commit is contained in:
Gabriel Hurley
2012-04-12 16:35:36 -07:00
committed by Brian Waldon
parent 1f106a3bd9
commit 3344eac545
3 changed files with 9 additions and 1 deletions
+5
View File
@@ -32,6 +32,11 @@ class ImageManagerTest(unittest.TestCase):
expect = [('GET', '/v1/images/detail?marker=20', {}, None)]
self.assertEqual(self.api.calls, expect)
def test_list_with_filter(self):
self.mgr.list(filters={'name': "foo"})
expect = [('GET', '/v1/images/detail?name=foo', {}, None)]
self.assertEqual(self.api.calls, expect)
def test_get(self):
image = self.mgr.get('1')
expect = [('HEAD', '/v1/images/1', {}, None)]