Commit Graph

377 Commits

Author SHA1 Message Date
Tommi Virtanen
7a474b10b1 Use orchesta.remote as a higher-level wrapper, stop worrying about hostnames.
This changes just first caller in a series of many; the rest will change
once a role-based API is in place.
2011-05-31 15:01:41 -07:00
Tommi Virtanen
9970b86cb1 Wrap Remote._runner in staticmethod() or it gets mistaken for a method.
It used to get an extra self argument, and mistook that as client.
2011-05-31 14:59:10 -07:00
Tommi Virtanen
dc9aaacfb2 Add a pretty wrapper on top of Paramiko and run.run.
Most importantly right now, it knows its name, and can
prettyprint it.
2011-05-31 14:33:00 -07:00
Tommi Virtanen
5875f796e6 Remove dead code. 2011-05-31 14:31:53 -07:00
Tommi Virtanen
7d4bb1202b Initial import.
Currently hardcoded to run dbench, not modular, and the remote
execution API is clumsy.
2011-05-31 13:51:48 -07:00
Tommi Virtanen
0566de4979 Let callers specify that some arguments should not be quoted.
This lets you do things such as "test -e /foo && bar" or
"cd /tmp && blah". Remember that shell pipelines do not detect
errors in anything but the last command.
2011-05-24 13:38:05 -07:00
Tommi Virtanen
dad0a67a89 Simple unit tests for shell quoting. 2011-05-24 13:29:32 -07:00
Tommi Virtanen
be28e5bfd8 Refactor to extract shell quoting into utility function. 2011-05-24 13:27:39 -07:00
Tommi Virtanen
1a459dd7fe Depend on Paramiko 1.7.7 or newer to be able to read modern OpenSSH keys. 2011-05-24 13:16:47 -07:00
Tommi Virtanen
37c94af8a7 Pyflakes cleanup. 2011-05-24 13:12:21 -07:00
Tommi Virtanen
5d5b179565 Add a utility function run.wait to wait for processes to exit. 2011-05-24 13:07:24 -07:00
Tommi Virtanen
073a4bbc18 Paramiko ChannelFile.close() didn't actually close the remote stdin.
Add a wrapper that does the calls shutdown on the channel itself,
to actually cause EOF. Add integration test using remote cat.

Move shuffling stdout bytes to background, so run.run returns before
seeing EOF on stdout, and thus actually making the stdin useful.
Similarly, don't wait for EOF on stderr before returning from run.run.
2011-05-24 13:06:00 -07:00
Tommi Virtanen
6dd4774f0a Log debug info of commands actually executed. 2011-05-24 13:01:46 -07:00
Tommi Virtanen
9c42fe6bbf Cleanup dead code. 2011-05-24 13:01:03 -07:00
Tommi Virtanen
f10668f53f Allow easy writing to stdin of remote processes. 2011-05-24 13:00:44 -07:00
Tommi Virtanen
f8f6bed680 Add run.run option wait, this will make handling stdin easier soon. 2011-05-19 15:10:04 -07:00
Tommi Virtanen
93c2e17c01 Return a structured result from run.run, to make capturing stdout/stderr easier. 2011-05-19 13:47:09 -07:00
Tommi Virtanen
9a5c959bc8 Add integration tests for signals and connection loss. 2011-05-19 13:27:32 -07:00
Tommi Virtanen
df84f4e052 Check for errors on remote commands. 2011-05-19 13:05:14 -07:00
Tommi Virtanen
87d7192c89 Add setup.py, install in devel mode into virtualenv. 2011-05-19 12:17:28 -07:00
Tommi Virtanen
492fa48893 Don't close file after copying stdout/stderr to it.
If a caller uses StringIO to capture the output, they
cannot call .getvalue() after the close.

This also lets you collect multiple command outputs
into the same file.
2011-05-19 12:16:43 -07:00
Tommi Virtanen
37df5b1c39 Refactor remote running to support more use cases. 2011-05-19 10:20:32 -07:00
Tommi Virtanen
5bfcec265b Add debug logging to monkeypatching. 2011-05-19 10:19:16 -07:00
Tommi Virtanen
1ed70d78d8 Silence paramiko transport logging. 2011-05-19 10:18:57 -07:00
Tommi Virtanen
b397eb5d91 Silence a Paramiko crypto deprecation. 2011-05-19 10:17:51 -07:00
Tommi Virtanen
85a28a23da Make monkeypatching respect order. 2011-05-19 10:17:03 -07:00
Tommi Virtanen
0535e4df08 Initial import 2011-05-18 14:46:49 -07:00