add notes to the docs

This commit is contained in:
Daniel Wallace 2018-06-28 13:36:37 -05:00
parent a21aacba74
commit 068cc84e9c
No known key found for this signature in database
GPG Key ID: 5FA5E5544F010D48
2 changed files with 13 additions and 3 deletions

View File

@ -88,6 +88,12 @@ Salt Caller
.. autoclass:: salt.client.Caller
:members: cmd
Salt Proxy Caller
-----------
.. autoclass:: salt.client.ProxyCaller
:members: cmd
RunnerClient
------------

View File

@ -2009,9 +2009,6 @@ class ProxyCaller(object):
``'local'``. The same can be achieved at the Python level by including that
setting in a minion config file.
.. versionadded:: 2014.7.0
Pass the minion config as the ``mopts`` dictionary.
.. code-block:: python
import salt.client
@ -2019,6 +2016,13 @@ class ProxyCaller(object):
__opts__ = salt.config.proxy_config('/etc/salt/proxy', minion_id='quirky_edison')
__opts__['file_client'] = 'local'
caller = salt.client.ProxyCaller(mopts=__opts__)
.. note::
To use this for calling proxies, the :py:func:`is_proxy functions
<salt.utils.platform.is_proxy>` requires that ``--proxyid`` be an
argument on the commandline for the script this is used in, or that the
string ``proxy`` is in the name of the script.
'''
def __init__(self, c_path=os.path.join(syspaths.CONFIG_DIR, 'proxy'), mopts=None):
# Late-import of the minion module to keep the CLI as light as possible