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