Skip to content

Commit c88205c

Browse files
funkyfuturechris-crone
authored andcommitted
Amends the docs concerning multiple label filters
Closes #2338 Signed-off-by: Frank Sachsenheim <[email protected]>
1 parent 63760b1 commit c88205c

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

docker/api/container.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def containers(self, quiet=False, all=False, trunc=False, latest=False,
174174
- `exited` (int): Only containers with specified exit code
175175
- `status` (str): One of ``restarting``, ``running``,
176176
``paused``, ``exited``
177-
- `label` (str): format either ``"key"`` or ``"key=value"``
177+
- `label` (str|list): format either ``"key"``, ``"key=value"``
178+
or a list of such.
178179
- `id` (str): The id of the container.
179180
- `name` (str): The name of the container.
180181
- `ancestor` (str): Filter by container ancestor. Format of

docker/api/image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def images(self, name=None, quiet=False, all=False, filters=None):
7070
filters (dict): Filters to be processed on the image list.
7171
Available filters:
7272
- ``dangling`` (bool)
73-
- ``label`` (str): format either ``key`` or ``key=value``
73+
- `label` (str|list): format either ``"key"``, ``"key=value"``
74+
or a list of such.
7475
7576
Returns:
7677
(dict or list): A list if ``quiet=True``, otherwise a dict.

docker/api/network.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ def networks(self, names=None, ids=None, filters=None):
1515
filters (dict): Filters to be processed on the network list.
1616
Available filters:
1717
- ``driver=[<driver-name>]`` Matches a network's driver.
18-
- ``label=[<key>]`` or ``label=[<key>=<value>]``.
18+
- ``label=[<key>]``, ``label=[<key>=<value>]`` or a list of
19+
such.
1920
- ``type=["custom"|"builtin"]`` Filters networks by type.
2021
2122
Returns:

docker/models/containers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,8 @@ def list(self, all=False, before=None, filters=None, limit=-1, since=None,
900900
- `exited` (int): Only containers with specified exit code
901901
- `status` (str): One of ``restarting``, ``running``,
902902
``paused``, ``exited``
903-
- `label` (str): format either ``"key"`` or ``"key=value"``
903+
- `label` (str|list): format either ``"key"``, ``"key=value"``
904+
or a list of such.
904905
- `id` (str): The id of the container.
905906
- `name` (str): The name of the container.
906907
- `ancestor` (str): Filter by container ancestor. Format of

docker/models/images.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ def list(self, name=None, all=False, filters=None):
350350
filters (dict): Filters to be processed on the image list.
351351
Available filters:
352352
- ``dangling`` (bool)
353-
- ``label`` (str): format either ``key`` or ``key=value``
353+
- `label` (str|list): format either ``"key"``, ``"key=value"``
354+
or a list of such.
354355
355356
Returns:
356357
(list of :py:class:`Image`): The images.

docker/models/networks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ def list(self, *args, **kwargs):
190190
filters (dict): Filters to be processed on the network list.
191191
Available filters:
192192
- ``driver=[<driver-name>]`` Matches a network's driver.
193-
- ``label=[<key>]`` or ``label=[<key>=<value>]``.
193+
- `label` (str|list): format either ``"key"``, ``"key=value"``
194+
or a list of such.
194195
- ``type=["custom"|"builtin"]`` Filters networks by type.
195196
greedy (bool): Fetch more details for each network individually.
196197
You might want this to get the containers attached to them.

0 commit comments

Comments
 (0)