Commit Graph

329 Commits (e3d8ef4cea8101cc08a0d0220a5afd889942e888)

Author SHA1 Message Date
Anthony Romano 5f3140987e etcdctl: "fields" output formats
Writes out fields from responses in the format "FieldName" : FieldValue. If
FieldValue is a string, it is formatted with %q.
2016-12-12 13:21:20 -08:00
Anthony Romano 5559a026d7 etcdctl: remove GetUser check before mutable commands
etcdctl was checking if the user exists before applying mutable calls;
if etcdctl contacts a minority member, the member may not know the user
exists on the cluster yet, causing command failure when it should succeed.

If the user does not exist, it will be picked up once the command goes
through raft.

Fixes #6932
2016-12-05 12:12:06 -08:00
Xiang Li 1ef243e436 etcdctl: etcdctl v3 should print out its API version 2016-11-11 09:33:20 -08:00
Gyu-Ho Lee 9dd75a946f clientv3, ctlv3: document range end requirement 2016-11-08 17:02:32 -08:00
Gyu-Ho Lee 31a6efbc13 etcdctl/ctlv3: clarify 'user add' argument (user:password) 2016-11-03 10:47:45 -07:00
Xiang Li b28b38fb6d Merge pull request #6793 from timothysc/no-ttl
Add a no-ttl flag to etcdctl migrate to discard keys on transform.
2016-11-03 09:00:53 -07:00
Xiang Li c5ac02164d Merge pull request #6794 from xiang90/fix_migration
ctlv3: fix migration
2016-11-03 08:43:30 -07:00
Timothy St. Clair 97e96feb1d ctlv3: Add a no-ttl flag to etcdctl migrate to discard keys on transform. 2016-11-03 10:41:54 -05:00
Xiang Li 2ba42990ec ctlv3: fix migration 2016-11-02 20:00:07 -07:00
Gyu-Ho Lee 9b470ef4c0 etcdctl/ctlv2: error handling with JSON 2016-11-01 20:59:13 -07:00
Gyu-Ho Lee b64de4707d Merge pull request #6724 from johnbazan/ctlv3_add_user_with_password_inline
etcdctl: allow to add a user within one command line
2016-10-31 14:31:09 -07:00
Jonathan Bazan 73b4a58ac0 etcdctl: allow to add a user within one command line
This makes the "user add usr:pwd" feature available for ctlv3
without asking for the password in a new prompt.
2016-10-31 18:14:19 -03:00
joshrosso e489229153 etcdctl: add ttl unit to flag description
Add the ttl unit (seconds) to --ttl description for etcdctl's mk, mkdir, set,
setdir, update, and updatedir commands.
2016-10-25 17:12:15 -07:00
Hongchao Deng b3f0eeabe4 etcdctl: fix migrate in outputing client.Node to json
Using printf will try to parse the string and replace special
characters. In migrate code, we want to just output the raw
json string of client.Node.
For example,
    Printf("%\\") => %!\(MISSING)
    Print("%\\") => %\
