mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
commit
0598405d41
@ -109,6 +109,15 @@ def get_password(vm_):
|
||||
)
|
||||
|
||||
|
||||
def get_swap(vm_):
|
||||
'''
|
||||
Return the amount of swap space to use
|
||||
'''
|
||||
return config.get_cloud_config_value(
|
||||
'swap', vm_, __opts__, default=128
|
||||
)
|
||||
|
||||
|
||||
def create(vm_):
|
||||
'''
|
||||
Create a single VM from a data dict
|
||||
@ -132,7 +141,8 @@ def create(vm_):
|
||||
'image': get_image(conn, vm_),
|
||||
'size': get_size(conn, vm_),
|
||||
'location': get_location(conn, vm_),
|
||||
'auth': NodeAuthPassword(get_password(vm_))
|
||||
'auth': NodeAuthPassword(get_password(vm_)),
|
||||
'ex_swap': get_swap(vm_)
|
||||
}
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
@ -142,7 +152,8 @@ def create(vm_):
|
||||
{'kwargs': {'name': kwargs['name'],
|
||||
'image': kwargs['image'].name,
|
||||
'size': kwargs['size'].name,
|
||||
'location': kwargs['location'].name}},
|
||||
'location': kwargs['location'].name,
|
||||
'ex_swap': kwargs['ex_swap']}},
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user