class HammerCLIForemanRemoteExecution::JobInvocation
Public Class Methods
extend_data(invocation)
click to toggle source
# File lib/hammer_cli_foreman_remote_execution/job_invocation.rb, line 233 def self.extend_data(invocation) if (targeting = invocation['targeting']) && invocation['targeting']['hosts'] invocation['randomized_ordering'] = targeting['randomized_ordering'] || false hosts = targeting['hosts'].map do |host| { 'Name' => host['name'], 'Job status' => host['job_status'], 'Inputs' => host[:inputs] }.compact end invocation['hosts'] = hosts end if invocation['recurrence'] invocation['cron_line'] = invocation['recurrence']['cron_line'] invocation['recurring_logic_id'] = invocation['recurrence']['id'] end invocation end