Thus, we should use print instead.
2016-10-20 10:03:45 -07:00
sharat 00837b0736 etcdctlv3: update txn interactive command output 2016-10-19 19:55:09 +05:30
Gyu-Ho Lee 3a6d4b7f12 e2e: test sort ASCEND when sort target is missing 2016-10-18 16:29:22 -07:00
Gyu-Ho Lee fac20b228d ctlv3: support del all keys by '--prefix' 2016-10-17 09:33:59 -07:00
Gyu-Ho Lee 66f9e81c9a etcdctl: update README on environment variables 2016-10-14 11:58:59 -07:00
Hitoshi Mitake d585b43abe etcdctl, e2e: add --check-key option to endpoint health
This commit adds a new option --check-key to endpoint health command
for health checking with a custom key. It is mainly for avoiding
permission problem.
2016-10-14 11:39:46 +09:00
Hitoshi Mitake 644ec0ddef etcdctl, e2e: parse auth related options in endpoint health command
Partially fixes https://github.com/coreos/etcd/issues/6611
2016-10-09 20:34:09 +09:00
sharat 75f812eaa3 etcdctlv2: windows compatibility issue fix for etcd v3.0.1 2016-10-07 22:15:30 +05:30
Anthony Romano f2af08f5aa etcdctl: remove superfluous session in lock command 2016-10-05 13:30:36 -07:00
sharat dcfbcb7a68 etcdctlv3: minor updates to put and make-mirror command 2016-09-28 10:20:08 +05:30
sharat af8728f328 etcdctlv3:corrected and organised etcdctl commands 2016-09-23 18:21:54 +05:30
sharat 308038e96a etcdctlv3 : added options and examples for del from-key 2016-09-22 22:54:20 +05:30
Xiang Li b1e4defc48 Merge pull request #6501 from sinsharat/feature_add_del_from-key
etcdctlv3: del command from-key feature added
2016-09-22 09:15:04 -05:00
Gyu-Ho Lee 804e215981 Merge pull request #6505 from sinsharat/compaction_options_update
etcdctlv3: updated compaction options
2016-09-22 06:52:43 -07:00
sharat 5fa233a564 etcdctlv3: updated compaction options 2016-09-22 19:06:05 +05:30
sharat 35ff70656b etcdctlv3: del command from-key feature added 2016-09-22 16:55:36 +05:30
sharat 1601ee761a etcdctlv3: updated member command options 2016-09-22 15:04:54 +05:30
Xiang Li 30b26f8f50 etcdctl: remove the use of remprefix 2016-09-22 08:43:31 +08:00
sharat bcda9af15d etcdctlv3: updated del command options 2016-09-22 00:16:53 +05:30
sharat 05175480b3 etcdctlv3: updated snapshot restore options 2016-09-21 16:17:32 +05:30
Sharat 9743ee8b83 etcdctlv3: updated readme for options and examples for get command 2016-09-21 04:51:13 +05:30
sharat 3e67702d4b etcdctlv3: updated options for TIMETOLIVE 2016-09-20 16:40:58 +05:30
sharat 6c408eb779 etcdctlv3:updated readme.md for make-mirror modify/remove prefix in dest cluster 2016-09-17 16:13:01 +05:30
Xiang Li 86aeeca644 Merge pull request #6454 from sinsharat/windows_save_snapshot_fix
ctlv3: close snapshot file before rename (Windows)
2016-09-16 18:09:59 -05:00
sharat fef6557f6c ctlv3: close snapshot file before rename (Windows) 2016-09-16 21:55:04 +05:30
sharat b571f4d627 etcdctl/ctlv3: feature added to modify/remove prefix in the destination cluster 2016-09-16 18:48:41 +05:30
sharat cd3a7fb833 etcdctl: readme.md display fix 2016-09-15 12:23:56 +05:30
Anthony Romano e77baa3dcb Merge pull request #6424 from heyitsanthony/v3api-createminmax
etcdserver: range queries with min/max create revision
2016-09-14 19:10:52 -07:00
Anthony Romano 82af0c4a7d ctlv3: remove superfluous session creation 2016-09-14 17:03:33 -07:00
Hitoshi Mitake 4211c0b7af etcdctl, clientv3: improve printing of role get for prefix permission
This commit improves printing of role get command for prefix
permission. If a range permission corresponds to a prefix permission,
it is explicitly printed for a user. Below is an example of the new
printing:

$ ETCDCTL_API=3 bin/etcdctl --user root:p role get r1
Role r1
KV Read:
        [/dir/, /dir0) (prefix /dir/)
        [k1, k5)
KV Write:
        [/dir/, /dir0) (prefix /dir/)
        [k1, k5)
2016-09-14 16:10:32 +09:00
Xiang Li 672472f85e Merge pull request #6414 from mitake/prefix-perm
etcdctl: an option for granting permission with key prefix
2016-09-13 23:29:40 -05:00
Hitoshi Mitake 4e2b09a7ca etcdctl: an option for granting permission with key prefix
This commit adds a new option --prefix to "role grant-permission"
command. If the option is passed, the command interprets the key as a
prefix of range permission.

Example of usage:
$ ETCDCTL_API=3 bin/etcdctl --user root:p role grant-permission --prefix r1 readwrite /dir/
Role r1 updated
$ ETCDCTL_API=3 bin/etcdctl --user root:p role get r1
Role r1
KV Read:
        [/dir/, /dir0)
        [k1, k5)
KV Write:
        [/dir/, /dir0)
        [k1, k5)
$ ETCDCTL_API=3 bin/etcdctl --user u1:p put /dir/key val
OK
2016-09-14 12:54:14 +09:00
sharat 6f4e3696d2 etcdctl\ctlv3: updated readme.md for timetolive example 2016-09-13 22:31:34 +05:30
sharat d5edb62bd0 etcdctl:readme.md doc made uniform 2016-09-10 00:32:36 +05:30
Gyu-Ho Lee 04a4cea630 etcdctl/ctlv3: add 'lease timetolive' command 2016-09-09 08:21:58 +09:00
sharat 8b764aac71 ctlv3: fix line parsing for Windows 2016-09-09 01:58:33 +05:30
Xiang Li 28d80ad709 Merge pull request #6370 from xiang90/fix_restore
etcdctl: restore should create a snapshot
2016-09-08 14:25:07 -05:00