blob: bfb8a472c7b89ca17efe44fe3984fe925b914c36 [file] [log] [blame]
mbligh6c01a5a2008-07-09 23:30:59 +00001from autotest_lib.server import utils
mblighdcd57a82007-07-11 23:06:47 +00002
3
4class InstallableObject(object):
jadmanski0afbb632008-06-06 21:10:57 +00005 """
6 This class represents a software package that can be installed on
7 a Host.
mblighdc735a22007-08-02 16:54:37 +00008
jadmanski0afbb632008-06-06 21:10:57 +00009 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 """
mblighdc735a22007-08-02 16:54:37 +000014
jadmanski0afbb632008-06-06 21:10:57 +000015 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