Merge pull request #12616 from techhat/cloudrunner

Fixing passing kwargs in cloud.create runner
This commit is contained in:
Joseph Hall 2014-05-07 19:00:23 -06:00
commit 7f4fb5d96e
2 changed files with 8 additions and 2 deletions

View File

@ -194,7 +194,9 @@ class CloudClient(object):
opts['show_deploy_args'] = False
opts['script_args'] = ''
# Update it with the passed kwargs
opts.update(kwargs['kwargs'])
if 'kwargs' in kwargs:
opts.update(kwargs['kwargs'])
opts.update(kwargs)
return opts
def low(self, fun, low):

View File

@ -133,6 +133,10 @@ def create(provider, names, **kwargs):
image=ami-1624987f size='Micro Instance' ssh_username=ec2-user \
securitygroup=default delvol_on_destroy=True
'''
create_kwargs = {}
for kwarg in kwargs:
if not kwarg.startswith('__'):
create_kwargs[kwarg] = kwargs[kwarg]
client = _get_client()
info = client.create(provider, names, **kwargs)
info = client.create(provider, names, **create_kwargs)
return info