summaryrefslogtreecommitdiffstats
path: root/fuel/deploy/ssh_client.py
diff options
context:
space:
mode:
authorSzilard Cserey <szilard.cserey@ericsson.com>2015-06-17 12:14:54 +0200
committerSzilard Cserey <szilard.cserey@ericsson.com>2015-06-17 12:15:49 +0200
commitfbac78cb5277b044f3318c831d4da92663097a6c (patch)
tree3fc5b70bfc68977159f39ca663252be3ab8ab07c /fuel/deploy/ssh_client.py
parenteb887812da568cfb4908f6ae14449b2ceaeb5bc0 (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: Ia22ae9b050085aaa4cadb4ee6c7bfd556c4bc18a 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: