Class: Fog::Compute::StormOnDemand::Images

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

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



17
18
19
20
# File 'lib/fog/compute/storm_on_demand/models/images.rb', line 17

def all(options = {})
  data = service.list_images(options).body["items"]
  load(data)
end

#create(options = {}) ⇒ Object



7
8
9
10
# File 'lib/fog/compute/storm_on_demand/models/images.rb', line 7

def create(options = {})
  service.create_image(options)
  true
end

#get(image_id) ⇒ Object



12
13
14
15
# File 'lib/fog/compute/storm_on_demand/models/images.rb', line 12

def get(image_id)
  img = service.get_image_details(:id => image_id).body
  new(img)
end