From 62ca7c0c367ecca39807fc3f5000ed3513e11f88 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 30 Jan 2020 19:02:03 +0000 Subject: [PATCH] fw/SSHConnection: Deprecated parameters for Parimiko implementation Deprecate parameters for the new implementation of the SSHConnection based on Parimiko. --- wa/framework/configuration/core.py | 2 +- wa/framework/target/descriptor.py | 36 ++++++++++++++++++------------ 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/wa/framework/configuration/core.py b/wa/framework/configuration/core.py index d393e09d..435b17be 100644 --- a/wa/framework/configuration/core.py +++ b/wa/framework/configuration/core.py @@ -314,7 +314,7 @@ class ConfigurationPoint(object): def validate(self, obj, check_mandatory=True): value = getattr(obj, self.name, None) if self.deprecated: - msg = 'Depreciated parameter supplied for "{}" in "{}". Config will be ignored.' + msg = 'Depreciated parameter supplied for "{}" in "{}". The value will be ignored.' logger.warning(msg.format(self.name, obj.name)) return if value is not None: diff --git a/wa/framework/target/descriptor.py b/wa/framework/target/descriptor.py index 80460697..af4c3d2e 100644 --- a/wa/framework/target/descriptor.py +++ b/wa/framework/target/descriptor.py @@ -332,21 +332,10 @@ CONNECTION_PARAMS = { The port SSH server is listening on on the target. """), Parameter( - 'telnet', kind=bool, default=False, + 'strict_host_check', kind=bool, default=True, description=""" - If set to ``True``, a Telnet connection, rather than - SSH will be used. - """), - Parameter( - 'password_prompt', kind=str, - description=""" - Password prompt to expect - """), - Parameter( - 'original_prompt', kind=str, - description=""" - Original shell prompt to expect. - """), + Specify whether devices should be connected to if + their host key does not match the systems known host keys. """), Parameter( 'sudo_cmd', kind=str, default="sudo -- sh -c {}", @@ -355,6 +344,25 @@ CONNECTION_PARAMS = { somewhere in the string it indicate where the command to be run via sudo is to go. """), + # Depreciated Parameters + Parameter( + 'telnet', kind=str, + description=""" + Original shell prompt to expect. + """, + deprecated=True), + Parameter( + 'password_prompt', kind=str, + description=""" + Password prompt to expect + """, + deprecated=True), + Parameter( + 'original_prompt', kind=str, + description=""" + Original shell prompt to expect. + """, + deprecated=True), ], Gem5Connection: [ Parameter(