Class: Chef::Knife::SoloDataBagEdit
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::SoloDataBagEdit
- Includes:
- SoloDataBagHelpers
- Defined in:
- lib/chef/knife/solo_data_bag_edit.rb
Instance Attribute Summary collapse
-
#bag_name ⇒ Object
readonly
Returns the value of attribute bag_name.
-
#item_name ⇒ Object
readonly
Returns the value of attribute item_name.
Instance Method Summary collapse
Methods included from SoloDataBagHelpers
#bag_item_path, #bag_path, #bags_path, #convert_json_string, #persist_bag_item, #secret_key, #secret_path, #should_be_encrypted?, #validate_bag_name_provided, #validate_bags_path_exists, #validate_json_string, #validate_multiple_secrets_were_not_provided
Instance Attribute Details
#bag_name ⇒ Object (readonly)
Returns the value of attribute bag_name.
15 16 17 |
# File 'lib/chef/knife/solo_data_bag_edit.rb', line 15 def bag_name @bag_name end |
#item_name ⇒ Object (readonly)
Returns the value of attribute item_name.
15 16 17 |
# File 'lib/chef/knife/solo_data_bag_edit.rb', line 15 def item_name @item_name end |
Instance Method Details
#run ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/chef/knife/solo_data_bag_edit.rb', line 30 def run Chef::Config[:solo] = true Chef::Config[:solo_legacy_mode] = true if Gem.loaded_specs['chef'].version > Gem::Version.new('12.11.0') @bag_name, @item_name = @name_args ensure_valid_arguments edit_content end |