Class: Fog::Network::StormOnDemand::Balancers
- Inherits:
-
Collection
- Object
- Collection
- Fog::Network::StormOnDemand::Balancers
- Defined in:
- lib/fog/storm_on_demand/models/network/balancers.rb
Instance Method Summary collapse
- #all(options = {}) ⇒ Object
- #available(name) ⇒ Object
- #create(options) ⇒ Object
- #get(uniq_id) ⇒ Object
- #possible_nodes(options = {}) ⇒ Object
- #strategies ⇒ Object
Instance Method Details
#all(options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/fog/storm_on_demand/models/network/balancers.rb', line 10 def all(={}) data = service.list_balancers().body['items'] load(data) end |
#available(name) ⇒ Object
15 16 17 18 |
# File 'lib/fog/storm_on_demand/models/network/balancers.rb', line 15 def available(name) avail = service.check_balancer_available(:name => name).body avail['available'].to_i == 1 ? true : false end |
#create(options) ⇒ Object
20 21 22 23 |
# File 'lib/fog/storm_on_demand/models/network/balancers.rb', line 20 def create() balancer = service.create_balancer().body new(balancer) end |
#get(uniq_id) ⇒ Object
25 26 27 28 |
# File 'lib/fog/storm_on_demand/models/network/balancers.rb', line 25 def get(uniq_id) balancer = service.get_balancer_details(:uniq_id => uniq_id).body new(balancer) end |
#possible_nodes(options = {}) ⇒ Object
30 31 32 |
# File 'lib/fog/storm_on_demand/models/network/balancers.rb', line 30 def possible_nodes(={}) service.get_balancer_possible_nodes().body['items'] end |
#strategies ⇒ Object
34 35 36 |
# File 'lib/fog/storm_on_demand/models/network/balancers.rb', line 34 def strategies service.get_balancer_strategies.body['strategies'] end |