summaryrefslogtreecommitdiffstats
path: root/fuel/deploy/ssh_client.py
diff options
context:
space:
mode:
authorSzilard Cserey <szilard.cserey@ericsson.com>2015-05-21 15:57:35 +0200
committerSzilard Cserey <szilard.cserey@ericsson.com>2015-06-17 12:09:30 +0200
commit2654b0628e30f54b0b8e89208ab04204858cfae5 (patch)
treeba385d757efb92f7c8f8b13d55ae6a7c483e9dc4 /fuel/deploy/ssh_client.py
parent321aff98523fbe442af7ca4d935c83e2196eacee (diff)
Fuel Config Reap + Additional Refactoring for Autodeployment
1. Refactor the whole autodeployment code in such a way that the preparation of Fuel VM + networking and the autodeployment itself can be executed all at once 2. Functionality added that allows reaping of Fuel configuration from an existing environment and create DHA and DEA configuration files from it JIRA: [BGS-2] Create Fuel deployment script Change-Id: I7101295ac4becfc5fa10eda757cec0c2ad127940 Signed-off-by: Szilard Cserey <szilard.cserey@ericsson.com>
Diffstat (limited to 'fuel/deploy/ssh_client.py')
-rw-r--r--fuel/deploy/ssh_client.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/fuel/deploy/ssh_client.py b/fuel/deploy/ssh_client.py
index 9ea227a..8bf87bc 100644
--- a/fuel/deploy/ssh_client.py
+++ b/fuel/deploy/ssh_client.py
@@ -6,6 +6,7 @@ TIMEOUT = 600
log = common.log
err = common.err
+
class SSHClient(object):
def __init__(self, host, username, password):
@@ -18,7 +19,8 @@ class SSHClient(object):
self.client = paramiko.SSHClient()
self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
self.client.connect(self.host, username=self.username,
- password=self.password, timeout=timeout)
+ password=self.password, look_for_keys=False,
+ timeout=timeout)
def close(self):
if self.client is not None:
@@ -60,16 +62,14 @@ class SSHClient(object):
if chan.recv_ready():
data = chan.recv(1024)
while data:
- print data
+ log(data.strip())
data = chan.recv(1024)
if chan.recv_stderr_ready():
error_buff = chan.recv_stderr(1024)
while error_buff:
- print error_buff
+ log(error_buff.strip())
error_buff = chan.recv_stderr(1024)
- exit_status = chan.recv_exit_status()
- log('Exit status %s' % exit_status)
def scp_get(self, remote, local='.', dir=False):
try: