mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Alias vm_['provider'] references to vm_['driver'] in cloud drivers
This commit is contained in:
parent
10d58d72b6
commit
ea31f530ba
@ -566,6 +566,12 @@ def create(vm_):
|
|||||||
'''
|
'''
|
||||||
Create a single VM from a data dict
|
Create a single VM from a data dict
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
'event',
|
'event',
|
||||||
'starting create',
|
'starting create',
|
||||||
@ -573,7 +579,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
@ -658,7 +664,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
|
@ -303,6 +303,12 @@ def create(vm_):
|
|||||||
'''
|
'''
|
||||||
Create a single VM from a data dict
|
Create a single VM from a data dict
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
'event',
|
'event',
|
||||||
'starting create',
|
'starting create',
|
||||||
@ -310,7 +316,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
@ -459,7 +465,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
|
@ -2100,6 +2100,11 @@ def create(vm_=None, call=None):
|
|||||||
'You cannot create an instance with -a or -f.'
|
'You cannot create an instance with -a or -f.'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
'event',
|
'event',
|
||||||
'starting create',
|
'starting create',
|
||||||
@ -2107,12 +2112,12 @@ def create(vm_=None, call=None):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
salt.utils.cloud.cachedir_index_add(
|
salt.utils.cloud.cachedir_index_add(
|
||||||
vm_['name'], vm_['profile'], 'ec2', vm_['provider']
|
vm_['name'], vm_['profile'], 'ec2', vm_['driver']
|
||||||
)
|
)
|
||||||
|
|
||||||
key_filename = config.get_cloud_config_value(
|
key_filename = config.get_cloud_config_value(
|
||||||
@ -2306,7 +2311,7 @@ def create(vm_=None, call=None):
|
|||||||
event_data = {
|
event_data = {
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
'instance_id': vm_['instance_id'],
|
'instance_id': vm_['instance_id'],
|
||||||
}
|
}
|
||||||
if volumes:
|
if volumes:
|
||||||
@ -2942,7 +2947,12 @@ def list_nodes_full(location=None, call=None):
|
|||||||
|
|
||||||
|
|
||||||
def _vm_provider_driver(vm_):
|
def _vm_provider_driver(vm_):
|
||||||
alias, driver = vm_['provider'].split(':')
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
|
alias, driver = vm_['driver'].split(':')
|
||||||
if alias not in __opts__['providers']:
|
if alias not in __opts__['providers']:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -242,6 +242,12 @@ def create(vm_):
|
|||||||
|
|
||||||
salt-cloud -p profile_name vm_name
|
salt-cloud -p profile_name vm_name
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
key_filename = config.get_cloud_config_value(
|
key_filename = config.get_cloud_config_value(
|
||||||
'private_key', vm_, __opts__, search_global=False, default=None
|
'private_key', vm_, __opts__, search_global=False, default=None
|
||||||
)
|
)
|
||||||
@ -253,7 +259,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
@ -312,7 +318,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
|
@ -399,6 +399,12 @@ def create(vm_):
|
|||||||
'''
|
'''
|
||||||
Create a single VM from a data dict
|
Create a single VM from a data dict
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
'event',
|
'event',
|
||||||
'starting create',
|
'starting create',
|
||||||
@ -406,7 +412,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
@ -654,7 +660,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
|
@ -543,6 +543,11 @@ def create(vm_):
|
|||||||
|
|
||||||
vm_['key_filename'] = key_filename
|
vm_['key_filename'] = key_filename
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
'event',
|
'event',
|
||||||
'starting create',
|
'starting create',
|
||||||
@ -550,7 +555,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
@ -750,7 +755,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
|
@ -284,6 +284,12 @@ def create(vm_):
|
|||||||
'''
|
'''
|
||||||
Create a single VM from a data dict
|
Create a single VM from a data dict
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
'event',
|
'event',
|
||||||
'starting create',
|
'starting create',
|
||||||
@ -291,7 +297,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -493,7 +499,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -270,6 +270,12 @@ def create(vm_):
|
|||||||
'''
|
'''
|
||||||
Create a single VM from a data dict
|
Create a single VM from a data dict
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
'event',
|
'event',
|
||||||
'starting create',
|
'starting create',
|
||||||
@ -277,7 +283,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
@ -456,7 +462,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
|
@ -480,6 +480,12 @@ def create(vm_):
|
|||||||
|
|
||||||
salt-cloud -p proxmox-ubuntu vmhostname
|
salt-cloud -p proxmox-ubuntu vmhostname
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
ret = {}
|
ret = {}
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
@ -489,7 +495,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
@ -675,7 +681,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -638,6 +638,12 @@ def create(vm_):
|
|||||||
salt-cloud -p qingcloud-ubuntu-c1m1 hostname1
|
salt-cloud -p qingcloud-ubuntu-c1m1 hostname1
|
||||||
salt-cloud -m /path/to/mymap.sls -P
|
salt-cloud -m /path/to/mymap.sls -P
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
'event',
|
'event',
|
||||||
'starting create',
|
'starting create',
|
||||||
@ -645,7 +651,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
@ -719,7 +725,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
|
@ -204,6 +204,12 @@ def create(vm_):
|
|||||||
'''
|
'''
|
||||||
Create a single VM from a data dict
|
Create a single VM from a data dict
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Since using "provider: <provider-engine>" is deprecated, alias provider
|
||||||
|
# to use driver: "driver: <provider-engine>"
|
||||||
|
if 'provider' in vm_:
|
||||||
|
vm_['driver'] = vm_.pop('provider')
|
||||||
|
|
||||||
salt.utils.cloud.fire_event(
|
salt.utils.cloud.fire_event(
|
||||||
'event',
|
'event',
|
||||||
'starting create',
|
'starting create',
|
||||||
@ -211,7 +217,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
@ -296,7 +302,7 @@ def create(vm_):
|
|||||||
{
|
{
|
||||||
'name': vm_['name'],
|
'name': vm_['name'],
|
||||||
'profile': vm_['profile'],
|
'profile': vm_['profile'],
|
||||||
'provider': vm_['provider'],
|
'provider': vm_['driver'],
|
||||||
},
|
},
|
||||||
transport=__opts__['transport']
|
transport=__opts__['transport']
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user