Class: Fog::Compute::StormOnDemand::Servers

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/compute/storm_on_demand/models/servers.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



7
8
9
10
# File 'lib/fog/compute/storm_on_demand/models/servers.rb', line 7

def all(options = {})
  data = service.list_servers(options).body["items"]
  load(data)
end

#create(options) ⇒ Object



17
18
19
20
# File 'lib/fog/compute/storm_on_demand/models/servers.rb', line 17

def create(options)
  server = service.create_server(options).body
  new(server)
end

#get(uniq_id) ⇒ Object



12
13
14
15
# File 'lib/fog/compute/storm_on_demand/models/servers.rb', line 12

def get(uniq_id)
  server = service.get_server(:uniq_id => uniq_id).body
  new(server)
end