mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-03 03:58:01 +00:00
Change next major release of Vault to 0.11 or later to make it less scary
This commit is contained in:
@@ -68,8 +68,8 @@ func (c *AuthCommand) Run(args []string) int {
|
|||||||
case strings.HasPrefix(arg, "-methods"):
|
case strings.HasPrefix(arg, "-methods"):
|
||||||
c.UI.Warn(wrapAtLength(
|
c.UI.Warn(wrapAtLength(
|
||||||
"WARNING! The -methods flag is deprecated. Please use "+
|
"WARNING! The -methods flag is deprecated. Please use "+
|
||||||
"\"vault auth list\" instead. This flag will be removed in the "+
|
"\"vault auth list\" instead. This flag will be removed in "+
|
||||||
"next major release of Vault.") + "\n")
|
"Vault 0.11 (or later).") + "\n")
|
||||||
return (&AuthListCommand{
|
return (&AuthListCommand{
|
||||||
BaseCommand: &BaseCommand{
|
BaseCommand: &BaseCommand{
|
||||||
UI: c.UI,
|
UI: c.UI,
|
||||||
@@ -79,8 +79,8 @@ func (c *AuthCommand) Run(args []string) int {
|
|||||||
case strings.HasPrefix(arg, "-method-help"):
|
case strings.HasPrefix(arg, "-method-help"):
|
||||||
c.UI.Warn(wrapAtLength(
|
c.UI.Warn(wrapAtLength(
|
||||||
"WARNING! The -method-help flag is deprecated. Please use "+
|
"WARNING! The -method-help flag is deprecated. Please use "+
|
||||||
"\"vault auth help\" instead. This flag will be removed in the "+
|
"\"vault auth help\" instead. This flag will be removed in "+
|
||||||
"next major release of Vault.") + "\n")
|
"Vault 0.11 (or later).") + "\n")
|
||||||
// Parse the args to pull out the method, surpressing any errors because
|
// Parse the args to pull out the method, surpressing any errors because
|
||||||
// there could be other flags that we don't care about.
|
// there could be other flags that we don't care about.
|
||||||
f := flag.NewFlagSet("", flag.ContinueOnError)
|
f := flag.NewFlagSet("", flag.ContinueOnError)
|
||||||
@@ -103,10 +103,9 @@ func (c *AuthCommand) Run(args []string) int {
|
|||||||
// passed directly to the new "vault login" command.
|
// passed directly to the new "vault login" command.
|
||||||
c.UI.Warn(wrapAtLength(
|
c.UI.Warn(wrapAtLength(
|
||||||
"WARNING! The \"vault auth ARG\" command is deprecated and is now a "+
|
"WARNING! The \"vault auth ARG\" command is deprecated and is now a "+
|
||||||
"subcommand for interacting with auth methods. To "+
|
"subcommand for interacting with auth methods. To authenticate "+
|
||||||
"authenticate locally to Vault, use \"vault login\" instead. This "+
|
"locally to Vault, use \"vault login\" instead. This backwards "+
|
||||||
"backwards compatability will be removed in the next major release of "+
|
"compatability will be removed in Vault 0.11 (or later).") + "\n")
|
||||||
"Vault.") + "\n")
|
|
||||||
return (&LoginCommand{
|
return (&LoginCommand{
|
||||||
BaseCommand: &BaseCommand{
|
BaseCommand: &BaseCommand{
|
||||||
UI: c.UI,
|
UI: c.UI,
|
||||||
|
|||||||
@@ -88,8 +88,7 @@ func (c *DeprecatedCommand) Run(args []string) int {
|
|||||||
func (c *DeprecatedCommand) warn() {
|
func (c *DeprecatedCommand) warn() {
|
||||||
c.UI.Warn(wrapAtLength(fmt.Sprintf(
|
c.UI.Warn(wrapAtLength(fmt.Sprintf(
|
||||||
"WARNING! The \"vault %s\" command is deprecated. Please use \"vault %s\" "+
|
"WARNING! The \"vault %s\" command is deprecated. Please use \"vault %s\" "+
|
||||||
"instead. This command will be removed in the next major release of "+
|
"instead. This command will be removed in Vault 0.11 (or later).",
|
||||||
"Vault.",
|
|
||||||
c.Old,
|
c.Old,
|
||||||
c.New)))
|
c.New)))
|
||||||
c.UI.Warn("")
|
c.UI.Warn("")
|
||||||
|
|||||||
@@ -247,14 +247,13 @@ func (c *OperatorInitCommand) Run(args []string) int {
|
|||||||
// TODO: remove in 0.9.0
|
// TODO: remove in 0.9.0
|
||||||
if c.flagAuto {
|
if c.flagAuto {
|
||||||
c.UI.Warn(wrapAtLength("WARNING! -auto is deprecated. Please use " +
|
c.UI.Warn(wrapAtLength("WARNING! -auto is deprecated. Please use " +
|
||||||
"-consul-auto instead. This will be removed the next major release " +
|
"-consul-auto instead. This will be removed in Vault 0.11 " +
|
||||||
"of Vault."))
|
"(or later)."))
|
||||||
c.flagConsulAuto = true
|
c.flagConsulAuto = true
|
||||||
}
|
}
|
||||||
if c.flagCheck {
|
if c.flagCheck {
|
||||||
c.UI.Warn(wrapAtLength("WARNING! -check is deprecated. Please use " +
|
c.UI.Warn(wrapAtLength("WARNING! -check is deprecated. Please use " +
|
||||||
"-status instead. This will be removed in the next major release " +
|
"-status instead. This will be removed in Vault 0.11 (or later)."))
|
||||||
"of Vault."))
|
|
||||||
c.flagStatus = true
|
c.flagStatus = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -261,22 +261,19 @@ func (c *OperatorRekeyCommand) Run(args []string) int {
|
|||||||
if c.flagDelete {
|
if c.flagDelete {
|
||||||
c.UI.Warn(wrapAtLength(
|
c.UI.Warn(wrapAtLength(
|
||||||
"WARNING! The -delete flag is deprecated. Please use -backup-delete " +
|
"WARNING! The -delete flag is deprecated. Please use -backup-delete " +
|
||||||
"instead. This flag will be removed in the next major release of " +
|
"instead. This flag will be removed in Vault 0.11 (or later)."))
|
||||||
"Vault."))
|
|
||||||
c.flagBackupDelete = true
|
c.flagBackupDelete = true
|
||||||
}
|
}
|
||||||
if c.flagRetrieve {
|
if c.flagRetrieve {
|
||||||
c.UI.Warn(wrapAtLength(
|
c.UI.Warn(wrapAtLength(
|
||||||
"WARNING! The -retrieve flag is deprecated. Please use -backup-retrieve " +
|
"WARNING! The -retrieve flag is deprecated. Please use -backup-retrieve " +
|
||||||
"instead. This flag will be removed in the next major release of " +
|
"instead. This flag will be removed in Vault 0.11 (or later)."))
|
||||||
"Vault."))
|
|
||||||
c.flagBackupRetrieve = true
|
c.flagBackupRetrieve = true
|
||||||
}
|
}
|
||||||
if c.flagRecoveryKey {
|
if c.flagRecoveryKey {
|
||||||
c.UI.Warn(wrapAtLength(
|
c.UI.Warn(wrapAtLength(
|
||||||
"WARNING! The -recovery-key flag is deprecated. Please use -target=recovery " +
|
"WARNING! The -recovery-key flag is deprecated. Please use -target=recovery " +
|
||||||
"instead. This flag will be removed in the next major release of " +
|
"instead. This flag will be removed in Vault 0.11 (or later)."))
|
||||||
"Vault."))
|
|
||||||
c.flagTarget = "recovery"
|
c.flagTarget = "recovery"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -255,8 +255,8 @@ func (c *SSHCommand) Run(args []string) int {
|
|||||||
"WARNING: No -role specified. Use -role to tell Vault which ssh role " +
|
"WARNING: No -role specified. Use -role to tell Vault which ssh role " +
|
||||||
"to use for authentication. In the future, you will need to tell " +
|
"to use for authentication. In the future, you will need to tell " +
|
||||||
"Vault which role to use. For now, Vault will attempt to guess based " +
|
"Vault which role to use. For now, Vault will attempt to guess based " +
|
||||||
"on a the API response. This will be removed in the next major " +
|
"on the API response. This will be removed in the Vault 0.11 (or " +
|
||||||
"version of Vault."))
|
"later."))
|
||||||
|
|
||||||
role, err := c.defaultRole(c.flagMountPoint, ip)
|
role, err := c.defaultRole(c.flagMountPoint, ip)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -283,7 +283,7 @@ func (c *SSHCommand) Run(args []string) int {
|
|||||||
"on the API response. This guess involves creating a temporary " +
|
"on the API response. This guess involves creating a temporary " +
|
||||||
"credential, reading its type, and then revoking it. To reduce the " +
|
"credential, reading its type, and then revoking it. To reduce the " +
|
||||||
"number of API calls and surface area, specify -mode directly. This " +
|
"number of API calls and surface area, specify -mode directly. This " +
|
||||||
"will be removed in the next major version of Vault."))
|
"will be removed in Vault 0.11 (or later)."))
|
||||||
secret, cred, err := c.generateCredential(username, ip)
|
secret, cred, err := c.generateCredential(username, ip)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// This is _very_ hacky, but is the only sane backwards-compatible way
|
// This is _very_ hacky, but is the only sane backwards-compatible way
|
||||||
|
|||||||
Reference in New Issue
Block a user