From fbac78cb5277b044f3318c831d4da92663097a6c Mon Sep 17 00:00:00 2001 From: Szilard Cserey Date: Wed, 17 Jun 2015 12:14:54 +0200 Subject: 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 --- fuel/deploy/ssh_client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fuel/deploy/ssh_client.py') 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: -- cgit 1.2.3-korg