Class: Chef::WhiskMixinShow

Inherits:
Knife
  • Object
show all
Includes:
Knife::WhiskBase
Defined in:
lib/chef/knife/knife-whisk.rb

Instance Method Summary collapse

Methods included from Knife::WhiskBase

#add_quotes, #exit_with_message, #get_config, #get_security_groups, included, #mixin_exists?, #security_group_exists?, #server_exists?

Instance Method Details

#runObject



122
123
124
125
126
127
128
129
130
131
132
# File 'lib/chef/knife/knife-whisk.rb', line 122

def run
  exit_with_message("Required whisk.yml does not exist") unless get_config
  exit_with_message("You must specify a mixin") unless name_args.size == 1

  if mixin_exists?(name_args.first)
    puts name_args.first
    puts get_config["mixins"]["#{name_args.first}"].to_yaml
  else
    exit_with_message("#{name_args.first} mixin does not exist")
  end
end