mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #27246 from garethgreenaway/develop_ec2_create_snapshot_exception
Develop - cloud.ec2.create_snapshot exception
This commit is contained in:
commit
9c174e9fc2
@ -3924,15 +3924,17 @@ def create_snapshot(kwargs=None, call=None, wait_to_finish=False):
|
||||
for d in data:
|
||||
for k, v in six.iteritems(d):
|
||||
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