Blob Blame History Raw
From 0b66aa1d60aa05518b69dbb0b96387b504ec79e7 Mon Sep 17 00:00:00 2001
From: Dan Walsh <dwalsh@redhat.com>
Date: Thu, 7 Jan 2016 13:11:32 -0500
Subject: [PATCH] Remote inspect binding.

Signed-off-by: William Temple <wtemple@redhat.com>
---
 docker/api/image.py      | 9 +++++++--
 tests/unit/image_test.py | 3 ++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/docker/api/image.py b/docker/api/image.py
index 8493b38..7de76e1 100644
--- a/docker/api/image.py
+++ b/docker/api/image.py
@@ -138,9 +138,14 @@ class ImageApiMixin(object):
         return self._result(self._post(api_url, params=params))
 
     @utils.check_resource
-    def inspect_image(self, image):
+    def inspect_image(self, image, remote=False):
+        params = {}
+        if remote:
+            params['remote'] = 1
         return self._result(
-            self._get(self._url("/images/{0}/json", image)), True
+            self._get(self._url("/images/{0}/json".format(image)),
+                      params=params),
+            True
         )
 
     def load_image(self, data):
diff --git a/tests/unit/image_test.py b/tests/unit/image_test.py
index a46e48e..00256d2 100644
--- a/tests/unit/image_test.py
+++ b/tests/unit/image_test.py
@@ -193,7 +193,8 @@ class ImageTest(DockerClientTest):
         fake_request.assert_called_with(
             'GET',
             url_prefix + 'images/test_image/json',
-            timeout=DEFAULT_TIMEOUT_SECONDS
+            timeout=DEFAULT_TIMEOUT_SECONDS,
+            params={}
         )
 
     def test_inspect_image_undefined_id(self):
-- 
2.6.4