From f2ebfe019e1ead6172712ec804b241cf0dc5a800 Mon Sep 17 00:00:00 2001 From: Gaurav Aradhye Date: Sun, 18 May 2014 21:25:29 -0400 Subject: [PATCH] CLOUDSTACK-6612: Resolved issue with sshClient.py --- tools/marvin/marvin/config/test_data.py | 2 +- tools/marvin/marvin/sshClient.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py index 026f5ff5592..9df3f2f060d 100644 --- a/tools/marvin/marvin/config/test_data.py +++ b/tools/marvin/marvin/config/test_data.py @@ -617,7 +617,7 @@ test_data = { }, "natrule": { "privateport": 22, - "publicport": 2222, + "publicport": 22, "protocol": "TCP" }, "lbrule": { diff --git a/tools/marvin/marvin/sshClient.py b/tools/marvin/marvin/sshClient.py index 76f3b6dd597..df2eeee1d4c 100644 --- a/tools/marvin/marvin/sshClient.py +++ b/tools/marvin/marvin/sshClient.py @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. -import paramiko from paramiko import (BadHostKeyException, AuthenticationException, SSHException, @@ -32,9 +31,8 @@ from marvin.cloudstackException import ( import contextlib import logging from marvin.codes import ( - SUCCESS, FAILED, INVALID_INPUT, EXCEPTION_OCCURRED + SUCCESS, FAILED, INVALID_INPUT ) -from contextlib import closing class SshClient(object): @@ -152,9 +150,9 @@ class SshClient(object): self.logger.\ exception("SshClient: Exception under " "createConnection: %s" % except_msg) - self.retryCnt = self.retryCnt - 1 + self.retryCnt -= 1 time.sleep(self.delay) - return ret + return ret def runCommand(self, command): '''