mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Adds param to def create_attach_volume (wait_to_finish), default to true, as you can't attach a newly created volume unless it's available
This commit is contained in:
parent
2ed441780e
commit
bf43f26f0a
@ -2093,7 +2093,7 @@ def queue_instances(instances):
|
||||
salt.utils.cloud.cache_node(node, __active_provider_name__, __opts__)
|
||||
|
||||
|
||||
def create_attach_volumes(name, kwargs, call=None):
|
||||
def create_attach_volumes(name, kwargs, call=None, wait_to_finish=True):
|
||||
'''
|
||||
Create and attach volumes to created node
|
||||
'''
|
||||
@ -2133,7 +2133,7 @@ def create_attach_volumes(name, kwargs, call=None):
|
||||
volume_dict['iops'] = volume['iops']
|
||||
|
||||
if 'volume_id' not in volume_dict:
|
||||
created_volume = create_volume(volume_dict, call='function')
|
||||
created_volume = create_volume(volume_dict, call='function', wait_to_finish=wait_to_finish)
|
||||
created = True
|
||||
for item in created_volume:
|
||||
if 'volumeId' in item:
|
||||
|
Loading…
Reference in New Issue
Block a user