diff options
Diffstat (limited to 'functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py')
-rw-r--r-- | functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py b/functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py index c5f554cbd..269f6526b 100644 --- a/functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py +++ b/functest/opnfv_tests/vnf/router/vnf_controller/ssh_client.py @@ -24,7 +24,7 @@ DEFAULT_CONNECT_RETRY_COUNT = 10 DEFAULT_SEND_TIMEOUT = 10 -class SshClient(object): # pylint: disable=too-many-instance-attributes +class SshClient(): # pylint: disable=too-many-instance-attributes """ssh client class for vrouter testing""" logger = logging.getLogger(__name__) @@ -43,7 +43,7 @@ class SshClient(object): # pylint: disable=too-many-instance-attributes self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.util = Utilvnf() - with open(self.util.test_env_config_yaml) as file_fd: + with open(self.util.test_env_config_yaml, encoding='utf-8') as file_fd: test_env_config_yaml = yaml.safe_load(file_fd) file_fd.close() @@ -80,7 +80,7 @@ class SshClient(object): # pylint: disable=too-many-instance-attributes retrycount -= 1 if retrycount == 0: - self.logger.warn( + self.logger.warning( "Cannot establish connection to IP '%s'", self.ip_address) self.connected = False return self.connected @@ -110,7 +110,7 @@ class SshClient(object): # pylint: disable=too-many-instance-attributes cmd) break - res_buff += res + res_buff += res.decode("utf-8") self.logger.debug("Response : '%s'", res_buff) return res_buff |