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:
parent
bf7f269ce6
commit
7d61e5dac9
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