From: Evan Broder Date: Mon, 10 Nov 2008 20:20:04 +0000 (-0500) Subject: Move invirt.remote Python module to invirt-remote-server X-Git-Tag: 0.0.7^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-base.git/commitdiff_plain/716a4ba7f6de4ab077eb606e4fb4ab6c9498d145 Move invirt.remote Python module to invirt-remote-server svn path=/trunk/packages/invirt-base/; revision=1597 --- diff --git a/debian/changelog b/debian/changelog index 3cfd685..294a2c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-base (0.0.7) unstable; urgency=low + + * Move invirt.remote module to invirt-remote-server package + + -- Evan Broder Mon, 10 Nov 2008 15:15:29 -0500 + invirt-base (0.0.6) unstable; urgency=low * Depend on invirt-mail-config on all servers diff --git a/python/invirt/remote.py b/python/invirt/remote.py deleted file mode 100644 index 0d7dba2..0000000 --- a/python/invirt/remote.py +++ /dev/null @@ -1,19 +0,0 @@ -from subprocess import PIPE, Popen -from invirt.config import structs as config -import yaml - -def bcast(cmd, hosts = [h.hostname for h in config.hosts]): - """ - Given a command and a list of hostnames or IPs, issue the command to all - the nodes and return a list of (host, output) pairs (the order should be - the same as the order of the hosts). - """ - pipes = [(host, - Popen(['remctl', host, 'remote', 'web', cmd], stdout=PIPE)) - for host in hosts] - outputs = [(s, p.communicate()[0]) for (s, p) in pipes] - for (s, p) in pipes: - if p.returncode != 0: - raise RuntimeError("remctl to host %s returned non-zero exit status %d" - % (s, p.returncode)) - return [(s, yaml.load(o, yaml.CSafeLoader)) for (s, o) in outputs]