Class: Fog::Network::StormOnDemand::Balancers
- Inherits:
-
Collection
- Object
- Collection
- Fog::Network::StormOnDemand::Balancers
- Defined in:
- lib/fog/network/storm_on_demand/models/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
7 8 9 10 |
# File 'lib/fog/network/storm_on_demand/models/balancers.rb', line 7 def all( = {}) data = service.list_balancers().body["items"] load(data) end |
#available(name) ⇒ Object
12 13 14 15 |
# File 'lib/fog/network/storm_on_demand/models/balancers.rb', line 12 def available(name) avail = service.check_balancer_available(:name => name).body avail["available"].to_i == 1 ? true : false end |
#create(options) ⇒ Object
17 18 19 20 |
# File 'lib/fog/network/storm_on_demand/models/balancers.rb', line 17 def create() balancer = service.create_balancer().body new(balancer) end |
#get(uniq_id) ⇒ Object
22 23 24 25 |
# File 'lib/fog/network/storm_on_demand/models/balancers.rb', line 22 def get(uniq_id) balancer = service.get_balancer_details(:uniq_id => uniq_id).body new(balancer) end |
#possible_nodes(options = {}) ⇒ Object
27 28 29 |
# File 'lib/fog/network/storm_on_demand/models/balancers.rb', line 27 def possible_nodes( = {}) service.get_balancer_possible_nodes().body["items"] end |
#strategies ⇒ Object
31 32 33 |
# File 'lib/fog/network/storm_on_demand/models/balancers.rb', line 31 def strategies service.get_balancer_strategies.body["strategies"] end |