class Fog::Compute::Cloudstack::Images

Public Instance Methods

all(filters={}) click to toggle source
# File lib/fog/cloudstack/models/compute/images.rb, line 12
def all(filters={})
  options = {
    'templatefilter' => 'self'
  }.merge(filters)

  data = connection.list_templates(options)["listtemplatesresponse"]["template"] || []
  load(data)
end
get(template_id) click to toggle source
# File lib/fog/cloudstack/models/compute/images.rb, line 21
def get(template_id)
  if template = connection.list_templates('id' => template_id)["listtemplatesresponse"]["template"].first
    new(template)
  end
rescue Fog::Compute::Cloudstack::BadRequest
  nil
end