Commit Graph

32 Commits

Author SHA1 Message Date
Jeff Mitchell
f562a71808
Add support for passing args via vault read (#5093)
We support this in the API as of 0.10.2 so read should support it too.

Trivially tested with some log info:

`core: data: data="map[string]interface {}{"zip":[]string{"zap", "zap2"}}"`
2018-08-13 22:00:26 -04: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
d4b68970f3
Update read command 2017-10-24 09:30:48 -04:00
Seth Vargo
ad1482e123
Update read command 2017-10-24 09:29:37 -04:00
Brian Kassouf
41db07530a Add basic autocompletion (#3223)
* Add basic autocompletion

* Add autocomplete to some common commands

* Autocomplete the generate-root flags

* Add information about autocomplete to the docs
2017-08-24 15:23:40 -07:00
Jeff Mitchell
0b59a54837 Add unwrap command, and change how the response is embedded (as a string, not an object) 2016-05-19 11:25:15 -04:00
Jeff Mitchell
74826c25ca Fix panic when using -field with read or write with a non-string value.
Fixes #1308
2016-04-07 22:16:33 +00: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
2613343c3d Updates and documentation 2016-01-22 10:07:32 -05:00
Jeff Mitchell
4b67fd139f Add list capability, which will work with the generic and cubbyhole
backends for the moment. This is pretty simple; it just adds the actual
capability to make a list call into both the CLI and the HTTP handler.
The real meat was already in those backends.
2016-01-22 10:07:32 -05:00
Jeff Mitchell
0478a4f7c2 Fix read panic when an empty argument is given.
Fixes #923
2016-01-12 08:46:49 -05:00
Mathias Lafeldt
073e4c872e Allow to output secrets in YAML format
This can be done with https://github.com/ghodss/yaml, which reuses
existing JSON struct tags for YAML.
2015-12-10 11:32:31 +01:00
vishalnayak
fee64e16c2 Adding type checking to ensure only BasicUi is affected 2015-09-17 11:37:21 -04:00
vishalnayak
fceaea733e CLI: Avoiding CR when printing specific fields 2015-09-17 10:05:56 -04:00
Armon Dadgar
18a23c9bef command: source general options docs from common source 2015-06-30 12:01:23 -07:00
Armon Dadgar
f91b91289c command/read: Ensure only a single argument. Fixes #304 2015-06-18 16:00:41 -07:00
Armon Dadgar
0277cedc8a cmomand/read: strip path prefix if necessary. Fixes #343 2015-06-17 18:33:15 -07:00
Ian Unruh
c6b5d957de Add ability to read raw field from secret 2015-05-22 11:28:23 -07:00
Mitchell Hashimoto
6be7303053 command/*: -tls-skip-verify [GH-130] 2015-05-11 11:01:52 -07:00
Mitchell Hashimoto
128eea13f6 command/*: fix spacing 2015-04-28 09:15:21 -07:00
Mitchell Hashimoto
9816427b37 command/* fill in the addr 2015-04-28 09:13:32 -07:00
Armon Dadgar
5aee91ccb9 command: refactor to share output formating code 2015-04-27 14:55:29 -07:00
Mitchell Hashimoto
57be6d86d5 command/read: handle 404s 2015-04-18 22:05:08 -07:00
Mitchell Hashimoto
c359ba05f0 command/read: output the duration 2015-04-13 20:42:07 -07:00
Mitchell Hashimoto
4faf951f03 command/renew 2015-04-13 20:42:07 -07:00
Armon Dadgar
9f577b39b4 Replace VaultID with LeaseID for terminology simplification 2015-04-08 13:35:32 -07:00
Mitchell Hashimoto
def17c5f73 command/read 2015-04-01 16:44:20 -07:00
Mitchell Hashimoto
ba2b05db52 command/read: better UX on vault read 2015-03-31 20:50:05 -07:00
Mitchell Hashimoto
456c4b0b21 command/write: new format 2015-03-31 17:16:26 -07:00
Mitchell Hashimoto
4f8323cb03 command/read 2015-03-15 20:52:28 -07:00
Mitchell Hashimoto
8093f94c65 command/write 2015-03-15 20:35:33 -07:00