Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
infoserver
python-docker-py
remote-inspection.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File remote-inspection.patch of Package python-docker-py
From af6ea23b697ae2c520a255f302141d873db27844 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/api_image_test.py | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docker/api/image.py b/docker/api/image.py index c1ebc69..5dc6bb8 100644 --- a/docker/api/image.py +++ b/docker/api/image.py @@ -242,7 +242,7 @@ 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): """ Get detailed information about an image. Similar to the ``docker inspect`` command, but only for containers. @@ -258,8 +258,13 @@ class ImageApiMixin(object): :py:class:`docker.errors.APIError` If the server returns an error. """ + 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/api_image_test.py b/tests/unit/api_image_test.py index fbfb146..2f83681 100644 --- a/tests/unit/api_image_test.py +++ b/tests/unit/api_image_test.py @@ -195,7 +195,8 @@ class ImageTest(BaseAPIClientTest): 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.7.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor