Browse code

add missing filter type and sort filter type in alphabets

Signed-off-by: allencloud <allen.sun@daocloud.io>

allencloud authored on 2017/02/03 17:34:45
Showing 3 changed files
... ...
@@ -2484,22 +2484,21 @@ paths:
2484 2484
         - name: "filters"
2485 2485
           in: "query"
2486 2486
           description: |
2487
-            Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers.
2487
+            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:
2488 2488
 
2489
-            Available filters:
2489
+            - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
2490
+            - `before`=(`<container id>` or `<container name>`)
2490 2491
             - `exited=<int>` containers with exit code of `<int>`
2491
-            - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
2492
-            - `label=key` or `label="key=value"` of a container label
2493
-            - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
2492
+            - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
2494 2493
             - `id=<ID>` a container's ID
2495
-            - `name=<name>` a container's name
2494
+            - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
2496 2495
             - `is-task=`(`true`|`false`)
2497
-            - `ancestor`=(`<image-name>[:<tag>]`, `<image id>`, or `<image@digest>`)
2498
-            - `before`=(`<container id>` or `<container name>`)
2496
+            - `label=key` or `label="key=value"` of a container label
2497
+            - `name=<name>` a container's name
2498
+            - `network`=(`<network id>` or `<network name>`)
2499 2499
             - `since`=(`<container id>` or `<container name>`)
2500
+            - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
2500 2501
             - `volume`=(`<volume name>` or `<mount point destination>`)
2501
-            - `network`=(`<network id>` or `<network name>`)
2502
-            - `health`=(`starting`|`healthy`|`unhealthy`|`none`)
2503 2502
           type: "string"
2504 2503
       responses:
2505 2504
         200:
... ...
@@ -4305,14 +4304,13 @@ paths:
4305 4305
         - name: "filters"
4306 4306
           in: "query"
4307 4307
           description: |
4308
-            A JSON encoded value of the filters (a `map[string][]string`) to process on the images list.
4308
+            A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
4309 4309
 
4310
-            Available filters:
4310
+            - `before`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
4311 4311
             - `dangling=true`
4312 4312
             - `label=key` or `label="key=value"` of an image label
4313
-            - `before`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
4314
-            - `since`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
4315 4313
             - `reference`=(`<image-name>[:<tag>]`)
4314
+            - `since`=(`<image-name>[:<tag>]`,  `<image id>` or `<image@digest>`)
4316 4315
           type: "string"
4317 4316
         - name: "digests"
4318 4317
           in: "query"
... ...
@@ -4894,9 +4892,9 @@ paths:
4894 4894
           description: |
4895 4895
             A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:
4896 4896
 
4897
-            - `stars=<number>`
4898 4897
             - `is-automated=(true|false)`
4899 4898
             - `is-official=(true|false)`
4899
+            - `stars=<number>` Matches images that has at least 'number' stars.
4900 4900
           type: "string"
4901 4901
       tags: ["Image"]
4902 4902
   /images/prune:
... ...
@@ -4909,9 +4907,8 @@ paths:
4909 4909
         - name: "filters"
4910 4910
           in: "query"
4911 4911
           description: |
4912
-            Filters to process on the prune list, encoded as JSON (a `map[string][]string`).
4912
+            Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters:
4913 4913
 
4914
-            Available filters:
4915 4914
             - `dangling=<boolean>` When set to `true` (or `1`), prune only
4916 4915
                unused *and* untagged images. When set to `false`
4917 4916
                (or `0`), all unused images are pruned.
... ...
@@ -5402,13 +5399,14 @@ paths:
5402 5402
             A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters:
5403 5403
 
5404 5404
             - `container=<string>` container name or ID
5405
+            - `daemon=<string>` daemon name or ID
5405 5406
             - `event=<string>` event type
5406 5407
             - `image=<string>` image name or ID
5407 5408
             - `label=<string>` image or container label
