Frank Schroeder
393bf50e71
commands: move operator autopilot command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
c024fcaaa5
commands: move operator list remove-peer command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
6850c8723f
commands: move operator raft list-peers command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
78aa062990
commands: move operator raft command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
fe84af448b
commands: move operator command to separate pkg
2017-10-18 00:08:45 +02:00
Preetha Appan
684362b1d0
Move monitor command to its own package
2017-10-18 00:08:45 +02:00
Preetha Appan
28490d6dcb
Fix import order
2017-10-18 00:08:45 +02:00
Preetha Appan
4fa3987bdc
Move members command to its own package
2017-10-18 00:08:45 +02:00
Preetha Appan
8d2e6f10c7
Move maint command to its own package
2017-10-18 00:08:45 +02:00
Preetha Appan
4b06c971d2
Move lock command to its own package
2017-10-18 00:08:45 +02:00
Preetha Appan
e1935590b1
Fix leave and validate commands to build help string in constructor
2017-10-18 00:08:45 +02:00
Preetha Appan
3c4363389e
Fix KV CLI subcommands to build help string in constructor
2017-10-18 00:08:45 +02:00
Preetha Appan
75ec8a29a3
Fix Keyring and keygen commands to build help string in constructor
2017-10-18 00:08:45 +02:00
Preetha Appan
b8dd539037
Fix join command to build help string in constructor
2017-10-18 00:08:45 +02:00
Preetha Appan
0e1ee70a5e
Fix up info and forceleave to build help string in constructor
2017-10-18 00:08:45 +02:00
Preetha Appan
95053297a9
s/initFlags/init/g
2017-10-18 00:08:45 +02:00
Preetha Appan
0cb1c92977
Fix exec and event commands to build help string in constructor
2017-10-18 00:08:45 +02:00
Preetha Appan
3bd4b738c0
Fix up catalog list services to build help string in constructor
2017-10-18 00:08:45 +02:00
Preetha Appan
8761232b2a
Fix up list datacenters to build help string in constructor
2017-10-18 00:08:45 +02:00
Preetha Appan
5473dbc5a4
Fix tests by calling initFlags for each test case to reset state.
2017-10-18 00:08:45 +02:00
Preetha Appan
75ecc6a86e
Better name for usage string and moving constant definition down
2017-10-18 00:08:45 +02:00
Preetha Appan
7898780106
Construct the help string in constructor using helper function.
2017-10-18 00:08:45 +02:00
Frank Schroeder
9825b6709a
commands: move catalog list services to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
33a4e997b4
commands: move catalog list nodes command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
cfd110395b
commands: move catalog list datacenters command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
bcf53b98d1
commands: move catalog command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
5d75449419
commands: move leave command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
ffb747a744
commands: move force-leave command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
41f13de7f5
commands: move keyring command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
b1dac89b95
commands: move kv put command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
e50c8d8f73
commands: move kv get command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
19f2dab416
commands: move kv import command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
3f0c61666d
commands: move export entry struct to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
215cda4775
commands: move kv export command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
926aa72246
commands: move kv delete command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
50f039191d
commands: move kv command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
bd825687dd
commands: move keygen command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
74cf5c1c2c
commands: move info command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
c1c883957f
commands: move rExec helper to bottom
2017-10-18 00:08:45 +02:00
Frank Schroeder
8c7f013ae1
commands: move exec command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
ad50e2a410
commands: move event command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
dc3c722b2c
commands: move join command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
8880ae714b
commands: move validate command to separate pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
e65bd2a268
commands: move flag handling into flags pkg
2017-10-18 00:08:45 +02:00
Frank Schroeder
f8eb4006fa
revert monkey patch for mitchellh/cli
2017-10-18 00:08:45 +02:00
Frank Schroeder
7568a19433
config: refactor commands to print help for flags ( #3536 )
...
This patch refactors the commands that use the mitchellh/cli library to
populate the command line flag set in both the Run() and the Help()
method. Earlier versions of the mitchellh/cli library relied on the
Run() method to populuate the flagset for generating the usage screen.
This has changed in later versions and was previously solved with a
small monkey patch to the library to restore the old behavior.
However, this makes upgrading the library difficult since the patch has
to be restored every time.
This patch addresses this by moving the command line flags into an
initFlags() method where appropriate and also moving all variables for
the flags from the Run() method into the command itself.
Fixes #3536
2017-10-18 00:08:45 +02:00
Frank Schröder
64e4afede3
Merge pull request #3582 from ryanslade/time-since
...
Replace time.Now().Sub(x) with time.Since(x)
2017-10-18 00:06:12 +02:00
Frank Schroeder
ae76c975ae
vendor: update github.com/mitchellh/mapstructure to replace monkey patch
2017-10-17 20:43:11 +02:00
Frank Schroeder
1a573e8fba
vendor: update github.com/hashicorp/hcl to replace monkey patch
2017-10-17 20:43:11 +02:00
Ryan Slade
6f05ea91a3
Replace time.Now().Sub(x) with time.Since(x)
2017-10-17 20:38:24 +02:00