Class: Chef::Knife::EncryptedAttributeUpdate
- Inherits:
-
Core::EncryptedAttributeBase
- Object
- Chef::Knife
- Core::EncryptedAttributeBase
- Chef::Knife::EncryptedAttributeUpdate
- Defined in:
- lib/chef/knife/encrypted_attribute_update.rb
Overview
knife encrypted attribute update command.
$ knife encrypted attribute update NODE ATTRIBUTE (options)
Instance Method Summary collapse
- #assert_valid_args ⇒ Object
-
#run ⇒ Object
Runs knife command.
Methods included from Core::EncryptedAttributeEditorOptions
#edit_data, #edit_data_obj_to_string, #edit_data_run_editor, #edit_data_run_editor_command, #edit_data_string_to_obj, included
Methods included from Core::EncryptedAttributeDepends
Methods inherited from Core::EncryptedAttributeBase
#assert_attribute_does_not_exist, #assert_attribute_exists, #assert_attribute_readable, #attribute_path_to_ary, #attribute_path_to_ary_read_escape, #die, #option_assert, #parse_args
Instance Method Details
#assert_valid_args ⇒ Object
39 40 41 |
# File 'lib/chef/knife/encrypted_attribute_update.rb', line 39 def assert_valid_args assert_attribute_exists(@node_name, @attr_ary) end |
#run ⇒ Object
Runs knife command.
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/chef/knife/encrypted_attribute_update.rb', line 65 def run parse_args # update encrypted attribute knife_config = Chef::Config[:knife][:encrypted_attributes] enc_attr = Chef::EncryptedAttribute.new(knife_config) if enc_attr.update_on_node(@node_name, @attr_ary) ui.info('Encrypted attribute updated.') else ui.info('Encrypted attribute does not need updating.') end end |