Class: Fog::Compute::Ninefold::Images

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/ninefold/models/compute/images.rb

Instance Method Summary collapse

Instance Method Details

#all(offering = 'executable') ⇒ Object


10
11
12
13
# File 'lib/fog/ninefold/models/compute/images.rb', line 10

def all(offering = 'executable')
  data = service.list_templates(:templatefilter => offering)
  load(data)
end

#get(identifier, offering = 'executable') ⇒ Object


15
16
17
18
19
20
21
22
# File 'lib/fog/ninefold/models/compute/images.rb', line 15

def get(identifier, offering = 'executable')
  data = service.list_templates(:templatefilter => offering, :id => identifier)
  if data.empty?
    nil
  else
    new(data[0])
  end
end