Kami commented on a change in pull request #1478:
URL: https://github.com/apache/libcloud/pull/1478#discussion_r464069826
##########
File path: libcloud/container/drivers/lxd.py
##########
@@ -971,6 +1073,25 @@ def list_images(self):
images.append(self.ex_get_image(fingerprint=fingerprint))
return images
+ def ex_has_image(self, alias):
+ """
+ Helper function. Returns true is the image with the
+ given alias exits on the host
+
+ :param alias: the image alias
+ :type alias: ``str``
+
+ :rtype: boolean
+ """
+
+ # get all the images existing on the host
+ images = self.list_images()
+
+ for img in images:
Review comment:
I assume there is no more efficient way of doing that (aka filter on the
server side) and we need to do late filtering locally?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]