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

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

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



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

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

#create(options) ⇒ Object



20
21
22
23
# File 'lib/fog/storm_on_demand/models/compute/servers.rb', line 20

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

#get(uniq_id) ⇒ Object



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

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