From da1f05d66de409294e535fbefb968ce040248e3e Mon Sep 17 00:00:00 2001 From: allencloud Date: Fri, 3 Feb 2017 16:34:45 +0800 Subject: [PATCH 1/2] add missing filter type and sort filter type in alphabets Signed-off-by: allencloud --- api/swagger.yaml | 51 ++++++++++++++-------------- docs/reference/commandline/events.md | 6 ++-- docs/reference/commandline/ps.md | 19 ++++++----- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 25f4d96da0b794d8e68ad86631bc5d28d077c6e6..456cc4f1fe2185067d3159bf531c03b4f95e0d52 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -2484,22 +2484,21 @@ paths: - name: "filters" in: "query" description: | - Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. + Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. Available filters: - Available filters: + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) - `exited=` containers with exit code of `` - - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - - `label=key` or `label="key=value"` of a container label - - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container's ID - - `name=` a container's name + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - `is-task=`(`true`|`false`) - - `ancestor`=(`[:]`, ``, or ``) - - `before`=(`` or ``) + - `label=key` or `label="key=value"` of a container label + - `name=` a container's name + - `network`=(`` or ``) - `since`=(`` or ``) + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) - - `network`=(`` or ``) - - `health`=(`starting`|`healthy`|`unhealthy`|`none`) type: "string" responses: 200: @@ -4305,14 +4304,13 @@ paths: - name: "filters" in: "query" description: | - A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. + A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - Available filters: + - `before`=(`[:]`, `` or ``) - `dangling=true` - `label=key` or `label="key=value"` of an image label - - `before`=(`[:]`, `` or ``) - - `since`=(`[:]`, `` or ``) - `reference`=(`[:]`) + - `since`=(`[:]`, `` or ``) type: "string" - name: "digests" in: "query" @@ -4894,9 +4892,9 @@ paths: description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - - `stars=` - `is-automated=(true|false)` - `is-official=(true|false)` + - `stars=` Matches images that has at least 'number' stars. type: "string" tags: ["Image"] /images/prune: @@ -4909,9 +4907,8 @@ paths: - name: "filters" in: "query" description: | - Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - Available filters: - `dangling=` When set to `true` (or `1`), prune only unused *and* untagged images. When set to `false` (or `0`), all unused images are pruned. @@ -5402,13 +5399,14 @@ paths: A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: - `container=` container name or ID + - `daemon=` daemon name or ID - `event=` event type - `image=` image name or ID - `label=` image or container label + - `network=` network name or ID + - `plugin`= plugin name or ID - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` - `volume=` volume name or ID - - `network=` network name or ID - - `daemon=` daemon name or ID type: "string" tags: ["System"] /system/df: @@ -5882,13 +5880,14 @@ paths: JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. Available filters: - - `name=` Matches all or part of a volume name. - `dangling=` When set to `true` (or `1`), returns all volumes that are not in use by a container. When set to `false` (or `0`), only volumes that are in use by one or more containers are returned. - - `driver=` Matches all or part of a volume - driver name. + - `driver=` Matches volumes based on their driver. + - `label=` or `label=:` Matches volumes based on + the presence of a `label` alone or a `label` and a value. + - `name=` Matches all or part of a volume name. type: "string" format: "json" tags: ["Volume"] @@ -7175,8 +7174,8 @@ paths: A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: - `id=` - - `name=` - `label=` + - `name=` tags: ["Service"] /services/create: post: @@ -7639,12 +7638,12 @@ paths: description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: + - `desired-state=(running | shutdown | accepted)` - `id=` + - `label=key` or `label="key=value"` - `name=` - - `service=` - `node=` - - `label=key` or `label="key=value"` - - `desired-state=(running | shutdown | accepted)` + - `service=` tags: ["Task"] /tasks/{id}: get: diff --git a/docs/reference/commandline/events.md b/docs/reference/commandline/events.md index baa966d62099666a4d6f5a195053a6c9d226732f..727413243b0e2db92f0391152f33939f69e9a468 100644 --- a/docs/reference/commandline/events.md +++ b/docs/reference/commandline/events.md @@ -82,14 +82,14 @@ container container 588a23dac085 *AND* the event type is *start* The currently supported filters are: * container (`container=`) +* daemon (`daemon=`) * event (`event=`) * image (`image=`) -* plugin (experimental) (`plugin=`) * label (`label=` or `label==`) +* network (`network=`) +* plugin (`plugin=`) * type (`type=`) * volume (`volume=`) -* network (`network=`) -* daemon (`daemon=`) ## Format diff --git a/docs/reference/commandline/ps.md b/docs/reference/commandline/ps.md index d162532d31e34686c40cf7198b965a28cabc19e2..b8c7356cf585a51de0379b51b2116aebea79eeae 100644 --- a/docs/reference/commandline/ps.md +++ b/docs/reference/commandline/ps.md @@ -23,19 +23,20 @@ List containers Options: -a, --all Show all containers (default shows just running) -f, --filter value Filter output based on conditions provided (default []) + - ancestor=([:tag]||) + containers created from an image or a descendant. + - before=(|) - exited= an exit code of + - health=(starting|healthy|unhealthy|none) + - id= a container's ID + - isolation=(`default`|`process`|`hyperv`) (Windows daemon only) + - is-task=(true|false) - label= or label== - - status=(created|restarting|removing|running|paused|exited) - name= a container's name - - id= a container's ID - - before=(|) + - network=(|) - since=(|) - - ancestor=([:tag]||) - containers created from an image or a descendant. - - publish=([/]|/[]) - - expose=([/]|/[]) - - is-task=(true|false) - - health=(starting|healthy|unhealthy|none) + - status=(created|restarting|removing|running|paused|exited) + - volume=(|) --format string Pretty-print containers using a Go template --help Print usage -n, --last int Show n last created containers (includes all states) (default -1) From 44bd658913647ddadc3c225233c08ee61ef3c5ed Mon Sep 17 00:00:00 2001 From: allencloud Date: Sat, 4 Feb 2017 14:28:14 +0800 Subject: [PATCH 2/2] add expose and publish filter in swagger.yml and CLI docs for docker/master Signed-off-by: allencloud --- api/swagger.yaml | 2 ++ docs/reference/commandline/ps.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/api/swagger.yaml b/api/swagger.yaml index 456cc4f1fe2185067d3159bf531c03b4f95e0d52..d60506446b1b1a8fb30bec722daf4d7590e13081 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -2488,6 +2488,7 @@ paths: - `ancestor`=(`[:]`, ``, or ``) - `before`=(`` or ``) + - `expose`=(`[/]`|`/[]`) - `exited=` containers with exit code of `` - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container's ID @@ -2496,6 +2497,7 @@ paths: - `label=key` or `label="key=value"` of a container label - `name=` a container's name - `network`=(`` or ``) + - `publish`=(`[/]`|`/[]`) - `since`=(`` or ``) - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) diff --git a/docs/reference/commandline/ps.md b/docs/reference/commandline/ps.md index b8c7356cf585a51de0379b51b2116aebea79eeae..ce234f6d7b8f3825acdfbe575bf62522d41f0c01 100644 --- a/docs/reference/commandline/ps.md +++ b/docs/reference/commandline/ps.md @@ -26,6 +26,7 @@ Options: - ancestor=([:tag]||) containers created from an image or a descendant. - before=(|) + - expose=([/]|/[]) - exited= an exit code of - health=(starting|healthy|unhealthy|none) - id= a container's ID @@ -34,6 +35,7 @@ Options: - label= or label== - name= a container's name - network=(|) + - publish=([/]|/[]) - since=(|) - status=(created|restarting|removing|running|paused|exited) - volume=(|)