mirror of https://github.com/docker/docker-py.git
Allow to specify ps_args when listing processes
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
This commit is contained in:
parent
26e22bbd39
commit
2d4a71df2e
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -878,6 +878,7 @@ Display the running processes of a container.
|
|||
**Params**:
|
||||
|
||||
* container (str): The container to inspect
|
||||
* ps_args (str): An optional arguments passed to ps (e.g., aux)
|
||||
|
||||
**Returns** (str): The output of the top
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue