1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/bluebox/models/blb/lb_applications.rb

33 lines
655 B
Ruby
Raw Normal View History

require 'fog/core/collection'
module Fog
module Bluebox
class BLB
class Applications < Fog::Collection
def all
data = service.get_blocks.body
load(data)
end
def bootstrap(new_attributes = {})
server = create(new_attributes)
server.wait_for { ready? }
server.setup(:key_data => [server.private_key])
server
end
def get(server_id)
if server_id && server = service.get_block(server_id).body
new(server)
end
rescue Fog::Compute::Bluebox::NotFound
nil
end
end
end
end
end