mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
26 lines
489 B
Ruby
26 lines
489 B
Ruby
require 'fog/core/collection'
|
|
require 'fog/compute/models/storm_on_demand/server'
|
|
|
|
module Fog
|
|
module StormOnDemand
|
|
class Compute
|
|
|
|
class Servers < Fog::Collection
|
|
|
|
model Fog::StormOnDemand::Compute::Server
|
|
|
|
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
|