mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
rename POST /volumes
to POST /volumes/create
to be consistent with the other POST /.../create
endpoints
see #17132 Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
This commit is contained in:
parent
ab1f03397e
commit
0c95eeb584
7 changed files with 10 additions and 10 deletions
|
@ -195,7 +195,7 @@ func (cli *DockerCli) CmdVolumeCreate(args ...string) error {
|
||||||
volReq.Name = *flName
|
volReq.Name = *flName
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := cli.call("POST", "/volumes", volReq, nil)
|
resp, err := cli.call("POST", "/volumes/create", volReq, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ func (r *router) initRoutes() {
|
||||||
NewPostRoute("/exec/{name:.*}/start", r.postContainerExecStart),
|
NewPostRoute("/exec/{name:.*}/start", r.postContainerExecStart),
|
||||||
NewPostRoute("/exec/{name:.*}/resize", r.postContainerExecResize),
|
NewPostRoute("/exec/{name:.*}/resize", r.postContainerExecResize),
|
||||||
NewPostRoute("/containers/{name:.*}/rename", r.postContainerRename),
|
NewPostRoute("/containers/{name:.*}/rename", r.postContainerRename),
|
||||||
NewPostRoute("/volumes", r.postVolumesCreate),
|
NewPostRoute("/volumes/create", r.postVolumesCreate),
|
||||||
// PUT
|
// PUT
|
||||||
NewPutRoute("/containers/{name:.*}/archive", r.putContainersArchive),
|
NewPutRoute("/containers/{name:.*}/archive", r.putContainersArchive),
|
||||||
// DELETE
|
// DELETE
|
||||||
|
|
|
@ -304,7 +304,7 @@ type VolumesListResponse struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// VolumeCreateRequest contains the response for the remote API:
|
// VolumeCreateRequest contains the response for the remote API:
|
||||||
// POST "/volumes"
|
// POST "/volumes/create"
|
||||||
type VolumeCreateRequest struct {
|
type VolumeCreateRequest struct {
|
||||||
Name string // Name is the requested name of the volume
|
Name string // Name is the requested name of the volume
|
||||||
Driver string // Driver is the name of the driver that should be used to create the volume
|
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
|
||||||
[Docker Remote API v1.21](docker_remote_api_v1.21.md) documentation
|
[Docker Remote API v1.21](docker_remote_api_v1.21.md) documentation
|
||||||
|
|
||||||
* `GET /volumes` lists volumes from all volume drivers.
|
* `GET /volumes` lists volumes from all volume drivers.
|
||||||
* `POST /volumes` to create a volume.
|
* `POST /volumes/create` to create a volume.
|
||||||
* `GET /volumes/(name)` get low-level information about a volume.
|
* `GET /volumes/(name)` get low-level information about a volume.
|
||||||
* `DELETE /volumes/(name)`remove a volume with the specified name.
|
* `DELETE /volumes/(name)`remove a volume with the specified name.
|
||||||
* `VolumeDriver` has been moved from config to hostConfig to make the configuration portable.
|
* `VolumeDriver` has been moved from config to hostConfig to make the configuration portable.
|
||||||
|
|
|
@ -2428,13 +2428,13 @@ Status Codes:
|
||||||
|
|
||||||
### Create a volume
|
### Create a volume
|
||||||
|
|
||||||
`POST /volumes`
|
`POST /volumes/create`
|
||||||
|
|
||||||
Create a volume
|
Create a volume
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
POST /volumes HTTP/1.1
|
POST /volumes/create HTTP/1.1
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -2425,13 +2425,13 @@ Status Codes:
|
||||||
|
|
||||||
### Create a volume
|
### Create a volume
|
||||||
|
|
||||||
`POST /volumes`
|
`POST /volumes/create`
|
||||||
|
|
||||||
Create a volume
|
Create a volume
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
POST /volumes HTTP/1.1
|
POST /volumes/create HTTP/1.1
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ func (s *DockerSuite) TestVolumesApiCreate(c *check.C) {
|
||||||
config := types.VolumeCreateRequest{
|
config := types.VolumeCreateRequest{
|
||||||
Name: "test",
|
Name: "test",
|
||||||
}
|
}
|
||||||
status, b, err := sockRequest("POST", "/volumes", config)
|
status, b, err := sockRequest("POST", "/volumes/create", config)
|
||||||
c.Assert(err, check.IsNil)
|
c.Assert(err, check.IsNil)
|
||||||
c.Assert(status, check.Equals, http.StatusCreated, check.Commentf(string(b)))
|
c.Assert(status, check.Equals, http.StatusCreated, check.Commentf(string(b)))
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ func (s *DockerSuite) TestVolumesApiInspect(c *check.C) {
|
||||||
config := types.VolumeCreateRequest{
|
config := types.VolumeCreateRequest{
|
||||||
Name: "test",
|
Name: "test",
|
||||||
}
|
}
|
||||||
status, b, err := sockRequest("POST", "/volumes", config)
|
status, b, err := sockRequest("POST", "/volumes/create", config)
|
||||||
c.Assert(err, check.IsNil)
|
c.Assert(err, check.IsNil)
|
||||||
c.Assert(status, check.Equals, http.StatusCreated, check.Commentf(string(b)))
|
c.Assert(status, check.Equals, http.StatusCreated, check.Commentf(string(b)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue