Skip to content

Commit

Permalink
Merge pull request #25278 from rallytime/fix-25228
Browse files Browse the repository at this point in the history
Don't require size for all cloud drivers when checking profile configs
  • Loading branch information
techhat committed Jul 9, 2015
2 parents 84ce602 + 3579709 commit e078a6d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion salt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit e078a6d

Please sign in to comment.