2011-04-27 21:49:56 -04:00
|
|
|
require 'fog/core/collection'
|
2011-08-24 21:14:00 -04:00
|
|
|
require 'fog/storm_on_demand/models/compute/server'
|
2011-04-27 21:49:56 -04:00
|
|
|
|
|
|
|
module Fog
|
2011-06-16 19:28:54 -04:00
|
|
|
module Compute
|
|
|
|
class StormOnDemand
|
2011-04-27 21:49:56 -04:00
|
|
|
|
|
|
|
class Servers < Fog::Collection
|
|
|
|
|
2011-06-16 19:28:54 -04:00
|
|
|
model Fog::Compute::StormOnDemand::Server
|
2011-04-27 21:49:56 -04:00
|
|
|
|
|
|
|
def all
|
2012-12-22 18:23:26 -05:00
|
|
|
data = service.list_servers.body['items']
|
2011-04-27 21:49:56 -04:00
|
|
|
load(data)
|
|
|
|
end
|
|
|
|
|
|
|
|
def get(uniq_id)
|
2012-12-22 18:23:26 -05:00
|
|
|
server = service.get_server(:uniq_id => uniq_id).body
|
2011-04-27 21:49:56 -04:00
|
|
|
new(server)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|