[autotest] Add abstract methods for documentation

Im not quite fond of the "interface" class (Python uses duck typing),
but if were going to have it, may as well make it work correctly.

BUG=chromium:672348
TEST=None

Change-Id: Ic6b4bd0927b239efb14bb8fb905655d8a84ce520
Reviewed-on: https://chromium-review.googlesource.com/453298
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
diff --git a/server/cros/dynamic_suite/control_file_getter.py b/server/cros/dynamic_suite/control_file_getter.py
index bcf192b..f4bed55 100644
--- a/server/cros/dynamic_suite/control_file_getter.py
+++ b/server/cros/dynamic_suite/control_file_getter.py
@@ -2,8 +2,12 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import abc
+import logging
+import os
+import re
+
 import common
-import logging, os, re
 from autotest_lib.client.common_lib import error, utils
 from autotest_lib.client.common_lib.cros import dev_server
 
@@ -16,10 +20,10 @@
     Interface for classes that can list and fetch known control files.
     """
 
-    def __init__(self):
-        pass
+    __metaclass__ = abc.ABCMeta
 
 
+    @abc.abstractmethod
     def get_control_file_list(self, suite_name=''):
         """
         Gather a list of paths to control files.
@@ -31,6 +35,7 @@
         pass
 
 
+    @abc.abstractmethod
     def get_control_file_contents(self, test_path):
         """
         Given a path to a control file, return its contents.
@@ -42,6 +47,7 @@
         pass
 
 
+    @abc.abstractmethod
     def get_control_file_contents_by_name(self, test_name):
         """
         Given the name of a control file, return its contents.
@@ -53,6 +59,11 @@
         pass
 
 
+class SuiteControlFileGetter(ControlFileGetter):
+    """Interface that additionally supports getting by suite."""
+
+
+    @abc.abstractmethod
     def get_suite_info(self, suite_name=''):
         """
         Gather the control paths and contents of all the control files.
@@ -94,6 +105,11 @@
         return self._files
 
 
+    @abc.abstractmethod
+    def _get_control_file_list(self, suite_name=''):
+        pass
+
+
     def get_control_file_contents_by_name(self, test_name):
         """
         Given the name of a control file, return its contents.
@@ -203,7 +219,8 @@
             raise error.ControlFileNotFound(msg)
 
 
-class DevServerGetter(CacheingAndFilteringControlFileGetter):
+class DevServerGetter(CacheingAndFilteringControlFileGetter,
+                      SuiteControlFileGetter):
     """Class that can list and fetch known control files from DevServer.
 
     @var _CONTROL_PATTERN: control file name format to match.