Merge pull request #22990 from techhat/2014.7

Use the proper cloud conf variable
This commit is contained in:
Nicole Thomas 2015-04-23 11:48:07 -06:00
commit 27dc877bfd

View File

@ -1282,8 +1282,13 @@ class Cloud(object):
if not vm_overrides:
vm_overrides = {}
with salt.utils.fopen(os.path.join(salt.syspaths.CONFIG_DIR, 'cloud'), 'r') as mcc:
main_cloud_config = yaml.safe_load(mcc)
try:
with salt.utils.fopen(self.opts['conf_file'], 'r') as mcc:
main_cloud_config = yaml.safe_load(mcc)
except KeyError:
main_cloud_config = {}
except IOError:
main_cloud_config = {}
profile_details = self.opts['profiles'][profile]
alias, driver = profile_details['provider'].split(':')