Add runner loading interface for the loader

This commit is contained in:
Thomas S Hatch 2011-06-02 21:56:40 -06:00
parent e674d17f46
commit 6f84763099

View File

@ -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):
''' '''