marvin: remoteSSHclient logs Adding logging for commands sent, and executed with results returned frmo the remote host.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fb5ea25a Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fb5ea25a Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fb5ea25a Branch: refs/heads/ui-plugins Commit: fb5ea25a4d50f4530fcf535d66d7b38e53612e00 Parents: 6f29317 Author: Prasanna Santhanam <[email protected]> Authored: Thu Dec 13 15:57:59 2012 -0800 Committer: Prasanna Santhanam <[email protected]> Committed: Thu Dec 13 15:58:36 2012 -0800 ---------------------------------------------------------------------- tools/marvin/marvin/remoteSSHClient.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fb5ea25a/tools/marvin/marvin/remoteSSHClient.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/remoteSSHClient.py b/tools/marvin/marvin/remoteSSHClient.py index 036e1c3..24ba0fe 100644 --- a/tools/marvin/marvin/remoteSSHClient.py +++ b/tools/marvin/marvin/remoteSSHClient.py @@ -19,6 +19,7 @@ import paramiko import time import cloudstackException import contextlib +import logging from contextlib import closing class remoteSSHClient(object): @@ -34,6 +35,7 @@ class remoteSSHClient(object): while True: try: self.ssh.connect(str(host),int(port), user, passwd) + logging.debug("[SSHClient] connecting to server %s @ port % with user:passwd %s:%s"%(str(host), port, user, passwd)) except paramiko.SSHException, sshex: if retry_count == 0: raise cloudstackException.InvalidParameterException(repr(sshex)) @@ -46,6 +48,7 @@ class remoteSSHClient(object): def execute(self, command): stdin, stdout, stderr = self.ssh.exec_command(command) + logging.debug("[SSHClient] sending command %s to host"%(command, str(self.host))) output = stdout.readlines() errors = stderr.readlines() results = [] @@ -57,7 +60,7 @@ class remoteSSHClient(object): else: for strOut in output: results.append(strOut.rstrip()) - + logging.debug("[SSHClient] command %s returned %s"%(command, results)) return results def scp(self, srcFile, destPath):
