2011-04-27 21:49:56 -04:00
|
|
|
require 'fog/core/collection'
|
2011-05-10 16:58:22 -04:00
|
|
|
require 'fog/compute/models/storm_on_demand/server'
|
2011-04-27 21:49:56 -04:00
|
|
|
|
|
|
|
module Fog
|
2011-04-30 15:29:05 -04:00
|
|
|
module StormOnDemand
|
2011-04-27 21:49:56 -04:00
|
|
|
class Compute
|
|
|
|
|
|
|
|
class Servers < Fog::Collection
|
|
|
|
|
2011-04-30 15:29:05 -04:00
|
|
|
model Fog::StormOnDemand::Compute::Server
|
2011-04-27 21:49:56 -04:00
|
|
|
|
|
|
|
def all
|
|
|
|
data = connection.list_servers.body['servers']
|
|
|
|
load(data)
|
|
|
|
end
|
|
|
|
|
|
|
|
def get(uniq_id)
|
|
|
|
server = connection.get_server(:uniq_id => uniq_id).body
|
|
|
|
new(server)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|