Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: server/hosts/factory.py

Issue 5102010: Passing SSH-options for server tests. (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | server/hosts/ssh_host.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 from autotest_lib.client.common_lib import utils, error, global_config 1 from autotest_lib.client.common_lib import utils, error, global_config
2 from autotest_lib.server import autotest, utils as server_utils 2 from autotest_lib.server import autotest, utils as server_utils
3 from autotest_lib.server.hosts import site_factory, ssh_host, serial 3 from autotest_lib.server.hosts import site_factory, ssh_host, serial
4 from autotest_lib.server.hosts import logfile_monitor 4 from autotest_lib.server.hosts import logfile_monitor
5 5
6 DEFAULT_FOLLOW_PATH = '/var/log/kern.log' 6 DEFAULT_FOLLOW_PATH = '/var/log/kern.log'
7 DEFAULT_PATTERNS_PATH = 'console_patterns' 7 DEFAULT_PATTERNS_PATH = 'console_patterns'
8 SSH_ENGINE = global_config.global_config.get_config_value('AUTOSERV', 8 SSH_ENGINE = global_config.global_config.get_config_value('AUTOSERV',
9 'ssh_engine', 9 'ssh_engine',
10 type=str) 10 type=str)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 classes.append(logfile_monitor_class) 60 classes.append(logfile_monitor_class)
61 61
62 elif follow_paths: 62 elif follow_paths:
63 logfile_monitor_class = logfile_monitor.NewLogfileMonitorMixin( 63 logfile_monitor_class = logfile_monitor.NewLogfileMonitorMixin(
64 follow_paths, pattern_paths) 64 follow_paths, pattern_paths)
65 classes.append(logfile_monitor_class) 65 classes.append(logfile_monitor_class)
66 66
67 # do any site-specific processing of the classes list 67 # do any site-specific processing of the classes list
68 site_factory.postprocess_classes(classes, hostname, 68 site_factory.postprocess_classes(classes, hostname,
69 auto_monitor=auto_monitor, **args) 69 auto_monitor=auto_monitor, **args)
70 70
truty 2010/11/23 20:07:26 These are sort of magical since they're injected b
71 args['user'] = ssh_user
72 args['port'] = ssh_port
73 args['password'] = ssh_pass
74
71 # create a custom host class for this machine and return an instance of it 75 # create a custom host class for this machine and return an instance of it
72 host_class = type("%s_host" % hostname, tuple(classes), {}) 76 host_class = type("%s_host" % hostname, tuple(classes), {})
73 host_instance = host_class(hostname, **args) 77 host_instance = host_class(hostname, **args)
74 78
75 # call job_start if this is the first time this host is being used 79 # call job_start if this is the first time this host is being used
76 if hostname not in _started_hostnames: 80 if hostname not in _started_hostnames:
77 host_instance.job_start() 81 host_instance.job_start()
78 _started_hostnames.add(hostname) 82 _started_hostnames.add(hostname)
79 83
80 return host_instance 84 return host_instance
OLDNEW
« no previous file with comments | « no previous file | server/hosts/ssh_host.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698