shelldonGuo / parallel-ssh

Automatically exported from code.google.com/p/parallel-ssh
Other
0 stars 0 forks source link

Use parallel-ssh as Python Library, and retrieve stdout/stderr as well as exit code trivially #73

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be great to make parallel-ssh work well as a module, i.e.

* Allow it to be 'imported' without any errors printed
* Allow for options such as username, host and so on to be passed with a 
sensible API
* Provide a nice way to get not just the exit code but also stdout/err

Original issue reported on code.google.com by a...@davz.net on 10 Jul 2012 at 8:15

GoogleCodeExporter commented 9 years ago
We've had a few discussions on the mailing list about this. Right now you can 
do `import psshlib` without any errors printed (at least on my system), and 
there's a mildly sensible API. I am very open about any suggestions about how 
to improve the API. This is the sort of thing that gets driven by individual 
use cases, so feel free to share what's convenient or inconvenient as you use 
psshlib in practice.

Original comment by amcna...@gmail.com on 27 Sep 2012 at 3:29

GoogleCodeExporter commented 9 years ago
Hi, I have started work on creating a programmatic API interface to psshlib, 
maybe you are interested or have comments/suggestions for how it could be 
improved. I'm trying to separate the command-line-tool specific parts like 
option parsing and output printing into modules that can be replaced in a 
programmatic use case.

The code is here: https://github.com/krig/parallel-ssh

Original comment by deceive...@gmail.com on 9 Jan 2014 at 10:06

GoogleCodeExporter commented 9 years ago
This sounds really interesting. I won't be able to take a look today, but I 
would love to see what you've done.

PSSH is already more programmatically accessible than it used to be--the main 
reason we haven't made more progress is because we haven't yet had a developer 
really need it and contribute.

Original comment by amcn...@google.com on 9 Jan 2014 at 2:28

GoogleCodeExporter commented 9 years ago
I have been developing this further and still have some things I want to fix, 
for example giving the user of the API more control over how errors are handled 
and reported. I'll let you know when I consider my changes to be in a more 
stable state. :)

Original comment by deceive...@gmail.com on 16 Jan 2014 at 8:47