mirror of https://github.com/docker/docker-py.git
Fix docs for Service objects
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
87352cd057
commit
2b10c3773c
|
|
@ -42,7 +42,7 @@ class Service(Model):
|
|||
``label``, and ``desired-state``.
|
||||
|
||||
Returns:
|
||||
(:py:class:`list`): List of task dictionaries.
|
||||
:py:class:`list`: List of task dictionaries.
|
||||
|
||||
Raises:
|
||||
:py:class:`docker.errors.APIError`
|
||||
|
|
@ -103,7 +103,8 @@ class Service(Model):
|
|||
integer or ``'all'`` to output all log lines.
|
||||
Default: ``all``
|
||||
|
||||
Returns (generator): Logs for the service.
|
||||
Returns:
|
||||
generator: Logs for the service.
|
||||
"""
|
||||
is_tty = self.attrs['Spec']['TaskTemplate']['ContainerSpec'].get(
|
||||
'TTY', False
|
||||
|
|
@ -118,7 +119,7 @@ class Service(Model):
|
|||
replicas (int): The number of containers that should be running.
|
||||
|
||||
Returns:
|
||||
``True``if successful.
|
||||
bool: ``True`` if successful.
|
||||
"""
|
||||
|
||||
if 'Global' in self.attrs['Spec']['Mode'].keys():
|
||||
|
|
@ -134,7 +135,7 @@ class Service(Model):
|
|||
Force update the service even if no changes require it.
|
||||
|
||||
Returns:
|
||||
``True``if successful.
|
||||
bool: ``True`` if successful.
|
||||
"""
|
||||
|
||||
return self.update(force_update=True, fetch_current_spec=True)
|
||||
|
|
@ -206,7 +207,7 @@ class ServiceCollection(Collection):
|
|||
containers.
|
||||
|
||||
Returns:
|
||||
(:py:class:`Service`) The created service.
|
||||
:py:class:`Service`: The created service.
|
||||
|
||||
Raises:
|
||||
:py:class:`docker.errors.APIError`
|
||||
|
|
@ -228,7 +229,7 @@ class ServiceCollection(Collection):
|
|||
into the output.
|
||||
|
||||
Returns:
|
||||
(:py:class:`Service`): The service.
|
||||
:py:class:`Service`: The service.
|
||||
|
||||
Raises:
|
||||
:py:class:`docker.errors.NotFound`
|
||||
|
|
@ -253,7 +254,7 @@ class ServiceCollection(Collection):
|
|||
Default: ``None``.
|
||||
|
||||
Returns:
|
||||
(list of :py:class:`Service`): The services.
|
||||
list of :py:class:`Service`: The services.
|
||||
|
||||
Raises:
|
||||
:py:class:`docker.errors.APIError`
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@ Service objects
|
|||
The raw representation of this object from the server.
|
||||
|
||||
|
||||
.. automethod:: force_update
|
||||
.. automethod:: logs
|
||||
.. automethod:: reload
|
||||
.. automethod:: remove
|
||||
.. automethod:: scale
|
||||
.. automethod:: tasks
|
||||
.. automethod:: update
|
||||
|
|
|
|||
Loading…
Reference in New Issue