Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API module to enable easier use of PSSH as a library (patch included) #100

Open
GoogleCodeExporter opened this issue Mar 10, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Patch file includes an API entrypoint in psshlib.api:

api.py has convencience wrappers for call, copy and slurp. These
are easy-to-use programmatic versions of pssh, pscp and pslurp.

Exposes an API for performing parallel SSH operations.

Three commands are supplied:

psshlib.api.call(hosts, cmdline, opts)

psshlib.api.copy(hosts, src, dst, opts)

psshlib.api.slurp(hosts, src, dst, opts)

call returns {host: (rc, stdout, stdin) | error}
copy returns {host: path | error}
slurp returns {host: path | error}

error is an error object which has an error message (or more)

opts is command line options as given to pssh/pscp/pslurp

call: Executes the given command on a set of hosts, collecting the output
copy: Copies files from the local machine to a set of remote hosts
slurp: Copies files from a set of remote hosts to local folders

Original issue reported on code.google.com by deceive...@gmail.com on 27 May 2014 at 12:59

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant