Skip to content

Commit

Permalink
plugins/backend/reload -> plugins/reload/backend (#3186)
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai authored Aug 16, 2017
1 parent 527e234 commit 7c6e18d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion vault/logical_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion vault/logical_system_integ_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand All @@ -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
```
4 changes: 2 additions & 2 deletions website/source/layouts/api.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 7c6e18d

Please sign in to comment.