1 from autotest_lib.server import utils 2 3 4 class InstallableObject(object): 5 """ 6 This class represents a software package that can be installed on 7 a Host. 8 9 Implementation details: 10 This is an abstract class, leaf subclasses must implement the methods 11 listed here. You must not instantiate this class but should 12 instantiate one of those leaf subclasses. 13 """ 14 15 source_material= None 16 17 def __init__(self): 18 super(InstallableObject, self).__init__() 19 20 21 def get(self, location): 22 """ 23 Get the source material required to install the object. 24 25 Through the utils.get() function, the argument passed will be 26 saved in a temporary location on the LocalHost. That location 27 is saved in the source_material attribute. 28 29 Args: 30 location: the path to the source material. This path 31 may be of any type that the utils.get() 32 function will accept. 33 """ 34 self.source_material= utils.get(location) 35 36 37 def install(self, host): 38 pass 39