mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #34870 from jerrykan/cloud_sock_dir
Pass 'sock_dir' for all 'salt.utils.cloud.fire_event()' calls (#34806)
This commit is contained in:
commit
5c65b77b1a
@ -598,11 +598,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -619,7 +620,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -683,11 +685,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -967,7 +970,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -982,7 +986,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -1056,11 +1056,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
log.info('Creating Cloud VM {0}'.format(vm_['name']))
|
||||
@ -1133,11 +1134,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -289,11 +289,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -408,7 +409,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -495,11 +497,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -771,7 +774,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -809,7 +813,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -154,11 +154,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -315,11 +316,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -397,7 +399,8 @@ def create_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'create load_balancer',
|
||||
'salt/cloud/loadbalancer/creating',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -409,7 +412,8 @@ def create_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'created load_balancer',
|
||||
'salt/cloud/loadbalancer/created',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return _expand_balancer(lb)
|
||||
|
@ -1908,7 +1908,8 @@ def request_instance(vm_=None, call=None):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': params, 'location': location},
|
||||
args={'kwargs': params, 'location': location},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1987,6 +1988,7 @@ def request_instance(vm_=None, call=None):
|
||||
'event',
|
||||
'waiting for spot instance',
|
||||
'salt/cloud/{0}/waiting_for_spot'.format(vm_['name']),
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2050,7 +2052,8 @@ def query_instance(vm_=None, call=None):
|
||||
'event',
|
||||
'querying instance',
|
||||
'salt/cloud/{0}/querying'.format(vm_['name']),
|
||||
{'instance_id': instance_id},
|
||||
args={'instance_id': instance_id},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2156,7 +2159,8 @@ def query_instance(vm_=None, call=None):
|
||||
'event',
|
||||
'instance queried',
|
||||
'salt/cloud/{0}/query_reactor'.format(vm_['name']),
|
||||
{'data': data},
|
||||
args={'data': data},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2194,7 +2198,8 @@ def wait_for_instance(
|
||||
'event',
|
||||
'waiting for ssh',
|
||||
'salt/cloud/{0}/waiting_for_ssh'.format(vm_['name']),
|
||||
{'ip_address': ip_address},
|
||||
args={'ip_address': ip_address},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2373,7 +2378,8 @@ def wait_for_instance(
|
||||
'event',
|
||||
'ssh is available',
|
||||
'salt/cloud/{0}/ssh_ready_reactor'.format(vm_['name']),
|
||||
{'ip_address': ip_address},
|
||||
args={'ip_address': ip_address},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2445,11 +2451,12 @@ def create(vm_=None, call=None):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
salt.utils.cloud.cachedir_index_add(
|
||||
@ -2546,7 +2553,8 @@ def create(vm_=None, call=None):
|
||||
'event',
|
||||
'setting tags',
|
||||
'salt/cloud/{0}/tagging'.format(vm_['name']),
|
||||
{'tags': tags},
|
||||
args={'tags': tags},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2615,7 +2623,8 @@ def create(vm_=None, call=None):
|
||||
'event',
|
||||
'attaching volumes',
|
||||
'salt/cloud/{0}/attaching_volumes'.format(vm_['name']),
|
||||
{'volumes': volumes},
|
||||
args={'volumes': volumes},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2675,7 +2684,8 @@ def create(vm_=None, call=None):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
event_data,
|
||||
args=event_data,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -3097,7 +3107,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name, 'instance_id': instance_id},
|
||||
args={'name': name, 'instance_id': instance_id},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -3159,7 +3170,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name, 'instance_id': instance_id},
|
||||
args={'name': name, 'instance_id': instance_id},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -559,10 +559,11 @@ def create_network(kwargs=None, call=None):
|
||||
'event',
|
||||
'create network',
|
||||
'salt/cloud/net/creating',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'cidr': cidr,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -572,10 +573,11 @@ def create_network(kwargs=None, call=None):
|
||||
'event',
|
||||
'created network',
|
||||
'salt/cloud/net/created',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'cidr': cidr,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return _expand_item(network)
|
||||
@ -609,9 +611,10 @@ def delete_network(kwargs=None, call=None):
|
||||
'event',
|
||||
'delete network',
|
||||
'salt/cloud/net/deleting',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -632,9 +635,10 @@ def delete_network(kwargs=None, call=None):
|
||||
'event',
|
||||
'deleted network',
|
||||
'salt/cloud/net/deleted',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return result
|
||||
@ -709,11 +713,12 @@ def create_fwrule(kwargs=None, call=None):
|
||||
'event',
|
||||
'create firewall',
|
||||
'salt/cloud/firewall/creating',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'network': network_name,
|
||||
'allow': kwargs['allow'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -729,11 +734,12 @@ def create_fwrule(kwargs=None, call=None):
|
||||
'event',
|
||||
'created firewall',
|
||||
'salt/cloud/firewall/created',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'network': network_name,
|
||||
'allow': kwargs['allow'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return _expand_item(fwrule)
|
||||
@ -767,9 +773,10 @@ def delete_fwrule(kwargs=None, call=None):
|
||||
'event',
|
||||
'delete firewall',
|
||||
'salt/cloud/firewall/deleting',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -790,9 +797,10 @@ def delete_fwrule(kwargs=None, call=None):
|
||||
'event',
|
||||
'deleted firewall',
|
||||
'salt/cloud/firewall/deleted',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return result
|
||||
@ -858,7 +866,7 @@ def create_hc(kwargs=None, call=None):
|
||||
'event',
|
||||
'create health_check',
|
||||
'salt/cloud/healthcheck/creating',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'host': host,
|
||||
'path': path,
|
||||
@ -868,6 +876,7 @@ def create_hc(kwargs=None, call=None):
|
||||
'unhealthy_threshold': unhealthy_threshold,
|
||||
'healthy_threshold': healthy_threshold,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -881,7 +890,7 @@ def create_hc(kwargs=None, call=None):
|
||||
'event',
|
||||
'created health_check',
|
||||
'salt/cloud/healthcheck/created',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'host': host,
|
||||
'path': path,
|
||||
@ -891,6 +900,7 @@ def create_hc(kwargs=None, call=None):
|
||||
'unhealthy_threshold': unhealthy_threshold,
|
||||
'healthy_threshold': healthy_threshold,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return _expand_item(hc)
|
||||
@ -924,9 +934,10 @@ def delete_hc(kwargs=None, call=None):
|
||||
'event',
|
||||
'delete health_check',
|
||||
'salt/cloud/healthcheck/deleting',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -947,9 +958,10 @@ def delete_hc(kwargs=None, call=None):
|
||||
'event',
|
||||
'deleted health_check',
|
||||
'salt/cloud/healthcheck/deleted',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return result
|
||||
@ -1015,7 +1027,8 @@ def create_address(kwargs=None, call=None):
|
||||
'event',
|
||||
'create address',
|
||||
'salt/cloud/address/creating',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1025,7 +1038,8 @@ def create_address(kwargs=None, call=None):
|
||||
'event',
|
||||
'created address',
|
||||
'salt/cloud/address/created',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1070,9 +1084,10 @@ def delete_address(kwargs=None, call=None):
|
||||
'event',
|
||||
'delete address',
|
||||
'salt/cloud/address/deleting',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1093,9 +1108,10 @@ def delete_address(kwargs=None, call=None):
|
||||
'event',
|
||||
'deleted address',
|
||||
'salt/cloud/address/deleted',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1195,7 +1211,8 @@ def create_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'create load_balancer',
|
||||
'salt/cloud/loadbalancer/creating',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1209,7 +1226,8 @@ def create_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'created load_balancer',
|
||||
'salt/cloud/loadbalancer/created',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return _expand_balancer(lb)
|
||||
@ -1243,9 +1261,10 @@ def delete_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'delete load_balancer',
|
||||
'salt/cloud/loadbalancer/deleting',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1266,9 +1285,10 @@ def delete_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'deleted load_balancer',
|
||||
'salt/cloud/loadbalancer/deleted',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return result
|
||||
@ -1334,7 +1354,8 @@ def attach_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'attach load_balancer',
|
||||
'salt/cloud/loadbalancer/attaching',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1344,7 +1365,8 @@ def attach_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'attached load_balancer',
|
||||
'salt/cloud/loadbalancer/attached',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return _expand_item(result)
|
||||
@ -1399,7 +1421,8 @@ def detach_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'detach load_balancer',
|
||||
'salt/cloud/loadbalancer/detaching',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1409,7 +1432,8 @@ def detach_lb(kwargs=None, call=None):
|
||||
'event',
|
||||
'detached load_balancer',
|
||||
'salt/cloud/loadbalancer/detached',
|
||||
kwargs,
|
||||
args=kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return result
|
||||
@ -1443,9 +1467,10 @@ def delete_snapshot(kwargs=None, call=None):
|
||||
'event',
|
||||
'delete snapshot',
|
||||
'salt/cloud/snapshot/deleting',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1466,9 +1491,10 @@ def delete_snapshot(kwargs=None, call=None):
|
||||
'event',
|
||||
'deleted snapshot',
|
||||
'salt/cloud/snapshot/deleted',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return result
|
||||
@ -1503,11 +1529,12 @@ def delete_disk(kwargs=None, call=None):
|
||||
'event',
|
||||
'delete disk',
|
||||
'salt/cloud/disk/deleting',
|
||||
{
|
||||
args={
|
||||
'name': disk.name,
|
||||
'location': disk.extra['zone'].name,
|
||||
'size': disk.size,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1526,11 +1553,12 @@ def delete_disk(kwargs=None, call=None):
|
||||
'event',
|
||||
'deleted disk',
|
||||
'salt/cloud/disk/deleted',
|
||||
{
|
||||
args={
|
||||
'name': disk.name,
|
||||
'location': disk.extra['zone'].name,
|
||||
'size': disk.size,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return result
|
||||
@ -1590,12 +1618,13 @@ def create_disk(kwargs=None, call=None):
|
||||
'event',
|
||||
'create disk',
|
||||
'salt/cloud/disk/creating',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'location': location.name,
|
||||
'image': image,
|
||||
'snapshot': snapshot,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1607,12 +1636,13 @@ def create_disk(kwargs=None, call=None):
|
||||
'event',
|
||||
'created disk',
|
||||
'salt/cloud/disk/created',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'location': location.name,
|
||||
'image': image,
|
||||
'snapshot': snapshot,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return _expand_disk(disk)
|
||||
@ -1665,10 +1695,11 @@ def create_snapshot(kwargs=None, call=None):
|
||||
'event',
|
||||
'create snapshot',
|
||||
'salt/cloud/snapshot/creating',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'disk_name': disk_name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1678,10 +1709,11 @@ def create_snapshot(kwargs=None, call=None):
|
||||
'event',
|
||||
'created snapshot',
|
||||
'salt/cloud/snapshot/created',
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'disk_name': disk_name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return _expand_item(snapshot)
|
||||
@ -1769,10 +1801,11 @@ def detach_disk(name=None, kwargs=None, call=None):
|
||||
'event',
|
||||
'detach disk',
|
||||
'salt/cloud/disk/detaching',
|
||||
{
|
||||
args={
|
||||
'name': node_name,
|
||||
'disk_name': disk_name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1782,10 +1815,11 @@ def detach_disk(name=None, kwargs=None, call=None):
|
||||
'event',
|
||||
'detached disk',
|
||||
'salt/cloud/disk/detached',
|
||||
{
|
||||
args={
|
||||
'name': node_name,
|
||||
'disk_name': disk_name,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return result
|
||||
@ -1840,12 +1874,13 @@ def attach_disk(name=None, kwargs=None, call=None):
|
||||
'event',
|
||||
'attach disk',
|
||||
'salt/cloud/disk/attaching',
|
||||
{
|
||||
args={
|
||||
'name': node_name,
|
||||
'disk_name': disk_name,
|
||||
'mode': mode,
|
||||
'boot': boot,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1855,12 +1890,13 @@ def attach_disk(name=None, kwargs=None, call=None):
|
||||
'event',
|
||||
'attached disk',
|
||||
'salt/cloud/disk/attached',
|
||||
{
|
||||
args={
|
||||
'name': node_name,
|
||||
'disk_name': disk_name,
|
||||
'mode': mode,
|
||||
'boot': boot,
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return result
|
||||
@ -1923,7 +1959,8 @@ def destroy(vm_name, call=None):
|
||||
'event',
|
||||
'delete instance',
|
||||
'salt/cloud/{0}/deleting'.format(vm_name),
|
||||
{'name': vm_name},
|
||||
args={'name': vm_name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1960,7 +1997,8 @@ def destroy(vm_name, call=None):
|
||||
'event',
|
||||
'delete instance',
|
||||
'salt/cloud/{0}/deleted'.format(vm_name),
|
||||
{'name': vm_name},
|
||||
args={'name': vm_name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -1973,7 +2011,8 @@ def destroy(vm_name, call=None):
|
||||
'event',
|
||||
'delete disk',
|
||||
'salt/cloud/disk/deleting',
|
||||
{'name': vm_name},
|
||||
args={'name': vm_name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
try:
|
||||
@ -1994,7 +2033,8 @@ def destroy(vm_name, call=None):
|
||||
'event',
|
||||
'deleted disk',
|
||||
'salt/cloud/disk/deleted',
|
||||
{'name': vm_name},
|
||||
args={'name': vm_name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2084,11 +2124,12 @@ def request_instance(vm_):
|
||||
'event',
|
||||
'create instance',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2147,11 +2188,12 @@ def create(vm_=None, call=None):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -101,11 +101,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -133,7 +134,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': create_kwargs},
|
||||
args={'kwargs': create_kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -188,11 +190,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -411,7 +414,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -421,7 +425,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -182,6 +182,7 @@ def query_instance(vm_=None, call=None):
|
||||
'event',
|
||||
'querying instance',
|
||||
'salt/cloud/{0}/querying'.format(vm_['name']),
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -263,11 +264,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -295,7 +297,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -325,11 +328,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -394,7 +398,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -406,7 +411,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -351,11 +351,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(name),
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -442,7 +443,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(name),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -529,11 +531,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(name),
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -740,7 +743,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -752,7 +756,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -397,7 +397,8 @@ def destroy(vm_, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(vm_),
|
||||
{'name': vm_, 'instance_id': vm_},
|
||||
args={'name': vm_, 'instance_id': vm_},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
cret = _salt('lxc.destroy', vm_, stop=True, path=path)
|
||||
@ -408,7 +409,8 @@ def destroy(vm_, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(vm_),
|
||||
{'name': vm_, 'instance_id': vm_},
|
||||
args={'name': vm_, 'instance_id': vm_},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
if __opts__.get('update_cachedir', False) is True:
|
||||
@ -439,10 +441,15 @@ def create(vm_, call=None):
|
||||
vm_['driver'] = vm_.pop('provider')
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
'event', 'starting create',
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{'name': vm_['name'], 'profile': profile,
|
||||
'provider': vm_['driver'], },
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': profile,
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport'])
|
||||
ret = {'name': vm_['name'], 'changes': {}, 'result': True, 'comment': ''}
|
||||
if 'pub_key' not in vm_ and 'priv_key' not in vm_:
|
||||
@ -477,11 +484,12 @@ def create(vm_, call=None):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -426,11 +426,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -541,7 +542,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
event_kwargs,
|
||||
args=event_kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
log.debug('vm_kwargs: {0}'.format(vm_kwargs))
|
||||
@ -656,7 +658,8 @@ def create(vm_):
|
||||
'event',
|
||||
'attaching volumes',
|
||||
'salt/cloud/{0}/attaching_volumes'.format(vm_['name']),
|
||||
{'volumes': volumes},
|
||||
args={'volumes': volumes},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -689,11 +692,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -491,7 +491,8 @@ def destroy(name, conn=None, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -528,7 +529,8 @@ def destroy(name, conn=None, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
if __opts__.get('delete_sshkeys', False) is True:
|
||||
@ -642,9 +644,14 @@ def request_instance(vm_=None, call=None):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': {'name': kwargs['name'],
|
||||
'image': kwargs.get('image_id', 'Boot From Volume'),
|
||||
'size': kwargs['flavor_id']}},
|
||||
args={
|
||||
'kwargs': {
|
||||
'name': kwargs['name'],
|
||||
'image': kwargs.get('image_id', 'Boot From Volume'),
|
||||
'size': kwargs['flavor_id'],
|
||||
}
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -728,11 +735,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
conn = get_conn()
|
||||
@ -989,7 +997,8 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
event_data,
|
||||
args=event_data,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
salt.utils.cloud.cachedir_index_add(
|
||||
|
@ -903,11 +903,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -929,7 +930,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
)
|
||||
|
||||
template = []
|
||||
@ -1056,11 +1058,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
)
|
||||
|
||||
return ret
|
||||
@ -1093,7 +1096,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
)
|
||||
|
||||
server, user, password = _get_xml_rpc()
|
||||
@ -1106,7 +1110,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
)
|
||||
|
||||
if __opts__.get('update_cachedir', False) is True:
|
||||
|
@ -519,10 +519,15 @@ def request_instance(vm_=None, call=None):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': {'name': kwargs['name'],
|
||||
'image': kwargs['image'].name,
|
||||
'size': kwargs['size'].name,
|
||||
'profile': vm_['profile']}},
|
||||
args={
|
||||
'kwargs': {
|
||||
'name': kwargs['name'],
|
||||
'image': kwargs['image'].name,
|
||||
'size': kwargs['size'].name,
|
||||
'profile': vm_['profile'],
|
||||
}
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -589,11 +594,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -791,11 +797,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -257,7 +257,8 @@ def create_node(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': data},
|
||||
args={'kwargs': data},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -288,11 +289,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -362,11 +364,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -546,7 +549,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -569,7 +573,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -623,7 +623,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'name': vm_['name']},
|
||||
args={'name': vm_['name']},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -718,11 +719,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -761,7 +763,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -775,7 +778,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -520,11 +520,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -618,11 +619,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
)
|
||||
|
||||
return ret
|
||||
@ -707,7 +709,8 @@ def create_node(vm_, newid):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': newnode},
|
||||
args={'kwargs': newnode},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
)
|
||||
|
||||
log.debug('Preparing to generate a node using these parameters: {0} '.format(
|
||||
@ -825,7 +828,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -850,7 +854,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
if __opts__.get('update_cachedir', False) is True:
|
||||
|
@ -675,11 +675,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -701,7 +702,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': params},
|
||||
args={'kwargs': params},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -749,11 +751,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -883,7 +886,8 @@ def destroy(instance_id, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -898,7 +902,8 @@ def destroy(instance_id, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -212,11 +212,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -232,9 +233,14 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': {'name': kwargs['name'],
|
||||
'image': kwargs['image'].name,
|
||||
'size': kwargs['size'].name}},
|
||||
args={
|
||||
'kwargs': {
|
||||
'name': kwargs['name'],
|
||||
'image': kwargs['image'].name,
|
||||
'size': kwargs['size'].name,
|
||||
}
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -369,11 +375,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -224,11 +224,12 @@ def create(server_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(server_['name']),
|
||||
{
|
||||
args={
|
||||
'name': server_['name'],
|
||||
'profile': server_['profile'],
|
||||
'provider': server_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -253,7 +254,8 @@ def create(server_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(server_['name']),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -317,11 +319,12 @@ def create(server_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(server_['name']),
|
||||
{
|
||||
args={
|
||||
'name': server_['name'],
|
||||
'profile': server_['profile'],
|
||||
'provider': server_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -439,7 +442,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -453,7 +457,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -275,11 +275,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(name),
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -380,7 +381,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(name),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -492,11 +494,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(name),
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -597,7 +600,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -612,7 +616,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
if __opts__.get('update_cachedir', False) is True:
|
||||
|
@ -246,11 +246,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(name),
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -333,7 +334,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(name),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -424,11 +426,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(name),
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -529,7 +532,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -552,7 +556,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
if __opts__.get('update_cachedir', False) is True:
|
||||
|
@ -140,11 +140,12 @@ def create(vm_info):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_info['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_info['name'],
|
||||
'profile': vm_info['profile'],
|
||||
'driver': vm_info['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -158,7 +159,8 @@ def create(vm_info):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_info['name']),
|
||||
request_kwargs,
|
||||
args=request_kwargs,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
vm_result = vb_clone_vm(**request_kwargs)
|
||||
@ -183,7 +185,8 @@ def create(vm_info):
|
||||
'event',
|
||||
'created machine',
|
||||
'salt/cloud/{0}/created'.format(vm_info['name']),
|
||||
vm_result,
|
||||
args=vm_result,
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -311,7 +314,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -321,7 +325,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -2074,7 +2074,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2122,7 +2123,8 @@ def destroy(name, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
if __opts__.get('update_cachedir', False) is True:
|
||||
@ -2163,11 +2165,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2464,7 +2467,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': vm_},
|
||||
args={'kwargs': vm_},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -2538,11 +2542,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return data
|
||||
|
@ -261,11 +261,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -276,7 +277,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': vm_},
|
||||
args={'kwargs': vm_},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -346,11 +348,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return ret
|
||||
@ -479,7 +482,8 @@ def _deploy(vm_):
|
||||
'event',
|
||||
'executing deploy script',
|
||||
'salt/cloud/{0}/deploying'.format(vm_['name']),
|
||||
{'kwargs': deploy_kwargs},
|
||||
args={'kwargs': deploy_kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -647,7 +651,8 @@ def destroy(name, call=None): # pylint: disable=W0613
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -664,7 +669,8 @@ def destroy(name, call=None): # pylint: disable=W0613
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
if __opts__.get('update_cachedir', False) is True:
|
||||
|
@ -245,11 +245,12 @@ def create(vm_):
|
||||
'event',
|
||||
'starting create',
|
||||
'salt/cloud/{0}/creating'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -283,7 +284,8 @@ def create(vm_):
|
||||
'event',
|
||||
'requesting instance',
|
||||
'salt/cloud/{0}/requesting'.format(vm_['name']),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport'],
|
||||
)
|
||||
|
||||
@ -299,7 +301,8 @@ def create(vm_):
|
||||
'event',
|
||||
'instance request failed',
|
||||
'salt/cloud/{0}/requesting/failed'.format(vm_['name']),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport'],
|
||||
)
|
||||
return False
|
||||
@ -317,7 +320,8 @@ def create(vm_):
|
||||
'event',
|
||||
'instance request failed',
|
||||
'salt/cloud/{0}/requesting/failed'.format(vm_['name']),
|
||||
{'kwargs': kwargs},
|
||||
args={'kwargs': kwargs},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport'],
|
||||
)
|
||||
return False
|
||||
@ -378,11 +382,12 @@ def create(vm_):
|
||||
'event',
|
||||
'created instance',
|
||||
'salt/cloud/{0}/created'.format(vm_['name']),
|
||||
{
|
||||
args={
|
||||
'name': vm_['name'],
|
||||
'profile': vm_['profile'],
|
||||
'provider': vm_['driver'],
|
||||
},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
|
@ -346,7 +346,8 @@ def destroy(name, conn=None, call=None):
|
||||
'event',
|
||||
'destroying instance',
|
||||
'salt/cloud/{0}/destroying'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
@ -386,7 +387,8 @@ def destroy(name, conn=None, call=None):
|
||||
'event',
|
||||
'destroyed instance',
|
||||
'salt/cloud/{0}/destroyed'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
if __opts__['delete_sshkeys'] is True:
|
||||
@ -426,7 +428,8 @@ def reboot(name, conn=None):
|
||||
'event',
|
||||
'{0} has been rebooted'.format(name), 'salt-cloud'
|
||||
'salt/cloud/{0}/rebooting'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=__opts__['sock_dir'],
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
return True
|
||||
|
@ -511,7 +511,10 @@ def bootstrap(vm_, opts):
|
||||
'event',
|
||||
'executing deploy script',
|
||||
'salt/cloud/{0}/deploying'.format(vm_['name']),
|
||||
{'kwargs': event_kwargs},
|
||||
args={'kwargs': event_kwargs},
|
||||
sock_dir=opts.get(
|
||||
'sock_dir',
|
||||
os.path.join(syspaths.SOCK_DIR, 'master')),
|
||||
transport=opts.get('transport', 'zeromq')
|
||||
)
|
||||
|
||||
@ -1152,7 +1155,10 @@ def deploy_windows(host,
|
||||
'event',
|
||||
'{0} has been deployed at {1}'.format(name, host),
|
||||
'salt/cloud/{0}/deploy_windows'.format(name),
|
||||
{'name': name},
|
||||
args={'name': name},
|
||||
sock_dir=opts.get(
|
||||
'sock_dir',
|
||||
os.path.join(syspaths.SOCK_DIR, 'master')),
|
||||
transport=opts.get('transport', 'zeromq')
|
||||
)
|
||||
|
||||
@ -1620,10 +1626,13 @@ def deploy_script(host,
|
||||
'event',
|
||||
'{0} has been deployed at {1}'.format(name, host),
|
||||
'salt/cloud/{0}/deploy_script'.format(name),
|
||||
{
|
||||
args={
|
||||
'name': name,
|
||||
'host': host
|
||||
},
|
||||
sock_dir=opts.get(
|
||||
'sock_dir',
|
||||
os.path.join(syspaths.SOCK_DIR, 'master')),
|
||||
transport=opts.get('transport', 'zeromq')
|
||||
)
|
||||
if file_map_fail or file_map_success:
|
||||
@ -1719,6 +1728,11 @@ def run_inline_script(host,
|
||||
def fire_event(key, msg, tag, args=None, sock_dir=None, transport='zeromq'):
|
||||
# Fire deploy action
|
||||
if sock_dir is None:
|
||||
salt.utils.warn_until(
|
||||
'Nitrogen',
|
||||
'`salt.utils.cloud.fire_event` requires that the `sock_dir`'
|
||||
'parameter be passed in when calling the function.'
|
||||
)
|
||||
sock_dir = os.path.join(syspaths.SOCK_DIR, 'master')
|
||||
event = salt.utils.event.get_event(
|
||||
'master',
|
||||
@ -2864,7 +2878,10 @@ def missing_node_cache(prov_dir, node_list, provider, opts):
|
||||
'event',
|
||||
'cached node missing from provider',
|
||||
'salt/cloud/{0}/cache_node_missing'.format(node),
|
||||
{'missing node': node},
|
||||
args={'missing node': node},
|
||||
sock_dir=opts.get(
|
||||
'sock_dir',
|
||||
os.path.join(syspaths.SOCK_DIR, 'master')),
|
||||
transport=opts.get('transport', 'zeromq')
|
||||
)
|
||||
|
||||
@ -2897,7 +2914,10 @@ def diff_node_cache(prov_dir, node, new_data, opts):
|
||||
'event',
|
||||
'new node found',
|
||||
'salt/cloud/{0}/cache_node_new'.format(node),
|
||||
{'new_data': event_data},
|
||||
args={'new_data': event_data},
|
||||
sock_dir=opts.get(
|
||||
'sock_dir',
|
||||
os.path.join(syspaths.SOCK_DIR, 'master')),
|
||||
transport=opts.get('transport', 'zeromq')
|
||||
)
|
||||
return
|
||||
@ -2918,10 +2938,13 @@ def diff_node_cache(prov_dir, node, new_data, opts):
|
||||
'event',
|
||||
'node data differs',
|
||||
'salt/cloud/{0}/cache_node_diff'.format(node),
|
||||
{
|
||||
args={
|
||||
'new_data': _strip_cache_events(new_data, opts),
|
||||
'cache_data': _strip_cache_events(cache_data, opts),
|
||||
},
|
||||
sock_dir=opts.get(
|
||||
'sock_dir',
|
||||
os.path.join(syspaths.SOCK_DIR, 'master')),
|
||||
transport=opts.get('transport', 'zeromq')
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user