[bluebox|blb] some cleanup of model stubs

This commit is contained in:
Josh Yotty 2013-02-18 14:29:58 -08:00
parent 16eba31509
commit 95c1bad867
4 changed files with 6 additions and 20 deletions

View File

@ -4,7 +4,7 @@ module Fog
module Bluebox
class BLB
class Application < Fog::Model
class LbApplication < Fog::Model
identity :id
attribute :name

View File

@ -3,20 +3,13 @@ require 'fog/core/collection'
module Fog
module Bluebox
class BLB
class Applications < Fog::Collection
class LbApplications < Fog::Collection
def all
data = service.get_blocks.body
data = service.get_lb_applications.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)

View File

@ -4,7 +4,7 @@ module Fog
module Bluebox
class BLB
class Service < Fog::Model
class LbService < Fog::Model
identity :id
attribute :name

View File

@ -3,20 +3,13 @@ require 'fog/core/collection'
module Fog
module Bluebox
class BLB
class Applications < Fog::Collection
class LbServices < Fog::Collection
def all
data = service.get_blocks.body
data = service.get_lb_services.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)