Commit Graph

24 Commits

Author SHA1 Message Date
Brian Kassouf
a24653cc5c
Run a more strict formatter over the code (#11312)
* Update tooling

* Run gofumpt

* go mod vendor
2021-04-08 09:43:39 -07:00
Mark Gritter
f61280bf1c
Unconditionally use the root namespace when calling sys/seal-status. (#10742) 2021-01-25 11:25:54 -06:00
Calvin Leung Huang
3189278c84
CLI Enhancements (#3897)
* Use Colored UI if stdout is a tty

* Add format options to operator unseal

* Add format test on operator unseal

* Add -no-color output flag, and use BasicUi if no-color flag is provided

* Move seal status formatting logic to OutputSealStatus

* Apply no-color to warnings from DeprecatedCommands as well

* Add OutputWithFormat to support arbitrary data, add format option to auth list

* Add ability to output arbitrary list data on TableFormatter

* Clear up switch logic on format

* Add format option for list-related commands

* Add format option to rest of commands that returns a client API response

* Remove initOutputYAML and initOutputJSON, and use OutputWithFormat instead

* Remove outputAsYAML and outputAsJSON, and use OutputWithFormat instead

* Remove -no-color flag, use env var exclusively to toggle colored output

* Fix compile

* Remove -no-color flag in main.go

* Add missing FlagSetOutputFormat

* Fix generate-root/decode test

* Migrate init functions to main.go

* Add no-color flag back as hidden

* Handle non-supported data types for TableFormatter.OutputList

* Pull formatting much further up to remove the need to use c.flagFormat (#3950)

* Pull formatting much further up to remove the need to use c.flagFormat

Also remove OutputWithFormat as the logic can cause issues.

* Use const for env var

* Minor updates

* Remove unnecessary check

* Fix SSH output and some tests

* Fix tests

* Make race detector not run on generate root since it kills Travis these days

* Update docs

* Update docs

* Address review feedback

* Handle --format as well as -format
2018-02-12 18:12:16 -05:00
Seth Vargo
9c76f0b2e5
Use a unified helper for seal output 2017-10-24 09:34:12 -04:00
Seth Vargo
cf0c219668
Update status command 2017-10-24 09:30:48 -04:00
Seth Vargo
bd33fe3c73
Update status command 2017-10-24 09:30:46 -04:00
Jeff Mitchell
95ce578842 Add leader cluster address to status/leader output. (#3061)
* Add leader cluster address to status/leader output. This helps in
identifying a particular node when all share the same redirect address.

Fixes #3042
2017-07-31 18:25:27 -04:00
Jeff Mitchell
78269445a8 Fix missing newline in status output 2017-02-17 11:23:20 -05:00
Jeff Mitchell
ac0f45e45c Add nonce to unseal to allow seeing if the operation has reset (#2276) 2017-01-17 11:47:06 -05:00
vishalnayak
8f1ccc6eff Add cluster information to 'vault status' 2016-07-29 14:13:53 -04:00
vishalnayak
5c38276598 Added Vault version informationto the 'status' command 2016-07-28 17:37:35 -04:00
Jeff Mitchell
02be26e4ae Fix up the meta common options text function to not strip leading space and fix up commands 2016-04-01 16:50:12 -04:00
Jeff Mitchell
33326b30c3 Move meta into its own package 2016-04-01 13:16:05 -04:00
Jeff Mitchell
ef8086b17f Update documentation for status command to reflect new return codes 2016-02-08 11:36:08 -05:00
Jeff Mitchell
09586dd941 Return 2 for sealed instead of 1 to match the new init -check behavior 2016-01-29 10:55:31 -05:00
Jeff Mitchell
afd0bca03a Don't return 1 when flags don't parse for status command, as all other errors return 2; 1 is for when the vault is sealed 2016-01-29 10:53:56 -05:00
Armon Dadgar
18a23c9bef command: source general options docs from common source 2015-06-30 12:01:23 -07:00
Mitchell Hashimoto
6be7303053 command/*: -tls-skip-verify [GH-130] 2015-05-11 11:01:52 -07:00
Mitchell Hashimoto
d1054ceda9 command/*: more TODO removal 2015-04-28 09:15:38 -07:00
Mitchell Hashimoto
dae11264ee command/status: no weird indentintg 2015-04-21 20:11:15 +02:00
Armon Dadgar
0d066ca8e7 command/status: refactor to improve output 2015-04-20 13:37:32 -07:00
Armon Dadgar
018e07cbd3 command/status: improve output when sealed 2015-04-20 12:21:35 -07:00
Armon Dadgar
126a2ebd16 command/status: improve output when sealed 2015-04-20 12:19:25 -07:00
Armon Dadgar
e4285526b2 command: Rename seal-status to status 2015-04-20 12:11:21 -07:00