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:
commit
8e7f545b2c
1 changed files with 2 additions and 0 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue