1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/ecloud/requests/compute/get_detached_disk.rb

22 lines
498 B
Ruby
Raw Normal View History

2012-11-27 19:57:16 -05:00
module Fog
module Compute
class Ecloud
class Real
basic_request :get_detached_disk
end
class Mock
def get_detached_disk(uri)
detached_disk_id = id_from_uri(uri)
detached_disk = self.data[:detached_disks][detached_disk_id]
if detached_disk
response(:body => Fog::Ecloud.slice(detached_disk, :id, :compute_pool_id))
2013-02-04 13:25:34 -05:00
else raise Fog::Errors::NotFound
2012-11-27 19:57:16 -05:00
end
end
end
end
end
end