Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 9a1f7b6b0bba7bd28c5ae1fabef7ef267e5fbfbd)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
... | ... |
@@ -3962,8 +3962,9 @@ List nodes |
3962 | 3962 |
|
3963 | 3963 |
**Status codes**: |
3964 | 3964 |
|
3965 |
-- **200** – no error |
|
3966 |
-- **500** – server error |
|
3965 |
+- **200** – no error |
|
3966 |
+- **406** - node is not part of a swarm |
|
3967 |
+- **500** – server error |
|
3967 | 3968 |
|
3968 | 3969 |
#### Inspect a node |
3969 | 3970 |
|
... | ... |
@@ -4045,6 +4046,7 @@ Return low-level information on the node `id` |
4045 | 4045 |
|
4046 | 4046 |
- **200** – no error |
4047 | 4047 |
- **404** – no such node |
4048 |
+- **406** – node is not part of a swarm |
|
4048 | 4049 |
- **500** – server error |
4049 | 4050 |
|
4050 | 4051 |
#### Remove a node |
... | ... |
@@ -4073,6 +4075,7 @@ Remove a node from the swarm. |
4073 | 4073 |
|
4074 | 4074 |
- **200** – no error |
4075 | 4075 |
- **404** – no such node |
4076 |
+- **406** – node is not part of a swarm |
|
4076 | 4077 |
- **500** – server error |
4077 | 4078 |
|
4078 | 4079 |
#### Update a node |
... | ... |
@@ -4128,6 +4131,7 @@ JSON Parameters: |
4128 | 4128 |
|
4129 | 4129 |
- **200** – no error |
4130 | 4130 |
- **404** – no such node |
4131 |
+- **406** – node is not part of a swarm |
|
4131 | 4132 |
- **500** – server error |
4132 | 4133 |
|
4133 | 4134 |
### 3.8 Swarm |
... | ... |
@@ -4178,7 +4182,9 @@ Inspect swarm |
4178 | 4178 |
|
4179 | 4179 |
**Status codes**: |
4180 | 4180 |
|
4181 |
-- **200** - no error |
|
4181 |
+- **200** - no error |
|
4182 |
+- **406** – node is not part of a swarm |
|
4183 |
+- **500** - sever error |
|
4182 | 4184 |
|
4183 | 4185 |
#### Initialize a new swarm |
4184 | 4186 |
|
... | ... |
@@ -4216,9 +4222,10 @@ Initialize a new swarm. The body of the HTTP response includes the node ID. |
4216 | 4216 |
|
4217 | 4217 |
**Status codes**: |
4218 | 4218 |
|
4219 |
-- **200** – no error |
|
4220 |
-- **400** – bad parameter |
|
4221 |
-- **406** – node is already part of a swarm |
|
4219 |
+- **200** – no error |
|
4220 |
+- **400** – bad parameter |
|
4221 |
+- **406** – node is already part of a swarm |
|
4222 |
+- **500** - server error |
|
4222 | 4223 |
|
4223 | 4224 |
JSON Parameters: |
4224 | 4225 |
|
... | ... |
@@ -4282,9 +4289,10 @@ Join an existing swarm |
4282 | 4282 |
|
4283 | 4283 |
**Status codes**: |
4284 | 4284 |
|
4285 |
-- **200** – no error |
|
4286 |
-- **400** – bad parameter |
|
4287 |
-- **406** – node is already part of a swarm |
|
4285 |
+- **200** – no error |
|
4286 |
+- **400** – bad parameter |
|
4287 |
+- **406** – node is already part of a swarm |
|
4288 |
+- **500** - server error |
|
4288 | 4289 |
|
4289 | 4290 |
JSON Parameters: |
4290 | 4291 |
|
... | ... |
@@ -4321,8 +4329,9 @@ Leave a swarm |
4321 | 4321 |
|
4322 | 4322 |
**Status codes**: |
4323 | 4323 |
|
4324 |
-- **200** – no error |
|
4325 |
-- **406** – node is not part of a swarm |
|
4324 |
+- **200** – no error |
|
4325 |
+- **406** – node is not part of a swarm |
|
4326 |
+- **500** - server error |
|
4326 | 4327 |
|
4327 | 4328 |
#### Update a swarm |
4328 | 4329 |
|
... | ... |
@@ -4374,9 +4383,10 @@ Update a swarm |
4374 | 4374 |
|
4375 | 4375 |
**Status codes**: |
4376 | 4376 |
|
4377 |
-- **200** – no error |
|
4378 |
-- **400** – bad parameter |
|
4379 |
-- **406** – node is not part of a swarm |
|
4377 |
+- **200** – no error |
|
4378 |
+- **400** – bad parameter |
|
4379 |
+- **406** – node is not part of a swarm |
|
4380 |
+- **500** - server error |
|
4380 | 4381 |
|
4381 | 4382 |
JSON Parameters: |
4382 | 4383 |
|
... | ... |
@@ -4511,8 +4521,9 @@ List services |
4511 | 4511 |
|
4512 | 4512 |
**Status codes**: |
4513 | 4513 |
|
4514 |
-- **200** – no error |
|
4515 |
-- **500** – server error |
|
4514 |
+- **200** – no error |
|
4515 |
+- **406** – node is not part of a swarm |
|
4516 |
+- **500** – server error |
|
4516 | 4517 |
|
4517 | 4518 |
#### Create a service |
4518 | 4519 |
|
... | ... |
@@ -4606,9 +4617,10 @@ image](#create-an-image) section for more details. |
4606 | 4606 |
|
4607 | 4607 |
**Status codes**: |
4608 | 4608 |
|
4609 |
-- **201** – no error |
|
4610 |
-- **406** – server error or node is not part of a swarm |
|
4611 |
-- **409** – name conflicts with an existing object |
|
4609 |
+- **201** – no error |
|
4610 |
+- **406** – node is not part of a swarm |
|
4611 |
+- **409** – name conflicts with an existing object |
|
4612 |
+- **500** - server error |
|
4612 | 4613 |
|
4613 | 4614 |
**JSON Parameters**: |
4614 | 4615 |
|
... | ... |
@@ -4708,6 +4720,7 @@ Stop and remove the service `id` |
4708 | 4708 |
|
4709 | 4709 |
- **200** – no error |
4710 | 4710 |
- **404** – no such service |
4711 |
+- **406** - node is not part of a swarm |
|
4711 | 4712 |
- **500** – server error |
4712 | 4713 |
|
4713 | 4714 |
#### Inspect one or more services |
... | ... |
@@ -4797,6 +4810,7 @@ Return information on the service `id`. |
4797 | 4797 |
|
4798 | 4798 |
- **200** – no error |
4799 | 4799 |
- **404** – no such service |
4800 |
+- **406** - node is not part of a swarm |
|
4800 | 4801 |
- **500** – server error |
4801 | 4802 |
|
4802 | 4803 |
#### Update a service |
... | ... |
@@ -4930,6 +4944,7 @@ image](#create-an-image) section for more details. |
4930 | 4930 |
|
4931 | 4931 |
- **200** – no error |
4932 | 4932 |
- **404** – no such service |
4933 |
+- **406** - node is not part of a swarm |
|
4933 | 4934 |
- **500** – server error |
4934 | 4935 |
|
4935 | 4936 |
### 3.10 Tasks |
... | ... |
@@ -5131,15 +5146,16 @@ List tasks |
5131 | 5131 |
|
5132 | 5132 |
**Status codes**: |
5133 | 5133 |
|
5134 |
-- **200** – no error |
|
5135 |
-- **500** – server error |
|
5134 |
+- **200** – no error |
|
5135 |
+- **406** - node is not part of a swarm |
|
5136 |
+- **500** – server error |
|
5136 | 5137 |
|
5137 | 5138 |
#### Inspect a task |
5138 | 5139 |
|
5139 | 5140 |
|
5140 |
-`GET /tasks/(task id)` |
|
5141 |
+`GET /tasks/(id)` |
|
5141 | 5142 |
|
5142 |
-Get details on a task |
|
5143 |
+Get details on the task `id` |
|
5143 | 5144 |
|
5144 | 5145 |
**Example request**: |
5145 | 5146 |
|
... | ... |
@@ -5233,9 +5249,10 @@ Get details on a task |
5233 | 5233 |
|
5234 | 5234 |
**Status codes**: |
5235 | 5235 |
|
5236 |
-- **200** – no error |
|
5237 |
-- **404** – unknown task |
|
5238 |
-- **500** – server error |
|
5236 |
+- **200** – no error |
|
5237 |
+- **404** – unknown task |
|
5238 |
+- **406** - node is not part of a swarm |
|
5239 |
+- **500** – server error |
|
5239 | 5240 |
|
5240 | 5241 |
## 4. Going further |
5241 | 5242 |
|