Kaydet (Commit) 2d4a71df authored tarafından Pierre Fersing's avatar Pierre Fersing

Allow to specify ps_args when listing processes

Signed-off-by: 's avatarPierre Fersing <pierre.fersing@bleemeo.com>
üst 26e22bbd
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment