Class: Fog::Compute::Gridscale::MarketplaceTemplates

Inherits:
PagingCollection
  • Object
show all
Defined in:
lib/fog/compute/gridscale/models/marketplace_templates.rb

Instance Method Summary collapse

Methods inherited from PagingCollection

#next_page, #previous_page

Instance Method Details

#all(filters = {}) ⇒ Object



10
11
12
13
14
# File 'lib/fog/compute/gridscale/models/marketplace_templates.rb', line 10

def all(filters={})
  data = service.marketplace_templates_get(filters)
  droplets = data.body["marketplace_templates"].values
  load(droplets)
end

#get(object_uuid) ⇒ Object



17
18
19
20
21
22
# File 'lib/fog/compute/gridscale/models/marketplace_templates.rb', line 17

def get(object_uuid)
  marketplace_template = service.marketplace_template_get(object_uuid).body['marketplace_template']
  new(marketplace_template) if marketplace_template
rescue Fog::Errors::NotFound
  nil
end