Blame SOURCES/remote-inspection.patch

8ef169
From 0b66aa1d60aa05518b69dbb0b96387b504ec79e7 Mon Sep 17 00:00:00 2001
8ef169
From: Dan Walsh <dwalsh@redhat.com>
8ef169
Date: Thu, 7 Jan 2016 13:11:32 -0500
8ef169
Subject: [PATCH] Remote inspect binding.
8ef169
8ef169
Signed-off-by: William Temple <wtemple@redhat.com>
8ef169
---
8ef169
 docker/api/image.py      | 9 +++++++--
8ef169
 tests/unit/image_test.py | 3 ++-
8ef169
 2 files changed, 9 insertions(+), 3 deletions(-)
8ef169
8ef169
diff --git a/docker/api/image.py b/docker/api/image.py
8ef169
index 8493b38..7de76e1 100644
8ef169
--- a/docker/api/image.py
8ef169
+++ b/docker/api/image.py
8ef169
@@ -138,9 +138,14 @@ class ImageApiMixin(object):
8ef169
         return self._result(self._post(api_url, params=params))
8ef169
 
8ef169
     @utils.check_resource
8ef169
-    def inspect_image(self, image):
8ef169
+    def inspect_image(self, image, remote=False):
8ef169
+        params = {}
8ef169
+        if remote:
8ef169
+            params['remote'] = 1
8ef169
         return self._result(
8ef169
-            self._get(self._url("/images/{0}/json", image)), True
8ef169
+            self._get(self._url("/images/{0}/json".format(image)),
8ef169
+                      params=params),
8ef169
+            True
8ef169
         )
8ef169
 
8ef169
     def load_image(self, data):
8ef169
diff --git a/tests/unit/image_test.py b/tests/unit/image_test.py
8ef169
index a46e48e..00256d2 100644
8ef169
--- a/tests/unit/image_test.py
8ef169
+++ b/tests/unit/image_test.py
8ef169
@@ -193,7 +193,8 @@ class ImageTest(DockerClientTest):
8ef169
         fake_request.assert_called_with(
8ef169
             'GET',
8ef169
             url_prefix + 'images/test_image/json',
8ef169
-            timeout=DEFAULT_TIMEOUT_SECONDS
8ef169
+            timeout=DEFAULT_TIMEOUT_SECONDS,
8ef169
+            params={}
8ef169
         )
8ef169
 
8ef169
     def test_inspect_image_undefined_id(self):
8ef169
-- 
8ef169
2.6.4
8ef169