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

Merge remote branch 'mtodd/create_volume-raise-on-non-existent-snapshot'

This commit is contained in:
geemus 2011-03-22 11:15:58 -07:00
commit 8e7f545b2c

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 = {