Return-Path: Delivered-To: apmail-incubator-libcloud-archive@minotaur.apache.org Received: (qmail 28309 invoked from network); 8 Nov 2010 02:52:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Nov 2010 02:52:06 -0000 Received: (qmail 33755 invoked by uid 500); 8 Nov 2010 02:52:37 -0000 Delivered-To: apmail-incubator-libcloud-archive@incubator.apache.org Received: (qmail 33623 invoked by uid 500); 8 Nov 2010 02:52:37 -0000 Mailing-List: contact libcloud-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: libcloud@incubator.apache.org Delivered-To: mailing list libcloud@incubator.apache.org Received: (qmail 33606 invoked by uid 99); 8 Nov 2010 02:52:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Nov 2010 02:52:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mnot@mnot.net designates 216.86.168.183 as permitted sender) Received: from [216.86.168.183] (HELO mxout-08.mxes.net) (216.86.168.183) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Nov 2010 02:52:31 +0000 Received: from host9027e4f94482.mnot.net (unknown [118.209.39.135]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id B0BF6509D9 for ; Sun, 7 Nov 2010 21:52:09 -0500 (EST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1081) From: Mark Nottingham In-Reply-To: Date: Mon, 8 Nov 2010 13:52:06 +1100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: libcloud@incubator.apache.org X-Mailer: Apple Mail (2.1081) Subject: Re: [libcloud] Hello, and getting STDOUT/STDERR/return from deployment tasks Ok. I'm going with this for the time being... class DebugScriptDeployment(ScriptDeployment): def run(self, node, client): o =3D ScriptDeployment.run(self, node, client) sys.stdout.write(self.stdout) sys.stderr.write(self.stderr) if self.exit_status !=3D 0: die("*** FATAL.") return o Thanks Toma=9E and Paul. P.S. Any chance of getting stderr & stdout as streams? On 08/11/2010, at 12:46 PM, Paul Querna wrote: > sd =3D ScriptDeployment(...) > .... # run it >=20 > print sd.stdout > print sd.stderr > print sd.exit_status >=20 > All work in 0.4.0. >=20 > They are just not documented. (we should fix that :) ) >=20 > 2010/11/7 Toma=9E Muraus : >> Hello, >>=20 >> Currently only the https/https connection logging is available if you = set >> the LIBCLOUD_DEBUG environment variable. >>=20 >> Deployment stdout and stderr is currently not logged, but you can = access it >> by sub-classing the ScriptDeployment and overriding the run method = (stdout >> is available in the self.stdout variable and stderr in self.stderr). >>=20 >> On Mon, Nov 8, 2010 at 2:15 AM, Mark Nottingham = wrote: >>=20 >>> Hi, >>>=20 >>> I've just started to play with libcloud, to replace a mass of shell = scripts >>> I've been using to bring hosts up. >>>=20 >>> So far so good, but AFAICT the output of ScriptDeployment() isn't = made >>> available anywhere; this would be useful for debugging, testing, and = just >>> generally seeing what the hell is going on. Is it available, or is = this a >>> feature request? >>>=20 >>> Cheers, >>>=20 >>> P.S. Documenting the requirement for paramiko somewhere would be = helpful. >>>=20 >>> -- >>> Mark Nottingham http://www.mnot.net/ >>>=20 >>>=20 >>>=20 >>>=20 >>=20 -- Mark Nottingham http://www.mnot.net/