summaryrefslogtreecommitdiff
path: root/docker/api/container.py
diff options
context:
space:
mode:
authorPierre Fersing <pierre.fersing@bleemeo.com>2015-09-25 16:45:37 +0200
committerPierre Fersing <pierre.fersing@bleemeo.com>2015-09-25 16:58:27 +0200
commit2d4a71df2e7500e409c3a71134d9c0a77bce5215 (patch)
treee5f8fab1dd60b4b5f9fba53afe18890f3462a5ca /docker/api/container.py
parent26e22bbd391c9712db643d85087a5113d11c6c82 (diff)
downloaddocker-py-2d4a71df2e7500e409c3a71134d9c0a77bce5215.tar.gz
Allow to specify ps_args when listing processes
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
Diffstat (limited to 'docker/api/container.py')
-rw-r--r--docker/api/container.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/docker/api/container.py b/docker/api/container.py
index e7ddd73..f0d53c2 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -325,9 +325,12 @@ class ContainerApiMixin(object):
self._raise_for_status(res)
@utils.check_resource
- def top(self, container):
+ def top(self, container, ps_args=None):
u = self._url("/containers/{0}/top", container)
- return self._result(self._get(u), True)
+ params = {}
+ if ps_args is not None:
+ params['ps_args'] = ps_args
+ return self._result(self._get(u, params=params), True)
@utils.check_resource
def unpause(self, container):