Class: Chef::Knife::SoloDataBagShow
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::SoloDataBagShow
- Includes:
- SoloDataBagHelpers
- Defined in:
- lib/chef/knife/solo_data_bag_show.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.
14 15 16 |
# File 'lib/chef/knife/solo_data_bag_show.rb', line 14 def bag_name @bag_name end |
#item_name ⇒ Object (readonly)
Returns the value of attribute item_name.
14 15 16 |
# File 'lib/chef/knife/solo_data_bag_show.rb', line 14 def item_name @item_name end |
Instance Method Details
#run ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/chef/knife/solo_data_bag_show.rb', line 29 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 display_content end |