mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Add runner loading interface for the loader
This commit is contained in:
parent
e674d17f46
commit
6f84763099
@ -78,6 +78,16 @@ def call(fun, args=[], dirs=[]):
|
|||||||
load = Loader(module_dirs)
|
load = Loader(module_dirs)
|
||||||
return load.call(fun, args)
|
return load.call(fun, args)
|
||||||
|
|
||||||
|
def runner(opts):
|
||||||
|
'''
|
||||||
|
Directly call a function inside a loader directory
|
||||||
|
'''
|
||||||
|
module_dirs = [
|
||||||
|
os.path.join(distutils.sysconfig.get_python_lib(), 'salt/runners'),
|
||||||
|
] + dirs
|
||||||
|
load = Loader(module_dirs, opts)
|
||||||
|
return load.gen_functions()
|
||||||
|
|
||||||
|
|
||||||
class Loader(object):
|
class Loader(object):
|
||||||
'''
|
'''
|
||||||
|
Loading…
Reference in New Issue
Block a user