mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
cfc1d58847
[ecloud] fixed a test and removed connection deprecation notices
26 lines
591 B
Ruby
26 lines
591 B
Ruby
module Fog
|
|
module Rackspace
|
|
class BlockStorage
|
|
class Real
|
|
def get_snapshot(snapshot_id)
|
|
request(
|
|
:expects => [200],
|
|
:method => 'GET',
|
|
:path => "snapshots/#{snapshot_id}"
|
|
)
|
|
end
|
|
end
|
|
|
|
class Mock
|
|
def get_snapshot(snapshot_id)
|
|
snapshot = self.data[:snapshots][snapshot_id]
|
|
if snapshot.nil?
|
|
raise Fog::Rackspace::BlockStorage::NotFound
|
|
else
|
|
response(:body => {"snapshot" => snapshot})
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|