mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +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 d in data:
|
||||||
for k, v in six.iteritems(d):
|
for k, v in six.iteritems(d):
|
||||||
r_data[k] = v
|
r_data[k] = v
|
||||||
snapshot_id = r_data['snapshotId']
|
|
||||||
|
|
||||||
# Waits till volume is available
|
if 'snapshotId' in r_data:
|
||||||
if wait_to_finish:
|
snapshot_id = r_data['snapshotId']
|
||||||
salt.utils.cloud.run_func_until_ret_arg(fun=describe_snapshots,
|
|
||||||
kwargs={'snapshot_id': snapshot_id},
|
# Waits till volume is available
|
||||||
fun_call=call,
|
if wait_to_finish:
|
||||||
argument_being_watched='status',
|
salt.utils.cloud.run_func_until_ret_arg(fun=describe_snapshots,
|
||||||
required_argument_response='completed')
|
kwargs={'snapshot_id': snapshot_id},
|
||||||
|
fun_call=call,
|
||||||
|
argument_being_watched='status',
|
||||||
|
required_argument_response='completed')
|
||||||
|
|
||||||
return r_data
|
return r_data
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user