This is a simple proxy-minion designed to connect to and communicate with a server that exposes functionality via SSH. This can be used as an option when the device does not provide an api over HTTP and doesn't have the python stack to run a minion.
salt.proxy.ssh_sample.
init
(opts)¶Required. Can be used to initialize the server connection.
salt.proxy.ssh_sample.
package_install
(name, **kwargs)¶Install a "package" on the ssh server
salt.proxy.ssh_sample.
package_list
()¶List "packages" by executing a command via ssh This function is called in response to the salt command
salt.proxy.ssh_sample.
package_remove
(name)¶Remove a "package" on the ssh server
salt.proxy.ssh_sample.
parse
(out)¶Extract json from out.
salt.proxy.ssh_sample.
ping
()¶Required. Ping the device on the other end of the connection
salt.proxy.ssh_sample.
service_list
()¶Start a "service" on the ssh server
2015.8.2 新版功能.
salt.proxy.ssh_sample.
service_restart
(name)¶Restart a "service" on the ssh server
2015.8.2 新版功能.
salt.proxy.ssh_sample.
service_start
(name)¶Start a "service" on the ssh server
2015.8.2 新版功能.
salt.proxy.ssh_sample.
service_stop
(name)¶Stop a "service" on the ssh server
2015.8.2 新版功能.
salt.proxy.ssh_sample.
shutdown
(opts)¶Disconnect