summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorJoffrey F <f.joffrey@gmail.com>2014-06-17 02:24:30 +0200
committerJoffrey F <f.joffrey@gmail.com>2014-06-17 02:24:30 +0200
commitfb11abc8c677992cded812e85f0e9da79d0cfaa7 (patch)
tree3e23e1db97ab9d481f6c730a4d44e1a0de138628 /docker
parent2aa0526a840cfc364077c9f26c87f98bac4721eb (diff)
parent9461035d49ce2e1c0c0320f03585bfb75132b12c (diff)
downloaddocker-py-fb11abc8c677992cded812e85f0e9da79d0cfaa7.tar.gz
Merge pull request #236 from rail44/feature-support-get-and-load-image
Support get and load image
Diffstat (limited to 'docker')
-rw-r--r--docker/client.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/docker/client.py b/docker/client.py
index fd075b8..b1c17f0 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -485,6 +485,12 @@ class Client(requests.Session):
self._raise_for_status(res)
return res.raw
+ def get_image(self, image):
+ res = self._get(self._url("/images/{0}/get".format(image)),
+ stream=True)
+ self._raise_for_status(res)
+ return res.raw
+
def history(self, image):
res = self._get(self._url("/images/{0}/history".format(image)))
self._raise_for_status(res)
@@ -571,6 +577,10 @@ class Client(requests.Session):
self._raise_for_status(res)
+ def load_image(self, data):
+ res = self._post(self._url("/images/load"), data=data)
+ self._raise_for_status(res)
+
def login(self, username, password=None, email=None, registry=None,
reauth=False):
# If we don't have any auth data so far, try reloading the config file