aboutsummaryrefslogtreecommitdiff
path: root/contrib/python/podman/libs/images.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/python/podman/libs/images.py')
-rw-r--r--contrib/python/podman/libs/images.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/contrib/python/podman/libs/images.py b/contrib/python/podman/libs/images.py
index 1d40984a7..d6fd7946d 100644
--- a/contrib/python/podman/libs/images.py
+++ b/contrib/python/podman/libs/images.py
@@ -95,13 +95,6 @@ class Images(object):
results = podman.CreateImage()
return results['image']
- def create_from(self, *args, **kwargs):
- """Create image from container."""
- # TODO: Should this be on container?
- with self._client() as podman:
- results = podman.CreateFromContainer()
- return results['image']
-
def build(self, *args, **kwargs):
"""Build container from image.
@@ -135,3 +128,7 @@ class Images(object):
results = podman.SearchImage(id)
for img in results['images']:
yield img
+
+ def get(self, id):
+ """Get Image from id."""
+ return next((i for i in self.list() if i.id == id), None)