Class: Fog::Compute::Ecloud::DetachedDisks

Inherits:
Ecloud::Collection show all
Defined in:
lib/fog/compute/ecloud/models/detached_disks.rb

Instance Method Summary collapse

Methods inherited from Ecloud::Collection

#check_href!, #load

Instance Method Details

#allObject



11
12
13
14
15
# File 'lib/fog/compute/ecloud/models/detached_disks.rb', line 11

def all
  data = service.get_detached_disks(href).body[:DetachedDisk]
					data = [] if data.nil?
  load(data)
end

#get(uri) ⇒ Object



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

def get(uri)
  data = service.get_detached_disk(uri).body
  new(data)
rescue Fog::Errors::NotFound
  nil
end