From 1e62d0f9bf9524ddbdd285ff9a8a8fb6599313db Mon Sep 17 00:00:00 2001 From: Daniel Wallace Date: Tue, 20 May 2014 18:31:33 -0500 Subject: [PATCH] format the profiles like salt-cloud is expecting them inside the provider. --- salt/cloud/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/salt/cloud/__init__.py b/salt/cloud/__init__.py index b008a433d4..b4313d2aad 100644 --- a/salt/cloud/__init__.py +++ b/salt/cloud/__init__.py @@ -5,7 +5,7 @@ correct cloud modules ''' # Import python libs -from __future__ import print_function +from __future__ import print_function, generators import copy import os import traceback @@ -179,8 +179,9 @@ class CloudClient(object): if pillars: self.opts['profiles'].update(pillars.pop('profiles', {})) - self.opts['providers'].update(pillars.pop('providers', {})) - slef.opts.update(pillars) + for name, provider in pillars.pop('providers', {}).items(): + self.opts['providers'].update({name: {provider['provider']: provider}}) + self.opts.update(pillars) def _opts_defaults(self, **kwargs): '''