Class: Fog::Compute::HP::Images

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

Instance Method Summary collapse

Instance Method Details

#allObject



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

def all
  data = service.list_images_detail.body['images']
  load(data)
  self
end

#get(image_id) ⇒ Object



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

def get(image_id)
  data = service.get_image_details(image_id).body['image']
  new(data)
rescue Fog::Compute::HP::NotFound
  nil
end