class Chef::Knife::JobOutput
Public Instance Methods
get_channel(channel)
click to toggle source
# File lib/chef/knife/job_output.rb, line 40 def get_channel(channel) channel ||= "stdout" return channel if channel == "stdout" || channel == "stderr" raise "Invalid Format please enter stdout or stderr" end
run()
click to toggle source
# File lib/chef/knife/job_output.rb, line 28 def run job_id = name_args[0] channel = get_channel(config[:channel]) node = name_args[1] uri = "pushy/jobs/#{job_id}/output/#{node}/#{channel}" job = rest.get_rest(uri, { "Accept" => "application/octet-stream" }) output(job) end