Blame SOURCES/remote-inspection.patch

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