autotest: Delete logic around unsupported connectivity class

BUG=chromium:878513
TEST=None

Change-Id: Ibda28e26fcf99cac904db3dab9d85ab145e19bfa
Reviewed-on: https://chromium-review.googlesource.com/1194434
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/global_config.ini b/global_config.ini
index 06181b7..aea04af 100644
--- a/global_config.ini
+++ b/global_config.ini
@@ -250,9 +250,6 @@
 hours_to_wait_for_recovery: 0.01
 
 [AUTOSERV]
-# TODO(akeshet): Eliminate this "option" since, now that we've eliminated
-# paramiko, raw_ssh is the only supported one.
-ssh_engine: raw_ssh
 # Set to True to take advantage of OpenSSH-based connection sharing. This would
 # have bigger performance impact when ssh_engine is 'raw_ssh'.
 enable_master_ssh: True
diff --git a/server/hosts/factory.py b/server/hosts/factory.py
index 1651afa..f31fc2c 100644
--- a/server/hosts/factory.py
+++ b/server/hosts/factory.py
@@ -24,8 +24,6 @@
 
 CONFIG = global_config.global_config
 
-SSH_ENGINE = CONFIG.get_config_value('AUTOSERV', 'ssh_engine', type=str)
-
 # Default ssh options used in creating a host.
 DEFAULT_SSH_USER = 'root'
 DEFAULT_SSH_PASS = ''
@@ -115,8 +113,6 @@
     @returns: Class type of the first host class that returns True to the
               check_host method.
     """
-    # TODO crbug.com/302026 (sbasi) - adjust this pathway for ADBHost in
-    # the future should a host require verify/repair.
     with closing(connectivity_class(hostname, **args)) as host:
         for host_module in host_types:
             if host_module.check_host(host, timeout=10):
@@ -137,14 +133,8 @@
     """
     if (hostname == 'localhost' and ssh_port == DEFAULT_SSH_PORT):
         return local_host.LocalHost
-    # by default assume we're using SSH support
-    elif SSH_ENGINE == 'raw_ssh':
-        return ssh_host.SSHHost
     else:
-        raise error.AutoservError("Unknown SSH engine %s. Please verify the "
-                                  "value of the configuration key 'ssh_engine' "
-                                  "on autotest's global_config.ini file." %
-                                  SSH_ENGINE)
+        return ssh_host.SSHHost
 
 
 # TODO(kevcheng): Update the creation method so it's not a research project
diff --git a/server/hosts/factory_unittest.py b/server/hosts/factory_unittest.py
index 8e1d68c..38bbcc4 100755
--- a/server/hosts/factory_unittest.py
+++ b/server/hosts/factory_unittest.py
@@ -74,7 +74,6 @@
         """Prevent use of real Host and connectivity objects due to potential
         side effects.
         """
-        self._orig_ssh_engine = factory.SSH_ENGINE
         self._orig_types = factory.host_types
         self._orig_dict = factory.OS_HOST_DICT
         self._orig_cros_host = factory.cros_host.CrosHost
@@ -90,7 +89,6 @@
 
     def tearDown(self):
         """Clean up mocks."""
-        factory.SSH_ENGINE = self._orig_ssh_engine
         factory.host_types = self._orig_types
         factory.OS_HOST_DICT = self._orig_dict
         factory.cros_host.CrosHost = self._orig_cros_host
@@ -163,21 +161,11 @@
         """Confirm ssh connectivity class used when configured and hostname
         is not localhost.
         """
-        factory.SSH_ENGINE = 'raw_ssh'
         machine = _gen_machine_dict(hostname='somehost')
         host_obj = factory.create_host(machine)
         self.assertEqual(host_obj._conn_cls_name, 'ssh')
 
 
-    def test_choose_connectivity_unsupported(self):
-        """Confirm exception when configured for unsupported ssh engine.
-        """
-        factory.SSH_ENGINE = 'unsupported'
-        machine = _gen_machine_dict(hostname='somehost')
-        with self.assertRaises(error.AutoservError):
-            factory.create_host(machine)
-
-
     def test_argument_passthrough(self):
         """Confirm that detected and specified arguments are passed through to
         the host object.