Skip to content

Commit

Permalink
Merge pull request #2352 from funkyfuture/container_list_docs
Browse files Browse the repository at this point in the history
Amends the docs concerning multiple label filters
  • Loading branch information
shin- committed Aug 27, 2019
2 parents 5660730 + 4b924db commit 912824e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docker/api/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def containers(self, quiet=False, all=False, trunc=False, latest=False,
- `exited` (int): Only containers with specified exit code
- `status` (str): One of ``restarting``, ``running``,
``paused``, ``exited``
- `label` (str): format either ``"key"`` or ``"key=value"``
- `label` (str|list): format either ``"key"``, ``"key=value"``
or a list of such.
- `id` (str): The id of the container.
- `name` (str): The name of the container.
- `ancestor` (str): Filter by container ancestor. Format of
Expand Down
3 changes: 2 additions & 1 deletion docker/api/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def images(self, name=None, quiet=False, all=False, filters=None):
filters (dict): Filters to be processed on the image list.
Available filters:
- ``dangling`` (bool)
- ``label`` (str): format either ``key`` or ``key=value``
- `label` (str|list): format either ``"key"``, ``"key=value"``
or a list of such.
Returns:
(dict or list): A list if ``quiet=True``, otherwise a dict.
Expand Down
3 changes: 2 additions & 1 deletion docker/api/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def networks(self, names=None, ids=None, filters=None):
filters (dict): Filters to be processed on the network list.
Available filters:
- ``driver=[<driver-name>]`` Matches a network's driver.
- ``label=[<key>]`` or ``label=[<key>=<value>]``.
- ``label=[<key>]``, ``label=[<key>=<value>]`` or a list of
such.
- ``type=["custom"|"builtin"]`` Filters networks by type.
Returns:
Expand Down
3 changes: 2 additions & 1 deletion docker/models/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,8 @@ def list(self, all=False, before=None, filters=None, limit=-1, since=None,
- `exited` (int): Only containers with specified exit code
- `status` (str): One of ``restarting``, ``running``,
``paused``, ``exited``
- `label` (str): format either ``"key"`` or ``"key=value"``
- `label` (str|list): format either ``"key"``, ``"key=value"``
or a list of such.
- `id` (str): The id of the container.
- `name` (str): The name of the container.
- `ancestor` (str): Filter by container ancestor. Format of
Expand Down
3 changes: 2 additions & 1 deletion docker/models/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ def list(self, name=None, all=False, filters=None):
filters (dict): Filters to be processed on the image list.
Available filters:
- ``dangling`` (bool)
- ``label`` (str): format either ``key`` or ``key=value``
- `label` (str|list): format either ``"key"``, ``"key=value"``
or a list of such.
Returns:
(list of :py:class:`Image`): The images.
Expand Down
3 changes: 2 additions & 1 deletion docker/models/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ def list(self, *args, **kwargs):
filters (dict): Filters to be processed on the network list.
Available filters:
- ``driver=[<driver-name>]`` Matches a network's driver.
- ``label=[<key>]`` or ``label=[<key>=<value>]``.
- `label` (str|list): format either ``"key"``, ``"key=value"``
or a list of such.
- ``type=["custom"|"builtin"]`` Filters networks by type.
greedy (bool): Fetch more details for each network individually.
You might want this to get the containers attached to them.
Expand Down

0 comments on commit 912824e

Please sign in to comment.