mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #25278 from rallytime/fix-25228
Don't require size for all cloud drivers when checking profile configs
This commit is contained in:
commit
e078a6d924
@ -2390,8 +2390,16 @@ def is_profile_configured(opts, provider, profile_name):
|
||||
|
||||
.. versionadded:: Beryllium
|
||||
'''
|
||||
required_keys = ['image', 'provider', 'size']
|
||||
# Standard dict keys required by all drivers.
|
||||
required_keys = ['image', 'provider']
|
||||
alias, driver = provider.split(':')
|
||||
|
||||
# Most drivers need a size, but some do not.
|
||||
non_size_drivers = ['parallels', 'softlayer', 'softlayer_hw']
|
||||
|
||||
if driver not in non_size_drivers:
|
||||
required_keys.append('size')
|
||||
|
||||
provider_key = opts['providers'][alias][driver]
|
||||
profile_key = opts['providers'][alias][driver]['profiles'][profile_name]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user