• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright 2007 Google Inc. Released under the GPL v2
3
4"""This is a convenience module to import all available types of hosts.
5
6Implementation details:
7You should 'import hosts' instead of importing every available host module.
8"""
9
10try:
11    # host abstract classes
12    from autotest_lib.server.hosts.base_classes import Host
13    from autotest_lib.server.hosts.remote import RemoteHost
14
15    # host implementation classes
16    from autotest_lib.server.hosts.ssh_host import SSHHost
17    from autotest_lib.server.hosts.cros_host import CrosHost
18    from autotest_lib.server.hosts.chameleon_host import ChameleonHost
19    from autotest_lib.server.hosts.servo_host import ServoHost
20    from autotest_lib.server.hosts.labstation_host import LabstationHost
21
22    # factory function
23    from autotest_lib.server.hosts.factory import create_host
24    from autotest_lib.server.hosts.factory import create_target_machine
25except ImportError:
26    # host abstract classes
27    from base_classes import Host
28    from remote import RemoteHost
29
30    # host implementation classes
31    from ssh_host import SSHHost
32    from cros_host import CrosHost
33    from chameleon_host import ChameleonHost
34    from servo_host import ServoHost
35    from labstation_host import LabstationHost
36
37    # factory function
38    from factory import create_host
39    from factory import create_target_machine
40