Class: Chef::Knife::NotificationShow

Inherits:
ChefAnalytics::Knife
  • Object
show all
Defined in:
lib/chef/knife/notification_show.rb

Instance Method Summary collapse

Instance Method Details

#runObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/chef/knife/notification_show.rb', line 35

def run
  validate_and_set_params

  run_id = name_args[0]

  if run_id.nil?
    show_usage
    exit 1
  end

  @rest = ChefAnalytics::ServerAPI.new(analytics_server_url, fetch_token)

  action = @rest.get("aliases/#{run_id}")
  output(action)
end