plugins/backend/reload -> plugins/reload/backend (#3186)

This commit is contained in:
Jeff Mitchell 2017-08-16 12:40:38 -04:00 committed by GitHub
parent ae75e39c44
commit 411419cbf8
5 changed files with 14 additions and 14 deletions

View File

@ -22,7 +22,7 @@ FEATURES:
narrowly scope the set of domains for which a CA can issue or sign child
certificates.
* **Plugin Backend Reload Endpoint**: Plugin backends can now be triggered to
reload using the `sys/plugins/backend/reload` endpoint and providing either
reload using the `sys/plugins/reload/backend` endpoint and providing either
the plugin name or the mounts to reload.
* **Self-Reloading Plugins**: The plugin system will now attempt to reload a
crashed or stopped plugin, once per request.

View File

@ -830,7 +830,7 @@ func NewSystemBackend(core *Core) *SystemBackend {
HelpDescription: strings.TrimSpace(sysHelp["plugin-catalog"][1]),
},
&framework.Path{
Pattern: "plugins/backend/reload$",
Pattern: "plugins/reload/backend$",
Fields: map[string]*framework.FieldSchema{
"plugin": &framework.FieldSchema{

View File

@ -98,7 +98,7 @@ func testSystemBackend_PluginReload(t *testing.T, reqData map[string]interface{}
}
// Perform plugin reload
resp, err := client.Logical().Write("sys/plugins/backend/reload", reqData)
resp, err := client.Logical().Write("sys/plugins/reload/backend", reqData)
if err != nil {
t.Fatalf("err: %v", err)
}

View File

@ -1,14 +1,14 @@
---
layout: "api"
page_title: "/sys/plugins/backend/reload - HTTP API"
sidebar_current: "docs-http-system-plugins-backend-reload"
page_title: "/sys/plugins/reload/backend - HTTP API"
sidebar_current: "docs-http-system-plugins-reload-backend"
description: |-
The `/sys/plugins/backend/reload` endpoint is used to reload plugin backends.
The `/sys/plugins/reload/backend` endpoint is used to reload plugin backends.
---
# `/sys/plugins/backend/reload`
# `/sys/plugins/reload/backend`
The `/sys/plugins/backend/reload` endpoint is used to reload mounted plugin
The `/sys/plugins/reload/backend` endpoint is used to reload mounted plugin
backends. Either the plugin name (`plugin`) or the desired plugin backend mounts
(`mounts`) must be provided, but not both. In the case that the plugin name is
provided, all mounted paths that use that plugin backend will be reloaded.
@ -19,14 +19,14 @@ This endpoint reloads mounted plugin backends.
| Method | Path - | Produces |
| :------- | :---------------------------- | :--------------------- |
| `PUT` | `/sys/plugins/backend/reload` | `204 (empty body)` |
| `PUT` | `/sys/plugins/reload/backend` | `204 (empty body)` |
### Parameters
- `plugin` `(string: "")`  The name of the plugin to reload, as
registered in the plugin catalog.
- `mounts` `(slice: [])`  Array or comma separated string mount paths
- `mounts` `(slice: [])`  Array or comma-separated string mount paths
of the plugin backends to reload.
### Sample Payload
@ -43,5 +43,5 @@ This endpoint reloads mounted plugin backends.
$ curl \
--header "X-Vault-Token: ..." \
--request PUT
https://vault.rocks/v1/sys/plugins/backend/reload
```
https://vault.rocks/v1/sys/plugins/reload/backend
```

View File

@ -199,8 +199,8 @@
<li<%= sidebar_current("docs-http-system-mounts") %>>
<a href="/api/system/mounts.html"><tt>/sys/mounts</tt></a>
</li>
<li<%= sidebar_current("docs-http-system-plugins-backend-reload") %>>
<a href="/api/system/plugins-backend-reload.html"><tt>/sys/plugins/backend/reload</tt></a>
<li<%= sidebar_current("docs-http-system-plugins-reload-backend") %>>
<a href="/api/system/plugins-reload-backend.html"><tt>/sys/plugins/reload/backend</tt></a>
</li>
<li<%= sidebar_current("docs-http-system-plugins-catalog") %>>
<a href="/api/system/plugins-catalog.html"><tt>/sys/plugins/catalog</tt></a>