Introduction to netapi modules¶
netapi modules simply bind to a port and start a service. They are enabled by specifying the name of a netapi module and the port to bind in the master config file.
Communication with Salt and Salt satelite projects is done by passing a list of low-data dictionaries to a client interface. Low-data is a dictionary that specifies the client, the function inside that client to execute, and any additional arguments or parameters.
Client interfaces¶
-
class
saltapi.APIClient(opts)¶ Provide a uniform method of accessing the various client interfaces in Salt in the form of low-data data structures. For example:
>>> client = APIClient(__opts__) >>> lowdata = {'client': 'local', 'tgt': '*', 'fun': 'test.ping', 'arg': ''} >>> client.run(lowdata)
-
local(*args, **kwargs)¶ Wrap LocalClient for running execution modules
-
runner(fun, **kwargs)¶ Wrap RunnerClient for executing runner modules
-
wheel(fun, **kwargs)¶ Wrap Wheel to enable executing wheel modules
-