From 31f4c0fd5f9c66607743e418cab3ce0366726c04 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 30 Jan 2020 19:02:38 +0000 Subject: [PATCH] fw/descriptor: Add parameter list for Telenet connections. `TelnetConnection` no longer uses the same parameter list as `SSHConnection` so create it's own parameter list. --- wa/framework/target/descriptor.py | 42 ++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/wa/framework/target/descriptor.py b/wa/framework/target/descriptor.py index af4c3d2e..ab91536a 100644 --- a/wa/framework/target/descriptor.py +++ b/wa/framework/target/descriptor.py @@ -20,7 +20,7 @@ from copy import copy from devlib import (LinuxTarget, AndroidTarget, LocalLinuxTarget, ChromeOsTarget, Platform, Juno, TC2, Gem5SimulationPlatform, AdbConnection, SshConnection, LocalConnection, - Gem5Connection) + TelnetConnection, Gem5Connection) from devlib.target import DEFAULT_SHELL_PROMPT from wa.framework import pluginloader @@ -364,6 +364,46 @@ CONNECTION_PARAMS = { """, deprecated=True), ], + TelnetConnection: [ + Parameter( + 'host', kind=str, mandatory=True, + description=""" + Host name or IP address of the target. + """), + Parameter( + 'username', kind=str, mandatory=True, + description=""" + User name to connect with + """), + Parameter( + 'password', kind=str, + description=""" + Password to use. + """), + Parameter( + 'port', kind=int, + description=""" + The port SSH server is listening on on the target. + """), + Parameter( + 'password_prompt', kind=str, + description=""" + Password prompt to expect + """), + Parameter( + 'original_prompt', kind=str, + description=""" + Original shell prompt to expect. + """), + Parameter( + 'sudo_cmd', kind=str, + default="sudo -- sh -c {}", + description=""" + Sudo command to use. Must have ``{}`` specified + somewhere in the string it indicate where the command + to be run via sudo is to go. + """), + ], Gem5Connection: [ Parameter( 'host', kind=str, mandatory=False,