Class: Chef::Knife::GoiardiRunsList
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::GoiardiRunsList
- Includes:
- Goiardi::Reporting::KnifeHelpers
- Defined in:
- lib/chef/knife/goiardi_runs_list.rb
Constant Summary collapse
- PROTOCOL_VERSION =
'0.1.0'
- HEADERS =
{'X-Ops-Reporting-Protocol-Version' => PROTOCOL_VERSION}
Constants included from Goiardi::Reporting::KnifeHelpers
Goiardi::Reporting::KnifeHelpers::SECONDS_IN_24HOURS, Goiardi::Reporting::KnifeHelpers::SECONDS_IN_3MONTHS
Instance Method Summary collapse
Methods included from Goiardi::Reporting::KnifeHelpers
#apply_time_args, #check_3month_window, #check_start_and_end_times_provided, #convert_to_unix_timestamps, #last_24hours_time_window, #uuid?
Instance Method Details
#run ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/chef/knife/goiardi_runs_list.rb', line 70 def run @rest = Chef::REST.new(Chef::Config[:chef_server_url]) node_name = name_args[0] check_start_and_end_times_provided() start_time, end_time = apply_time_args() check_3month_window(start_time, end_time) query_string = generate_query(start_time, end_time, node_name, config[:rows]) if config[:status] query_string += "&status=#{config[:status]}" end runs = history(query_string) output(runs) end |