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

Feature - knife vault update - update item_keys only when no value is provided #202

Merged
merged 3 commits into from
Mar 17, 2016

Conversation

xakraz
Copy link

@xakraz xakraz commented Mar 4, 2016

knife vault update subcommand does 2 things

  • Can update the vault's item value(s)
  • Can update the item keys list (Nodes, via search-query, or Admins)

Or both in the same command

knife vault update VAULT ITEM [-S ] [-A]

However, it saves the whole vault_item objects ( ${item} and ${item_keys} data bag items) even if only clients or admins are provided ( ${item_keys}).

This PR goes along e87c70c and issue : #193

It is needed when your source of truth is your VCS, and you update your Chef-server via files sync.

Xavier Krantz added 3 commits March 3, 2016 17:18
According to https://github.com/cucumber/cucumber/wiki/Given-When-Then,
renamed some steps name to have a better 'purpose' meaning.
Currently, 'knife vault update' does/allows 2 types of operations:
* Updating the VALUES of a vault item;
* 'Updating' (add only) clients/admins of a vault item;

If we don't provide a new VALUE to the 'vault update' command, the
encrypted_data and the 'iv' should not change but only the side data
bag ${item}_keys, which contains the clients/admins node_name and keys.
@xakraz
Copy link
Author

xakraz commented Mar 8, 2016

@thommay any thoughts regarding this PR ?

  • Is the feature ok for you ?
  • Should I do something special to make it merged ?

@thommay
Copy link
Contributor

thommay commented Mar 8, 2016

@xakraz looks fine, just haven't had chance to review and test it yet.

@xakraz
Copy link
Author

xakraz commented Mar 8, 2016

Ok, thanks @thommay :)

thommay added a commit that referenced this pull request Mar 17, 2016
Feature - knife vault update - update item_keys only when no value is provided
@thommay thommay merged commit 5282c2f into chef:master Mar 17, 2016
@thommay
Copy link
Contributor

thommay commented Mar 17, 2016

Thanks for the submission, merged!

@xakraz xakraz deleted the feature-update-keys-only branch March 17, 2016 15:47
@thommay thommay added Type: Enhancement Adds new functionality. and removed enhancement labels Jan 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants