Kaydet (Commit) fe6c9a64 authored tarafından Joffrey F's avatar Joffrey F Kaydeden (comit) Joffrey F

Style fixes. Copied docs to APIClient as well

Signed-off-by: 's avatarJoffrey F <joffrey@docker.com>
üst 34709689
...@@ -122,10 +122,13 @@ class ExecApiMixin(object): ...@@ -122,10 +122,13 @@ class ExecApiMixin(object):
Default: False Default: False
tty (bool): Allocate a pseudo-TTY. Default: False tty (bool): Allocate a pseudo-TTY. Default: False
stream (bool): Stream response data. Default: False stream (bool): Stream response data. Default: False
socket (bool): Return the connection socket to allow custom
read/write operations.
Returns: Returns:
(generator or str): If ``stream=True``, a generator yielding (generator or str): If ``stream=True``, a generator yielding
response chunks. A string containing response data otherwise. response chunks. If ``socket=True``, a socket object for the
connection. A string containing response data otherwise.
Raises: Raises:
:py:class:`docker.errors.APIError` :py:class:`docker.errors.APIError`
......
...@@ -142,7 +142,8 @@ class Container(Model): ...@@ -142,7 +142,8 @@ class Container(Model):
detach (bool): If true, detach from the exec command. detach (bool): If true, detach from the exec command.
Default: False Default: False
stream (bool): Stream response data. Default: False stream (bool): Stream response data. Default: False
socket (bool): Whether to return a socket object or not. Default: False socket (bool): Return the connection socket to allow custom
read/write operations. Default: False
environment (dict or list): A dictionary or a list of strings in environment (dict or list): A dictionary or a list of strings in
the following format ``["PASSWORD=xxx"]`` or the following format ``["PASSWORD=xxx"]`` or
``{"PASSWORD": "xxx"}``. ``{"PASSWORD": "xxx"}``.
...@@ -150,7 +151,7 @@ class Container(Model): ...@@ -150,7 +151,7 @@ class Container(Model):
Returns: Returns:
(generator or str): (generator or str):
If ``stream=True``, a generator yielding response chunks. If ``stream=True``, a generator yielding response chunks.
If ``socket=True``, a socket object of the connection (an SSL wrapped socket for TLS-based docker, on which one must call ``sendall`` and ``recv`` -- and **not** os.read / os.write). If ``socket=True``, a socket object for the connection.
A string containing response data otherwise. A string containing response data otherwise.
Raises: Raises:
:py:class:`docker.errors.APIError` :py:class:`docker.errors.APIError`
......
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