[bluebox|blb] some cleanup of model stubs
This commit is contained in:
parent
16eba31509
commit
95c1bad867
|
@ -4,7 +4,7 @@ module Fog
|
|||
module Bluebox
|
||||
class BLB
|
||||
|
||||
class Application < Fog::Model
|
||||
class LbApplication < Fog::Model
|
||||
identity :id
|
||||
|
||||
attribute :name
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -4,7 +4,7 @@ module Fog
|
|||
module Bluebox
|
||||
class BLB
|
||||
|
||||
class Service < Fog::Model
|
||||
class LbService < Fog::Model
|
||||
identity :id
|
||||
|
||||
attribute :name
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue