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/openstack/requests/volume/get_snapshot_details.rb
Philip Mark M. Deazeta 609995ccbe [openstack] Fixed mocks for failing shindo tests
reverted back to double quoted string

Conflicts:
	lib/fog/openstack/identity.rb
	lib/fog/openstack/requests/compute/get_volume_details.rb
	lib/fog/openstack/requests/compute/list_security_groups.rb
	lib/fog/openstack/requests/identity/list_tenants.rb
	lib/fog/openstack/requests/image/create_image.rb
	lib/fog/openstack/requests/image/list_public_images.rb
	lib/fog/openstack/requests/image/list_public_images_detailed.rb
	lib/fog/openstack/requests/image/update_image.rb
	tests/openstack/requests/compute/volume_tests.rb
2012-09-28 15:07:38 +08:00

39 lines
901 B
Ruby

module Fog
module Volume
class OpenStack
class Real
def get_snapshot_details(snapshot_id)
request(
:expects => 200,
:method => 'GET',
:path => "snapshots/#{snapshot_id}"
)
end
end
class Mock
def get_snapshot_details(detailed=true)
response = Excon::Response.new
response.status = 200
response.body = {
'snapshot' => {
'id' => '1',
'display_name' => 'Snapshot1',
'display_description' => 'Volume1 snapshot',
'size' => 1,
'volume_id' => '1',
'status' => 'available',
'created_at' => Time.now
}
}
response
end
end
end
end
end