Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kv patch command #4432

Merged
merged 2 commits into from
Apr 23, 2018
Merged

kv patch command #4432

merged 2 commits into from
Apr 23, 2018

Conversation

jefferai
Copy link
Member

No description provided.

@jefferai jefferai requested a review from briankassouf April 23, 2018 20:41
@jefferai jefferai added this to the 0.10.1 milestone Apr 23, 2018
Copy link
Contributor

@briankassouf briankassouf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small things 🎉

}

func (c *KVPatchCommand) Synopsis() string {
return "Sets or updates data in the KV store without ovewriting."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overwriting*

type KVPatchCommand struct {
*BaseCommand

flagCAS int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is getting used anywhere. I wonder if we should allow a cas flag that verifies the retrieved version equals that flag

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, although in that case you might as well have just modified the output of that initial read. Could defer until someone asks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, i'm fine with that

@jefferai jefferai merged commit 534a8e8 into kv-preflight Apr 23, 2018
@jefferai jefferai deleted the kv-patch branch April 23, 2018 21:01
briankassouf added a commit that referenced this pull request Apr 23, 2018
* Update kv command to use a preflight check

* Make the existing ui endpoint return the allowed mounts

* Add kv subcommand tests

* Enable `-field` in `vault kv get/put` (#4426)

* Enable `-field` in `vault kv get/put`

Fixes #4424

* Unify nil value handling

* Use preflight helper

* Update vkv plugin

* Add all the mount info when authenticated

* Add fix the error message on put

* add metadata test

* No need to sort the capabilities

* Remove the kv client header

* kv patch command (#4432)

* Fix test

* Fix tests

* Use permission denied instead of entity disabled
truenorthcreative pushed a commit that referenced this pull request Apr 23, 2018
* Update kv command to use a preflight check

* Make the existing ui endpoint return the allowed mounts

* Add kv subcommand tests

* Enable `-field` in `vault kv get/put` (#4426)

* Enable `-field` in `vault kv get/put`

Fixes #4424

* Unify nil value handling

* Use preflight helper

* Update vkv plugin

* Add all the mount info when authenticated

* Add fix the error message on put

* add metadata test

* No need to sort the capabilities

* Remove the kv client header

* kv patch command (#4432)

* Fix test

* Fix tests

* Use permission denied instead of entity disabled
@jantman
Copy link
Contributor

jantman commented Apr 24, 2018

👏


func (c *KVPatchCommand) Help() string {
helpText := `
Usage: vault kv put [options] KEY [DATA]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put -> patch

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants