Address feedback on Plugin Reload: OSS Side (#9350)

* just use an error string

* Switch command to use new struct
This commit is contained in:
Scott Miller
2020-06-30 16:26:38 -05:00
committed by GitHub
parent 0be92206d7
commit 65dd5cfd27
4 changed files with 5 additions and 7 deletions

View File

@@ -273,8 +273,7 @@ func (c *Sys) ReloadPlugin(i *ReloadPluginInput) (string, error) {
// ReloadStatus is the status of an individual node's plugin reload
type ReloadStatus struct {
Timestamp time.Time `json:"timestamp" mapstructure:"timestamp"`
Success bool `json:"success" mapstructure:"success"`
Message string `json:"message" mapstructure:"message"`
Error string `json:"error" mapstructure:"error"`
}
// ReloadStatusResponse is the combined response of all known completed plugin reloads

View File

@@ -83,8 +83,8 @@ func (c *PluginReloadStatusCommand) Run(args []string) int {
out = append(out, fmt.Sprintf("%s | %s | %t | %s ",
s.Timestamp.Format("15:04:05"),
i,
s.Success,
s.Message))
s.Error == "",
s.Error))
}
c.UI.Output(tableOutput(out, nil))
return 0

2
go.mod
View File

@@ -84,7 +84,7 @@ require (
github.com/hashicorp/vault-plugin-secrets-kv v0.5.5
github.com/hashicorp/vault-plugin-secrets-mongodbatlas v0.1.2
github.com/hashicorp/vault-plugin-secrets-openldap v0.1.4-0.20200618161832-cae59ebde561
github.com/hashicorp/vault/api v1.0.5-0.20200630153159-69a37f1037b5
github.com/hashicorp/vault/api v1.0.5-0.20200630205458-1a16f3c699c6
github.com/hashicorp/vault/sdk v0.1.14-0.20200527182800-ad90e0b39d2f
github.com/influxdata/influxdb v0.0.0-20190411212539-d24b7ba8c4c4
github.com/jcmturner/gokrb5/v8 v8.0.0

View File

@@ -273,8 +273,7 @@ func (c *Sys) ReloadPlugin(i *ReloadPluginInput) (string, error) {
// ReloadStatus is the status of an individual node's plugin reload
type ReloadStatus struct {
Timestamp time.Time `json:"timestamp" mapstructure:"timestamp"`
Success bool `json:"success" mapstructure:"success"`
Message string `json:"message" mapstructure:"message"`
Error string `json:"error" mapstructure:"error"`
}
// ReloadStatusResponse is the combined response of all known completed plugin reloads