Package pyhai :: Package profilers :: Module base
[hide private]
[frames] | no frames]

Source Code for Module pyhai.profilers.base

 1  """ 
 2  @copyright: 2011 Mark LaPerriere 
 3   
 4  @license: 
 5      Licensed under the Apache License, Version 2.0 (the "License"); 
 6      you may not use this file except in compliance with the License. 
 7      You may obtain a copy of the License at 
 8   
 9      U{http://www.apache.org/licenses/LICENSE-2.0} 
10   
11      Unless required by applicable law or agreed to in writing, software 
12      distributed under the License is distributed on an "AS IS" BASIS, 
13      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
14      See the License for the specific language governing permissions and 
15      limitations under the License. 
16   
17  @summary: 
18      pyHai profiler base class 
19   
20  @author: Mark LaPerriere 
21  @contact: pyhai@mindmind.com 
22  @organization: Mind Squared Design / www.mindmind.com 
23  @version: 0.1.3 
24  @date: Jan 19, 2012 
25  """ 
26   
27  import abc 
28 29 -class ProfilerBase(object):
30 """ 31 An ABC class to enforce a common profiler interface 32 """ 33 __metaclass__ = abc.ABCMeta 34 35 @abc.abstractmethod
36 - def profile(self):
37 """ 38 Profile's the local system 39 40 @return: A dictionary of properties discovered about the local system 41 @rtype: C{dict} 42 """ 43 pass
44 45 @abc.abstractmethod
46 - def system(self):
47 """ 48 Returns the system property for use in resolving plugins 49 50 @return: The name of the current type of system 51 @rtype: C{str} 52 """ 53 pass
54 55 @abc.abstractmethod
56 - def system_class(self):
57 """ 58 Returns the system class property for use in resolving plugins 59 60 @return: The name of the current type of system class 61 @rtype: C{str} 62 """ 63 pass
64