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