mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #26165 from nmadhok/cloud-fix-26164
clonefrom argument should be mandatory instead of image argument for vmware cloud driver.
This commit is contained in:
commit
d0ef023d72
@ -2445,13 +2445,21 @@ def is_profile_configured(opts, provider, profile_name):
|
||||
.. versionadded:: 2015.8.0
|
||||
'''
|
||||
# Standard dict keys required by all drivers.
|
||||
required_keys = ['image', 'provider']
|
||||
required_keys = ['provider']
|
||||
alias, driver = provider.split(':')
|
||||
|
||||
# Most drivers need an image to be specified, but some do not.
|
||||
non_image_drivers = ['vmware']
|
||||
|
||||
# Most drivers need a size, but some do not.
|
||||
non_size_drivers = ['opennebula', 'parallels', 'scaleway', 'softlayer',
|
||||
'softlayer_hw', 'vmware', 'vsphere']
|
||||
|
||||
if driver not in non_image_drivers:
|
||||
required_keys.append('image')
|
||||
elif driver == 'vmware':
|
||||
required_keys.append('clonefrom')
|
||||
|
||||
if driver not in non_size_drivers:
|
||||
required_keys.append('size')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user