2013-02-17 18:14:17 -05:00
|
|
|
require 'fog/core/model'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Bluebox
|
|
|
|
class BLB
|
2013-02-18 17:29:58 -05:00
|
|
|
class LbApplication < Fog::Model
|
2013-02-17 18:14:17 -05:00
|
|
|
identity :id
|
2014-02-19 07:30:59 -05:00
|
|
|
|
2013-02-17 18:14:17 -05:00
|
|
|
attribute :name
|
|
|
|
attribute :ip_v4
|
|
|
|
attribute :ip_v6
|
|
|
|
attribute :description
|
|
|
|
attribute :created, :aliases => 'created_at'
|
|
|
|
|
2013-02-28 21:24:11 -05:00
|
|
|
def add_machine(lb_machine_id, options)
|
|
|
|
requires :id
|
2013-02-28 22:05:38 -05:00
|
|
|
service.add_machine_to_lb_application(id, lb_machine_id, options)
|
2013-02-28 21:24:11 -05:00
|
|
|
end
|
|
|
|
|
2013-02-18 20:09:51 -05:00
|
|
|
def lb_services
|
|
|
|
Fog::Bluebox::BLB::LbServices.new({
|
2013-02-18 20:33:54 -05:00
|
|
|
:service => service,
|
2013-02-18 20:09:51 -05:00
|
|
|
:lb_application => self
|
|
|
|
})
|
2013-02-18 18:47:46 -05:00
|
|
|
end
|
2013-02-17 18:14:17 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|