1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|compute] Raise error on non-existent snapshot for create_volume

This commit is contained in:
Matt Todd 2011-03-21 23:43:16 -04:00
parent bf7f269ce6
commit 7d61e5dac9

View file

@ -38,6 +38,8 @@ module Fog
def create_volume(availability_zone, size, snapshot_id = nil)
response = Excon::Response.new
if availability_zone && size
raise Fog::AWS::Compute::NotFound.new("The snapshot '#{snapshot_id}' does not exist.") if snapshot_id && !@data[:snapshots][snapshot_id]
response.status = 200
volume_id = Fog::AWS::Mock.volume_id
data = {