Class: Chef::Knife::SoloDataBagCreate
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::SoloDataBagCreate
- Includes:
- SoloDataBagHelpers
- Defined in:
- lib/chef/knife/solo_data_bag_create.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.
21 22 23 |
# File 'lib/chef/knife/solo_data_bag_create.rb', line 21 def bag_name @bag_name end |
#item_name ⇒ Object (readonly)
Returns the value of attribute item_name.
21 22 23 |
# File 'lib/chef/knife/solo_data_bag_create.rb', line 21 def item_name @item_name end |
Instance Method Details
#run ⇒ Object
45 46 47 48 49 50 |
# File 'lib/chef/knife/solo_data_bag_create.rb', line 45 def run @bag_name, @item_name = @name_args ensure_valid_arguments create_bag_directory create_bag_item if item_name end |