Class: Proxy::Probing::Actions::UseProbe

Inherits:
Dynflow::Action::Runner
  • Object
show all
Defined in:
lib/smart-proxy-probing/actions/use_probe.rb

Instance Method Summary collapse

Instance Method Details

#finish_run(update) ⇒ Object



28
29
30
31
32
# File 'lib/smart-proxy-probing/actions/use_probe.rb', line 28

def finish_run(update)
  super
  output[:facts] = process_output(output[:result])
  output.delete(:result)
end

#initiate_runnerObject



18
19
20
21
22
23
24
25
26
# File 'lib/smart-proxy-probing/actions/use_probe.rb', line 18

def initiate_runner
  if input.fetch('options', {})['subnet_discovery']
    input['local_addresses'] = get_local_addrs
    input['targets'] = input['local_addresses'].keys
  end
  output[:targets] = input[:targets]
  output[:local_addresses] = input[:local_addresses] if input.key? :local_addresses
  CommandRunner.new(*probe.command)
end