Class: Proxy::Onboard::ApiBmc

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/smart_proxy_onboard/api_bmc.rb

Instance Method Summary collapse

Instance Method Details

#scanner_setupObject



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/smart_proxy_onboard/api_bmc.rb', line 38

def scanner_setup
  args = {}
  # /scan/cidr/:address/:netmask
  if params.key? 'address'
    args = { address: params[:address],
             netmask: params[:netmask] }
  # /scan/range/:address_first/:address_last
  elsif params.key? 'address_first'
    args = { address_first: params[:address_first],
             address_last: params[:address_last] }
  end
  @scanner = Proxy::Onboard::BMC::IPMIScanner.new(args)
end