rename `POST /volumes` to `POST /volumes/create`
| ... | ... |
@@ -195,7 +195,7 @@ func (cli *DockerCli) CmdVolumeCreate(args ...string) error {
|
| 195 | 195 |
volReq.Name = *flName |
| 196 | 196 |
} |
| 197 | 197 |
|
| 198 |
- resp, err := cli.call("POST", "/volumes", volReq, nil)
|
|
| 198 |
+ resp, err := cli.call("POST", "/volumes/create", volReq, nil)
|
|
| 199 | 199 |
if err != nil {
|
| 200 | 200 |
return err |
| 201 | 201 |
} |
| ... | ... |
@@ -141,7 +141,7 @@ func (r *router) initRoutes() {
|
| 141 | 141 |
NewPostRoute("/exec/{name:.*}/start", r.postContainerExecStart),
|
| 142 | 142 |
NewPostRoute("/exec/{name:.*}/resize", r.postContainerExecResize),
|
| 143 | 143 |
NewPostRoute("/containers/{name:.*}/rename", r.postContainerRename),
|
| 144 |
- NewPostRoute("/volumes", r.postVolumesCreate),
|
|
| 144 |
+ NewPostRoute("/volumes/create", r.postVolumesCreate),
|
|
| 145 | 145 |
// PUT |
| 146 | 146 |
NewPutRoute("/containers/{name:.*}/archive", r.putContainersArchive),
|
| 147 | 147 |
// DELETE |
| ... | ... |
@@ -304,7 +304,7 @@ type VolumesListResponse struct {
|
| 304 | 304 |
} |
| 305 | 305 |
|
| 306 | 306 |
// VolumeCreateRequest contains the response for the remote API: |
| 307 |
-// POST "/volumes" |
|
| 307 |
+// POST "/volumes/create" |
|
| 308 | 308 |
type VolumeCreateRequest struct {
|
| 309 | 309 |
Name string // Name is the requested name of the volume |
| 310 | 310 |
Driver string // Driver is the name of the driver that should be used to create the volume |
| ... | ... |
@@ -100,7 +100,7 @@ This section lists each version from latest to oldest. Each listing includes a |
| 100 | 100 |
[Docker Remote API v1.21](docker_remote_api_v1.21.md) documentation |
| 101 | 101 |
|
| 102 | 102 |
* `GET /volumes` lists volumes from all volume drivers. |
| 103 |
-* `POST /volumes` to create a volume. |
|
| 103 |
+* `POST /volumes/create` to create a volume. |
|
| 104 | 104 |
* `GET /volumes/(name)` get low-level information about a volume. |
| 105 | 105 |
* `DELETE /volumes/(name)`remove a volume with the specified name. |
| 106 | 106 |
* `VolumeDriver` has been moved from config to hostConfig to make the configuration portable. |
| ... | ... |
@@ -2428,13 +2428,13 @@ Status Codes: |
| 2428 | 2428 |
|
| 2429 | 2429 |
### Create a volume |
| 2430 | 2430 |
|
| 2431 |
-`POST /volumes` |
|
| 2431 |
+`POST /volumes/create` |
|
| 2432 | 2432 |
|
| 2433 | 2433 |
Create a volume |
| 2434 | 2434 |
|
| 2435 | 2435 |
**Example request**: |
| 2436 | 2436 |
|
| 2437 |
- POST /volumes HTTP/1.1 |
|
| 2437 |
+ POST /volumes/create HTTP/1.1 |
|
| 2438 | 2438 |
Content-Type: application/json |
| 2439 | 2439 |
|
| 2440 | 2440 |
{
|
| ... | ... |
@@ -2425,13 +2425,13 @@ Status Codes: |
| 2425 | 2425 |
|
| 2426 | 2426 |
### Create a volume |
| 2427 | 2427 |
|
| 2428 |
-`POST /volumes` |
|
| 2428 |
+`POST /volumes/create` |
|
| 2429 | 2429 |
|
| 2430 | 2430 |
Create a volume |
| 2431 | 2431 |
|
| 2432 | 2432 |
**Example request**: |
| 2433 | 2433 |
|
| 2434 |
- POST /volumes HTTP/1.1 |
|
| 2434 |
+ POST /volumes/create HTTP/1.1 |
|
| 2435 | 2435 |
Content-Type: application/json |
| 2436 | 2436 |
|
| 2437 | 2437 |
{
|
| ... | ... |
@@ -28,7 +28,7 @@ func (s *DockerSuite) TestVolumesApiCreate(c *check.C) {
|
| 28 | 28 |
config := types.VolumeCreateRequest{
|
| 29 | 29 |
Name: "test", |
| 30 | 30 |
} |
| 31 |
- status, b, err := sockRequest("POST", "/volumes", config)
|
|
| 31 |
+ status, b, err := sockRequest("POST", "/volumes/create", config)
|
|
| 32 | 32 |
c.Assert(err, check.IsNil) |
| 33 | 33 |
c.Assert(status, check.Equals, http.StatusCreated, check.Commentf(string(b))) |
| 34 | 34 |
|
| ... | ... |
@@ -68,7 +68,7 @@ func (s *DockerSuite) TestVolumesApiInspect(c *check.C) {
|
| 68 | 68 |
config := types.VolumeCreateRequest{
|
| 69 | 69 |
Name: "test", |
| 70 | 70 |
} |
| 71 |
- status, b, err := sockRequest("POST", "/volumes", config)
|
|
| 71 |
+ status, b, err := sockRequest("POST", "/volumes/create", config)
|
|
| 72 | 72 |
c.Assert(err, check.IsNil) |
| 73 | 73 |
c.Assert(status, check.Equals, http.StatusCreated, check.Commentf(string(b))) |
| 74 | 74 |
|