Merge "Stop reinventing the is_public filter for Glance v1"
This commit is contained in:
commit
9dc5d9a554
@ -107,9 +107,8 @@ class GlanceV1Service(service.Service, glance_common.GlanceMixin):
|
||||
:param owner: Filter in images for tenant ID
|
||||
"""
|
||||
images = self._clients.glance("1").images.list(status=status,
|
||||
owner=owner)
|
||||
if is_public in [True, False]:
|
||||
return [i for i in images if i.is_public is is_public]
|
||||
owner=owner,
|
||||
is_public=is_public)
|
||||
return images
|
||||
|
||||
@atomic.action_timer("glance_v1.set_visibility")
|
||||
|
@ -117,7 +117,8 @@ class GlanceV1ServiceTestCase(test.TestCase):
|
||||
self.service.list_images(is_public=is_public, status=status,
|
||||
owner=owner)
|
||||
self.gc.images.list.assert_called_once_with(status=status,
|
||||
owner=owner)
|
||||
owner=owner,
|
||||
is_public=is_public)
|
||||
|
||||
def test_set_visibility(self):
|
||||
image_id = "image_id"
|
||||
|
Loading…
Reference in New Issue
Block a user