1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/storm_on_demand/models/compute/templates.rb
2013-05-21 21:11:06 +08:00

26 lines
525 B
Ruby

require 'fog/core/collection'
require 'fog/storm_on_demand/models/compute/template'
module Fog
module Compute
class StormOnDemand
class Templates < Fog::Collection
model Fog::Compute::StormOnDemand::Template
def all(options={})
data = service.list_templates(options).body['items']
load(data)
end
def get(template_id)
tpl = service.get_template_details(:id => template_id).body
new(tpl)
end
end
end
end
end