Merge "Change PTL informatin in INFO"
[bottlenecks.git] / testsuites / vstf / vstf_scripts / vstf / agent / env / driver_plugins / model.py
1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 from abc import ABCMeta
11 from abc import abstractmethod
12
13
14 class DriverPlugin:
15     __metaclass__ = ABCMeta
16
17     @abstractmethod
18     def __init__(self):
19         """don't pass in any args for __init__.
20         """
21
22     @abstractmethod
23     def clean(self):
24         """implement this clean function to clean environment before and after calling any other functions.
25
26         """
27         pass
28
29     @abstractmethod
30     def load(self, drivers):
31         """load driver modules.
32
33         :param list    drivers:list of modules to be inserted. for example:[ixgbe,vhost_net]
34
35         """
36         pass
37
38     @abstractmethod
39     def get_supported_drivers(self):
40         """return a list of supported driver modules.
41         """
42         pass