3a0b184521ca783811d836661ede41b47cfbfcad
[bottlenecks.git] / vstf / vstf / agent / env / driver_plugins / model.py
1 """
2 Created on 2015-9-15
3
4 @author: y00228926
5 """
6 from abc import ABCMeta
7 from abc import abstractmethod
8
9
10 class DriverPlugin:
11     __metaclass__ = ABCMeta
12
13     @abstractmethod
14     def __init__(self):
15         """don't pass in any args for __init__.
16         """
17
18     @abstractmethod
19     def clean(self):
20         """implement this clean function to clean environment before and after calling any other functions.
21         
22         """
23         pass
24
25     @abstractmethod
26     def load(self, drivers):
27         """load driver modules.
28         
29         :param list    drivers:list of modules to be inserted. for example:[ixgbe,vhost_net]
30         
31         """
32         pass
33
34     @abstractmethod
35     def get_supported_drivers(self):
36         """return a list of supported driver modules.
37         """
38         pass