Revert "suite-scheduler: support config entry models & exclude_models."

This reverts commit 3b9dfb42def2b13f0b02d5ec08b9ce9f1c5bce3a.

Reason for revert: Suites running jobs without specifying model. See b/123499857

Original change's description:
> suite-scheduler: support config entry models & exclude_models.
>
> BUG=chromium:901928
> TEST=Ran unittest.
>
> Change-Id: I71ebfc290a3c67e081eb71abb12cfd9bd231be0c
> Reviewed-on: https://chromium-review.googlesource.com/1395941
> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
> Tested-by: Xixuan Wu <xixuan@chromium.org>
> Reviewed-by: Harpreet Grewal <harpreet@chromium.org>

Bug: chromium:901928
Change-Id: I6c2246071e2aa5f4f44ca0e8bc7348214f56a7fa
Reviewed-on: https://chromium-review.googlesource.com/1454812
Commit-Ready: Harpreet Grewal <harpreet@chromium.org>
Tested-by: Harpreet Grewal <harpreet@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
diff --git a/task.py b/task.py
index 3ad125b..e1454af 100644
--- a/task.py
+++ b/task.py
@@ -454,40 +454,6 @@
     logging.info('Pushing task %r into taskqueue', suite_job_parameters)
     self.is_pushed = True
 
-  def _check_model(self, models_by_board, board, passed_model):
-    """Check whether this task should be run on the passed-in model.
-
-    Args:
-      models_by_board: The mapping from board to its models.
-      board: The board to check whether to run the task.
-      passed_model: the model to check whether to run the task.
-
-    Returns:
-      A list of valid model to run the task.
-    """
-    if passed_model is None:
-      logging.debug('Model is not set. Run the task with empty model.')
-      return [None]
-
-    all_models = models_by_board.get(board, [])
-    if passed_model not in all_models:
-      logging.debug('Model %s is not in valid model list %s', passed_model,
-                    all_models)
-      return []
-
-    full_model_name = build_lib.to_full_model(board, passed_model)
-    if self.exclude_models and full_model_name in self.exclude_models:
-      logging.debug('Model %s is in exclude model list %s', passed_model,
-                    self.exclude_models)
-      return []
-
-    if self.models and full_model_name not in self.models:
-      logging.debug('Model %s is not in support model list %s', passed_model,
-                    self.models)
-      return []
-
-    return [passed_model]
-
   def _check_is_in_skylab(self, skylab_boards, skylab_models, skylab_suites,
                           board, model):
     """Check whether this task should be run in skylab.
@@ -577,16 +543,19 @@
                                            skylab_suites,
                                            board,
                                            passed_model)
+      models = models_by_board.get(board, [None])
 
-      for model in self._check_model(models_by_board, board, passed_model):
-        self._push_suite(
-            board=board,
-            model=model,
-            cros_build=cros_build,
-            firmware_rw_build=firmware_rw_build,
-            firmware_ro_build=firmware_ro_build,
-            test_source_build=test_source_build,
-            is_skylab=is_skylab)
+      for model in models:
+        if ((passed_model is not None and model == passed_model) or
+            passed_model is None):
+          self._push_suite(
+              board=board,
+              model=model,
+              cros_build=cros_build,
+              firmware_rw_build=firmware_rw_build,
+              firmware_ro_build=firmware_ro_build,
+              test_source_build=test_source_build,
+              is_skylab=is_skylab)
 
   def _schedule_launch_control_builds(self, launch_control_builds):
     """Schedule tasks with launch control builds.