Method: Ftl::Client#spot

Defined in:
lib/ftl/client.rb

#spot(args = {}) ⇒ Object Also known as: request



98
99
100
101
102
103
104
105
106
# File 'lib/ftl/client.rb', line 98

def spot(args={})
  guard(args[0], "Please provide a short name for instance\n\t[bold]ftl[/] spot <name> <price>")
  guard(args[1], "Please provide a price for spot request\n\t[bold]ftl[/] spot <name> <price>")
  display "Spinning up FTL..."
  options.merge(options[:templates][args.first.to_sym]) if !options[:templates][args.first.to_sym].nil?
  options[:price] = args[1] || options[:templates][args.first.to_sym][:price] || options[:price]
  options.merge!(:launcher => :spot_requests)
  server = launch_instance(args)
end