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

[compute|aws] Fix create_volume mock when creating from a snapshot.

This commit is contained in:
Dan Peterson 2011-08-14 22:22:37 -07:00
parent f2b2fc2323
commit c8e2300760

View file

@ -45,8 +45,8 @@ module Fog
raise Fog::Compute::AWS::NotFound.new("The snapshot '#{snapshot_id}' does not exist.")
end
if snapshot && size && size != snapshot['volumeSize']
raise Fog::Compute::AWS::NotFound.new("The snapshot '#{snapshot_id}' with the specified size of '#{size}' does not exist.")
if snapshot && size && size < snapshot['volumeSize']
raise Fog::Compute::AWS::NotFound.new("The snapshot '#{snapshot_id}' has size #{snapshot['volumeSize']} which is greater than #{size}.")
elsif snapshot && !size
size = snapshot['volumeSize']
end