mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Add cmd doc for WheelClient
This commit is contained in:
parent
1fbc5b25e6
commit
565eb46ff5
@ -26,6 +26,15 @@ class WheelClient(mixins.SyncClientMixin, mixins.AsyncClientMixin, object):
|
||||
Salt Master and it must be done using the same user that the Salt Master is
|
||||
running as. Unless :conf_master:`external_auth` is configured and the user
|
||||
is authorized to execute wheel functions: (``@wheel``).
|
||||
|
||||
Usage:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import salt.config
|
||||
import salt.wheel
|
||||
opts = salt.config.master_config('/etc/salt/master')
|
||||
wheel = salt.wheel.WheelClient(opts)
|
||||
'''
|
||||
client = 'wheel'
|
||||
tag_prefix = 'wheel'
|
||||
@ -103,5 +112,15 @@ class WheelClient(mixins.SyncClientMixin, mixins.AsyncClientMixin, object):
|
||||
fun = low.pop('fun')
|
||||
return self.async(fun, low)
|
||||
|
||||
def cmd(self, fun, arg=None, pub_data=None, kwarg=None):
|
||||
'''
|
||||
Execute a function
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> wheel.cmd('key.finger', ['jerry'])
|
||||
{'minions': {'jerry': '5d:f6:79:43:5e:d4:42:3f:57:b8:45:a8:7e:a4:6e:ca'}}
|
||||
'''
|
||||
|
||||
|
||||
Wheel = WheelClient # for backward-compat
|
||||
|
Loading…
Reference in New Issue
Block a user