Class: Chef::Knife::GoiardiGelShow
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::GoiardiGelShow
- Includes:
- Goiardi::Gel::KnifeHelpers
- Defined in:
- lib/chef/knife/goiardi_gel_show.rb
Instance Method Summary collapse
Methods included from Goiardi::Gel::KnifeHelpers
#apply_time_args, #convert_to_unix_timestamps, #format_event, #format_object_type, #format_time
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/chef/knife/goiardi_gel_show.rb', line 15 def run @rest = Chef::REST.new(Chef::Config[:chef_server_url]) gel_id = name_args[0] if gel_id.nil? show_usage exit 1 end gel = @rest.get("events/#{gel_id}", false, {}) gel = format_event(gel) output(gel) end |