api: update mount API

This commit is contained in:
Mitchell Hashimoto
2015-03-11 22:34:44 -07:00
parent acb4a9211b
commit 019f9ae5b9
2 changed files with 2 additions and 4 deletions

View File

@@ -311,6 +311,7 @@ Lists all the active mount points.
}
}
## Single Mount [/sys/mounts/{path}]
### New Mount [POST]
Mount a logical backend to a new path.
@@ -321,14 +322,12 @@ read/write mechanism once it is mounted.
+ Request (application/json)
{
"path": "aws-eu",
"type": "aws",
"description": "EU AWS tokens"
}
+ Response 204
## Single Mount [/sys/mounts/{path}]
### Unmount [DELETE]
Unmount a mount point.

View File

@@ -23,12 +23,11 @@ func (c *Sys) Mount(path, mountType, description string) error {
}
body := map[string]string{
"path": path,
"type": mountType,
"description": description,
}
r := c.c.NewRequest("POST", "/sys/mounts")
r := c.c.NewRequest("POST", fmt.Sprintf("/sys/mounts/%s", path))
if err := r.SetJSONBody(body); err != nil {
return err
}