From 0f809b99fdfd20478148c6db95d7a330a2d7b845 Mon Sep 17 00:00:00 2001 From: Ilja Neumann Date: Tue, 18 Aug 2020 12:09:21 +0200 Subject: [PATCH] Integrate account-management cli-commands --- changelog/unreleased/integrate-accounts-cli.md | 11 +++++++++++ pkg/command/accounts.go | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 changelog/unreleased/integrate-accounts-cli.md diff --git a/changelog/unreleased/integrate-accounts-cli.md b/changelog/unreleased/integrate-accounts-cli.md new file mode 100644 index 000000000..b236f5894 --- /dev/null +++ b/changelog/unreleased/integrate-accounts-cli.md @@ -0,0 +1,11 @@ +Change: Add cli-commands to manage accounts + +COMMANDS: + - list, ls List existing accounts + - add, create Create a new account + - update Make changes to an existing account + - remove, rm Removes an existing account + - inspect Show detailed data on an existing account + - help, h Shows a list of commands or help for one command + +https://github.com/owncloud/product/issues/115 diff --git a/pkg/command/accounts.go b/pkg/command/accounts.go index b44934939..83cc0f1d0 100644 --- a/pkg/command/accounts.go +++ b/pkg/command/accounts.go @@ -18,6 +18,13 @@ func AccountsCommand(cfg *config.Config) *cli.Command { Usage: "Start accounts server", Category: "Extensions", Flags: flagset.ServerWithConfig(cfg.Accounts), + Subcommands: []*cli.Command{ + command.ListAccounts(cfg.Accounts), + command.AddAccount(cfg.Accounts), + command.UpdateAccount(cfg.Accounts), + command.RemoveAccount(cfg.Accounts), + command.InspectAccount(cfg.Accounts), + }, Action: func(c *cli.Context) error { accountsCommand := command.Server(configureAccounts(cfg)) if err := accountsCommand.Before(c); err != nil {