From 83314b77503e33cd153ec23ce7f6fb4b53b558e8 Mon Sep 17 00:00:00 2001 From: Todd Knight Date: Wed, 7 Oct 2020 16:33:04 -0700 Subject: [PATCH] Accounts can update login-name. Fix help text for subtype resource update and creates. (#575) --- internal/cmd/commands/accounts/password.go | 10 +++++----- internal/cmd/commands/authmethods/password.go | 8 ++++---- internal/cmd/commands/hostcatalogs/static.go | 8 ++++---- internal/cmd/commands/hosts/static.go | 4 ++-- internal/cmd/commands/hostsets/static.go | 8 ++++---- internal/cmd/commands/targets/tcp.go | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/internal/cmd/commands/accounts/password.go b/internal/cmd/commands/accounts/password.go index e1784526f9..87aece7a8e 100644 --- a/internal/cmd/commands/accounts/password.go +++ b/internal/cmd/commands/accounts/password.go @@ -34,7 +34,7 @@ func (c *PasswordCommand) Synopsis() string { var passwordFlagsMap = map[string][]string{ "create": {"auth-method-id", "name", "description", "login-name", "password"}, - "update": {"id", "name", "description", "version"}, + "update": {"id", "name", "description", "version", "login-name"}, } func (c *PasswordCommand) Help() string { @@ -42,22 +42,22 @@ func (c *PasswordCommand) Help() string { switch c.Func { case "create": info = base.WrapForHelpText([]string{ - "Usage: boundary accounts password create [options] [args]", + "Usage: boundary accounts create password [options] [args]", "", " Create a password-type account. Example:", "", - ` $ boundary accounts password create -name prodops -description "Password account for ProdOps" -address "127.0.0.1"`, + ` $ boundary accounts create password -login-name prodops -description "Password account for ProdOps"`, "", "", }) case "update": info = base.WrapForHelpText([]string{ - "Usage: boundary accounts password update [options] [args]", + "Usage: boundary accounts update password [options] [args]", "", " Update a password-type account given its ID. Example:", "", - ` $ boundary accounts password update -id hst_1234567890 -name "devops" -description "Password account for DevOps" -address "10.20.30.40"`, + ` $ boundary accounts update password -id apw_1234567890 -name "devops" -description "Password account for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/authmethods/password.go b/internal/cmd/commands/authmethods/password.go index 8034c85cc0..551ace316b 100644 --- a/internal/cmd/commands/authmethods/password.go +++ b/internal/cmd/commands/authmethods/password.go @@ -40,22 +40,22 @@ func (c *PasswordCommand) Help() string { switch c.Func { case "create": info = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods password create [options] [args]", + "Usage: boundary auth-methods create password [options] [args]", "", " Create a password-type auth-method. Example:", "", - ` $ boundary auth-methods password create -name prodops -description "Password auth-method for ProdOps"`, + ` $ boundary auth-methods create password -name prodops -description "Password auth-method for ProdOps"`, "", "", }) case "update": info = base.WrapForHelpText([]string{ - "Usage: boundary auth-methods password update [options] [args]", + "Usage: boundary auth-methods update password [options] [args]", "", " Update a password-type auth-method given its ID. Example:", "", - ` $ boundary auth-methods password update -id ampw_1234567890 -name "devops" -description "Password auth-method for DevOps"`, + ` $ boundary auth-methods update password -id ampw_1234567890 -name "devops" -description "Password auth-method for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/hostcatalogs/static.go b/internal/cmd/commands/hostcatalogs/static.go index 1372de0786..7ef8e1c033 100644 --- a/internal/cmd/commands/hostcatalogs/static.go +++ b/internal/cmd/commands/hostcatalogs/static.go @@ -36,22 +36,22 @@ func (c *StaticCommand) Help() string { switch c.Func { case "create": info = base.WrapForHelpText([]string{ - "Usage: boundary host-catalogs static create [options] [args]", + "Usage: boundary host-catalogs create static [options] [args]", "", " Create a static-type host-catalog. Example:", "", - ` $ boundary host-catalogs static create -name prodops -description "Static host-catalog for ProdOps"`, + ` $ boundary host-catalogs create static -name prodops -description "Static host-catalog for ProdOps"`, "", "", }) case "update": info = base.WrapForHelpText([]string{ - "Usage: boundary host-catalogs static update [options] [args]", + "Usage: boundary host-catalogs update static [options] [args]", "", " Update a static-type host-catalog given its ID. Example:", "", - ` $ boundary host-catalogs static update -id hcst_1234567890 -name "devops" -description "Static host-catalog for DevOps"`, + ` $ boundary host-catalogs update static -id hcst_1234567890 -name "devops" -description "Static host-catalog for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/hosts/static.go b/internal/cmd/commands/hosts/static.go index 194be1abd0..f07cfa44b6 100644 --- a/internal/cmd/commands/hosts/static.go +++ b/internal/cmd/commands/hosts/static.go @@ -49,11 +49,11 @@ func (c *StaticCommand) Help() string { case "update": info = base.WrapForHelpText([]string{ - "Usage: boundary hosts static update [options] [args]", + "Usage: boundary hosts update static [options] [args]", "", " Update a static-type host given its ID. Example:", "", - ` $ boundary hosts static update -id hst_1234567890 -name "devops" -description "Static host for DevOps" -address "10.20.30.40"`, + ` $ boundary hosts update static -id hst_1234567890 -name "devops" -description "Static host for DevOps" -address "10.20.30.40"`, "", "", }) diff --git a/internal/cmd/commands/hostsets/static.go b/internal/cmd/commands/hostsets/static.go index 147c3bbc8e..434786de8e 100644 --- a/internal/cmd/commands/hostsets/static.go +++ b/internal/cmd/commands/hostsets/static.go @@ -36,22 +36,22 @@ func (c *StaticCommand) Help() string { switch c.Func { case "create": info = base.WrapForHelpText([]string{ - "Usage: boundary host-sets static create [options] [args]", + "Usage: boundary host-sets create static [options] [args]", "", " Create a static-type host-set. Example:", "", - ` $ boundary host-sets static create -name prodops -description "Static host-set for ProdOps"`, + ` $ boundary host-sets create static -name prodops -description "Static host-set for ProdOps"`, "", "", }) case "update": info = base.WrapForHelpText([]string{ - "Usage: boundary host-sets static update [options] [args]", + "Usage: boundary host-sets update static [options] [args]", "", " Update a static-type host-set given its ID. Example:", "", - ` $ boundary host-sets static update -id hsst_1234567890 -name "devops" -description "Static host-set for DevOps"`, + ` $ boundary host-sets update static -id hsst_1234567890 -name "devops" -description "Static host-set for DevOps"`, "", "", }) diff --git a/internal/cmd/commands/targets/tcp.go b/internal/cmd/commands/targets/tcp.go index 3ab82f619b..63d16eac3a 100644 --- a/internal/cmd/commands/targets/tcp.go +++ b/internal/cmd/commands/targets/tcp.go @@ -41,11 +41,11 @@ func (c *TcpCommand) Help() string { switch c.Func { case "create": info = base.WrapForHelpText([]string{ - "Usage: boundary targets tcp create [options] [args]", + "Usage: boundary targets create tcp [options] [args]", "", " Create a tcp-type target. Example:", "", - ` $ boundary targets tcp create -name prodops -description "Tcp target for ProdOps"`, + ` $ boundary targets create tcp -name prodops -description "Tcp target for ProdOps"`, "", "", })