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

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

Issue 6246035: Merge remote branch 'cros/upstream' into master (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 months 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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
71 args['user'] = ssh_user 71 hostname, args['user'], args['password'], args['port'] = \
72 args['port'] = ssh_port 72 server_utils.parse_machine(hostname, ssh_user, ssh_pass, ssh_port)
73 args['password'] = ssh_pass
74 73
75 # create a custom host class for this machine and return an instance of it 74 # create a custom host class for this machine and return an instance of it
76 host_class = type("%s_host" % hostname, tuple(classes), {}) 75 host_class = type("%s_host" % hostname, tuple(classes), {})
77 host_instance = host_class(hostname, **args) 76 host_instance = host_class(hostname, **args)
78 77
79 # call job_start if this is the first time this host is being used 78 # call job_start if this is the first time this host is being used
80 if hostname not in _started_hostnames: 79 if hostname not in _started_hostnames:
81 host_instance.job_start() 80 host_instance.job_start()
82 _started_hostnames.add(hostname) 81 _started_hostnames.add(hostname)
83 82
84 return host_instance 83 return host_instance
OLDNEW
« cli/job.py ('K') | « server/hosts/abstract_ssh.py ('k') | server/hosts/logfile_monitor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698