Class: Chef::Knife::EncryptedAttributeDelete
- Inherits:
-
Core::EncryptedAttributeBase
- Object
- Chef::Knife
- Core::EncryptedAttributeBase
- Chef::Knife::EncryptedAttributeDelete
- Includes:
- Core::EncryptedAttributeDepends
- Defined in:
- lib/chef/knife/encrypted_attribute_delete.rb
Overview
knife encrypted attribute delete command.
$ knife encrypted attribute delete NODE ATTRIBUTE (options)
Instance Method Summary collapse
-
#run ⇒ Object
Runs knife command.
Methods included from Core::EncryptedAttributeDepends
Methods inherited from Core::EncryptedAttributeBase
#assert_attribute_does_not_exist, #assert_attribute_exists, #assert_attribute_readable, #assert_valid_args, #attribute_path_to_ary, #attribute_path_to_ary_read_escape, #die, #option_assert, #parse_args
Instance Method Details
#run ⇒ Object
Runs knife command.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/chef/knife/encrypted_attribute_delete.rb', line 50 def run parse_args return unless Chef::EncryptedAttribute.exist_on_node?(@node_name, @attr_ary) # TODO: move this to lib/EncryptedAttribute assert_attribute_readable(@node_name, @attr_ary) unless config[:force] remote_node = Chef::EncryptedAttribute::RemoteNode.new(@node_name) return unless remote_node.delete_attribute(@attr_ary) ui.info('Encrypted attribute deleted.') end |