mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #27244 from garethgreenaway/ec2_create_snapshot_no_return_data_exception
Exception in cloud.ec2.create_snapshot
This commit is contained in:
commit
51a0193b54
@ -3760,15 +3760,17 @@ def create_snapshot(kwargs=None, call=None, wait_to_finish=False):
|
||||
for d in data:
|
||||
for k, v in d.items():
|
||||
r_data[k] = v
|
||||
snapshot_id = r_data['snapshotId']
|
||||
|
||||
# Waits till volume is available
|
||||
if wait_to_finish:
|
||||
salt.utils.cloud.run_func_until_ret_arg(fun=describe_snapshots,
|
||||
kwargs={'snapshot_id': snapshot_id},
|
||||
fun_call=call,
|
||||
argument_being_watched='status',
|
||||
required_argument_response='completed')
|
||||
if 'snapshotId' in r_data:
|
||||
snapshot_id = r_data['snapshotId']
|
||||
|
||||
# Waits till volume is available
|
||||
if wait_to_finish:
|
||||
salt.utils.cloud.run_func_until_ret_arg(fun=describe_snapshots,
|
||||
kwargs={'snapshot_id': snapshot_id},
|
||||
fun_call=call,
|
||||
argument_being_watched='status',
|
||||
required_argument_response='completed')
|
||||
|
||||
return r_data
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user