Merge pull request #44781 from cloudflare/thorium-fix-41869

Correct the thorium runner
This commit is contained in:
Thomas S Hatch 2017-12-01 15:55:51 -07:00 committed by GitHub
commit 8ed6287762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ import salt.runner
def cmd(
name,
fun=None,
func=None,
arg=(),
**kwargs):
'''
@ -22,14 +22,14 @@ def cmd(
run_cloud:
runner.cmd:
- fun: cloud.create
- func: cloud.create
- arg:
- my-ec2-config
- myinstance
run_cloud:
runner.cmd:
- fun: cloud.create
- func: cloud.create
- kwargs:
provider: my-ec2-config
instances: myinstance
@ -38,11 +38,16 @@ def cmd(
'changes': {},
'comment': '',
'result': True}
if fun is None:
fun = name
client = salt.runner.RunnerClient(__opts__)
low = {'fun': fun,
if func is None:
func = name
local_opts = {}
local_opts.update(__opts__)
local_opts['async'] = True # ensure this will be run async
local_opts.update({
'fun': func,
'arg': arg,
'kwargs': kwargs}
client.cmd_async(low)
'kwarg': kwargs
})
runner = salt.runner.Runner(local_opts)
runner.run()
return ret