5409
+            - `network=<string>` network name or ID
5410
+            - `plugin`=<string> plugin name or ID
5408 5411
             - `type=<string>` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon`
5409 5412
             - `volume=<string>` volume name or ID
5410
-            - `network=<string>` network name or ID
5411
-            - `daemon=<string>` daemon name or ID
5412 5413
           type: "string"
5413 5414
       tags: ["System"]
5414 5415
   /system/df:
... ...
@@ -5882,13 +5880,14 @@ paths:
5882 5882
             JSON encoded value of the filters (a `map[string][]string`) to
5883 5883
             process on the volumes list. Available filters:
5884 5884
 
5885
-            - `name=<volume-name>` Matches all or part of a volume name.
5886 5885
             - `dangling=<boolean>` When set to `true` (or `1`), returns all
5887 5886
                volumes that are not in use by a container. When set to `false`
5888 5887
                (or `0`), only volumes that are in use by one or more
5889 5888
                containers are returned.
5890
-            - `driver=<volume-driver-name>` Matches all or part of a volume
5891
-              driver name.
5889
+            - `driver=<volume-driver-name>` Matches volumes based on their driver.
5890
+            - `label=<key>` or `label=<key>:<value>` Matches volumes based on
5891
+               the presence of a `label` alone or a `label` and a value.
5892
+            - `name=<volume-name>` Matches all or part of a volume name.
5892 5893
           type: "string"
5893 5894
           format: "json"
5894 5895
       tags: ["Volume"]
... ...
@@ -7175,8 +7174,8 @@ paths:
7175 7175
             A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters:
7176 7176
 
7177 7177
             - `id=<service id>`
7178
-            - `name=<service name>`
7179 7178
             - `label=<service label>`
7179
+            - `name=<service name>`
7180 7180
       tags: ["Service"]
7181 7181
   /services/create:
7182 7182
     post:
... ...
@@ -7639,12 +7638,12 @@ paths:
7639 7639
           description: |
7640 7640
             A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters:
7641 7641
 
7642
+            - `desired-state=(running | shutdown | accepted)`
7642 7643
             - `id=<task id>`
7644
+            - `label=key` or `label="key=value"`
7643 7645
             - `name=<task name>`
7644
-            - `service=<service name>`
7645 7646
             - `node=<node id or name>`
7646
-            - `label=key` or `label="key=value"`
7647
-            - `desired-state=(running | shutdown | accepted)`
7647
+            - `service=<service name>`
7648 7648
       tags: ["Task"]
7649 7649
   /tasks/{id}:
7650 7650
     get:
... ...
@@ -82,14 +82,14 @@ container container 588a23dac085 *AND* the event type is *start*
82 82
 The currently supported filters are:
83 83
 
84 84
 * container (`container=<name or id>`)
85
+* daemon (`daemon=<name or id>`)
85 86
 * event (`event=<event action>`)
86 87
 * image (`image=<tag or id>`)
87
-* plugin (experimental) (`plugin=<name or id>`)
88 88
 * label (`label=<key>` or `label=<key>=<value>`)
89
+* network (`network=<name or id>`)
90
+* plugin (`plugin=<name or id>`)
89 91
 * type (`type=<container or image or volume or network or daemon>`)
90 92
 * volume (`volume=<name or id>`)
91
-* network (`network=<name or id>`)
92
-* daemon (`daemon=<name or id>`)
93 93
 
94 94
 ## Format
95 95
 
... ...
@@ -23,19 +23,20 @@ List containers
23 23
 Options:
24 24
   -a, --all             Show all containers (default shows just running)
25 25
   -f, --filter value    Filter output based on conditions provided (default [])
26
+                        - ancestor=(<image-name>[:tag]|<image-id>|<image@digest>)
27
+                          containers created from an image or a descendant.
28
+                        - before=(<container-name>|<container-id>)
26 29
                         - exited=<int> an exit code of <int>
30
+                        - health=(starting|healthy|unhealthy|none)
31
+                        - id=<ID> a container's ID
32
+                        - isolation=(`default`|`process`|`hyperv`) (Windows daemon only)
33
+                        - is-task=(true|false)
27 34
                         - label=<key> or label=<key>=<value>
28
-                        - status=(created|restarting|removing|running|paused|exited)
29 35
                         - name=<string> a container's name
30
-                        - id=<ID> a container's ID
31
-                        - before=(<container-name>|<container-id>)
36
+                        - network=(<network-id>|<network-name>)
32 37
                         - since=(<container-name>|<container-id>)
33
-                        - ancestor=(<image-name>[:tag]|<image-id>|<image@digest>)
34
-                          containers created from an image or a descendant.
35
-                        - publish=(<port>[/<proto>]|<startport-endport>/[<proto>])
36
-                        - expose=(<port>[/<proto>]|<startport-endport>/[<proto>])
37
-                        - is-task=(true|false)
38
-                        - health=(starting|healthy|unhealthy|none)
38
+                        - status=(created|restarting|removing|running|paused|exited) 
39
+                        - volume=(<volume name>|<mount point destination>)
39 40
       --format string   Pretty-print containers using a Go template
40 41
       --help            Print usage
41 42
   -n, --last int        Show n last created containers (includes all states) (default -1)