etcdctl/ctlv3: minor clean ups
- Fix typo - Improve command ordering (elect should be below lock) - Update migrate command descriptionrelease-3.0
parent
c01c36bcfd
commit
80aa5978ca
|
@ -51,7 +51,7 @@ var (
|
||||||
func NewMigrateCommand() *cobra.Command {
|
func NewMigrateCommand() *cobra.Command {
|
||||||
mc := &cobra.Command{
|
mc := &cobra.Command{
|
||||||
Use: "migrate",
|
Use: "migrate",
|
||||||
Short: "migrate",
|
Short: "migrates keys in a v2 store to a mvcc store",
|
||||||
Run: migrateCommandFunc,
|
Run: migrateCommandFunc,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@ func NewRoleCommand() *cobra.Command {
|
||||||
ac.AddCommand(newRoleDeleteCommand())
|
ac.AddCommand(newRoleDeleteCommand())
|
||||||
ac.AddCommand(newRoleGetCommand())
|
ac.AddCommand(newRoleGetCommand())
|
||||||
ac.AddCommand(newRoleListCommand())
|
ac.AddCommand(newRoleListCommand())
|
||||||
ac.AddCommand(newRoleRevokePermissionCommand())
|
|
||||||
ac.AddCommand(newRoleGrantPermissionCommand())
|
ac.AddCommand(newRoleGrantPermissionCommand())
|
||||||
|
ac.AddCommand(newRoleRevokePermissionCommand())
|
||||||
|
|
||||||
return ac
|
return ac
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ func newUserChangePasswordCommand() *cobra.Command {
|
||||||
Run: userChangePasswordCommandFunc,
|
Run: userChangePasswordCommandFunc,
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.Flags().BoolVar(&passwordInteractive, "interactive", true, "read password from stdin instead of interactive terminal")
|
cmd.Flags().BoolVar(&passwordInteractive, "interactive", true, "if true, read password from stdin instead of interactive terminal")
|
||||||
|
|
||||||
return &cmd
|
return &cmd
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ func newUserGrantRoleCommand() *cobra.Command {
|
||||||
func newUserRevokeRoleCommand() *cobra.Command {
|
func newUserRevokeRoleCommand() *cobra.Command {
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Use: "revoke-role <user name> <role name>",
|
Use: "revoke-role <user name> <role name>",
|
||||||
Short: "revoke a role from from a user",
|
Short: "revoke a role from a user",
|
||||||
Run: userRevokeRoleCommandFunc,
|
Run: userRevokeRoleCommandFunc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,8 @@ func init() {
|
||||||
command.NewMakeMirrorCommand(),
|
command.NewMakeMirrorCommand(),
|
||||||
command.NewMigrateCommand(),
|
command.NewMigrateCommand(),
|
||||||
command.NewLockCommand(),
|
command.NewLockCommand(),
|
||||||
command.NewAuthCommand(),
|
|
||||||
command.NewElectCommand(),
|
command.NewElectCommand(),
|
||||||
|
command.NewAuthCommand(),
|
||||||
command.NewUserCommand(),
|
command.NewUserCommand(),
|
||||||
command.NewRoleCommand(),
|
command.NewRoleCommand(),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue