mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Further work on __proxy__
This commit is contained in:
parent
85fd6a41c7
commit
1a229c17b2
3 changed files with 17 additions and 4 deletions
|
@ -181,7 +181,6 @@ def minion_mods(
|
|||
utils = {}
|
||||
if proxy is None:
|
||||
proxy = {}
|
||||
|
||||
if not whitelist:
|
||||
whitelist = opts.get('whitelist_modules', None)
|
||||
ret = LazyLoader(_module_dirs(opts, 'modules', 'module'),
|
||||
|
@ -261,6 +260,7 @@ def proxy(opts, functions=None, returners=None, whitelist=None):
|
|||
'''
|
||||
Returns the proxy module for this salt-proxy-minion
|
||||
'''
|
||||
# This is where we should set directories so proxy modules can be loaded from /srv/<something>
|
||||
ret = LazyLoader(_module_dirs(opts, 'proxy', 'proxy'),
|
||||
opts,
|
||||
tag='proxy',
|
||||
|
|
|
@ -2541,9 +2541,9 @@ class ProxyMinion(Minion):
|
|||
proxy_init_fn(self.opts)
|
||||
self.opts['grains'] = salt.loader.grains(self.opts)
|
||||
|
||||
# # Check config 'add_proxymodule_to_opts' Remove this in Boron.
|
||||
# if self.opts['add_proxymodule_to_opts']:
|
||||
# self.opts['proxymodule'] = self.proxy
|
||||
# Check config 'add_proxymodule_to_opts' Remove this in Boron.
|
||||
if self.opts['add_proxymodule_to_opts']:
|
||||
self.opts['proxymodule'] = self.proxy
|
||||
|
||||
self.serial = salt.payload.Serial(self.opts)
|
||||
self.mod_opts = self._prep_mod_opts()
|
||||
|
|
|
@ -44,6 +44,19 @@ def get_all():
|
|||
return __proxy__[proxy_fn]()
|
||||
|
||||
|
||||
def list_():
|
||||
'''
|
||||
Return a list of all available services
|
||||
|
||||
CLI Example:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt '*' service.list
|
||||
'''
|
||||
return get_all()
|
||||
|
||||
|
||||
def list_():
|
||||
'''
|
||||
Return a list of all available services.
|
||||
|
|
Loading…
Add table
Reference in a new issue