From c88205c5cea0e04d67b5604d130f22cc3c833c66 Mon Sep 17 00:00:00 2001 From: Frank Sachsenheim Date: Mon, 27 May 2019 22:07:24 +0200 Subject: [PATCH] Amends the docs concerning multiple label filters Closes #2338 Signed-off-by: Frank Sachsenheim --- docker/api/container.py | 3 ++- docker/api/image.py | 3 ++- docker/api/network.py | 3 ++- docker/models/containers.py | 3 ++- docker/models/images.py | 3 ++- docker/models/networks.py | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docker/api/container.py b/docker/api/container.py index 326e7679..45bd3528 100644 --- a/docker/api/container.py +++ b/docker/api/container.py @@ -174,7 +174,8 @@ class ContainerApiMixin(object): - `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 diff --git a/docker/api/image.py b/docker/api/image.py index b370b7d8..11c8cf75 100644 --- a/docker/api/image.py +++ b/docker/api/image.py @@ -70,7 +70,8 @@ class ImageApiMixin(object): 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. diff --git a/docker/api/network.py b/docker/api/network.py index c56a8d0b..750b91b2 100644 --- a/docker/api/network.py +++ b/docker/api/network.py @@ -15,7 +15,8 @@ class NetworkApiMixin(object): filters (dict): Filters to be processed on the network list. Available filters: - ``driver=[]`` Matches a network's driver. - - ``label=[]`` or ``label=[=]``. + - ``label=[]``, ``label=[=]`` or a list of + such. - ``type=["custom"|"builtin"]`` Filters networks by type. Returns: diff --git a/docker/models/containers.py b/docker/models/containers.py index 999851ec..d1f275f7 100644 --- a/docker/models/containers.py +++ b/docker/models/containers.py @@ -900,7 +900,8 @@ class ContainerCollection(Collection): - `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 diff --git a/docker/models/images.py b/docker/models/images.py index 54196829..757a5a47 100644 --- a/docker/models/images.py +++ b/docker/models/images.py @@ -350,7 +350,8 @@ class ImageCollection(Collection): 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. diff --git a/docker/models/networks.py b/docker/models/networks.py index be3291a4..f944c8e2 100644 --- a/docker/models/networks.py +++ b/docker/models/networks.py @@ -190,7 +190,8 @@ class NetworkCollection(Collection): filters (dict): Filters to be processed on the network list. Available filters: - ``driver=[]`` Matches a network's driver. - - ``label=[]`` or ``label=[=]``. + - `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.