diff options
author | Joffrey F <f.joffrey@gmail.com> | 2015-09-28 14:36:08 -0700 |
---|---|---|
committer | Joffrey F <f.joffrey@gmail.com> | 2015-09-28 14:36:08 -0700 |
commit | 7884ab9fe2c3b36209727821f81d322f2ade1b60 (patch) | |
tree | 3ed59c77fb5fb8e5272d54e3f136ade440cbd1d4 /docker/api/container.py | |
parent | f51ae4b3094df23ddcf88ca3c79f703f03cd3e97 (diff) | |
parent | c1577606bedbcfa4bde9ca153f4c6fe09b98674c (diff) | |
download | docker-py-7884ab9fe2c3b36209727821f81d322f2ade1b60.tar.gz |
Merge pull request #789 from PierreF/top_ps_args
Allow to specify ps_args when listing processes
Diffstat (limited to 'docker/api/container.py')
-rw-r--r-- | docker/api/container.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docker/api/container.py b/docker/api/container.py index f2d8a5b..94889e9 100644 --- a/docker/api/container.py +++ b/docker/api/container.py @@ -328,9 +328,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): |