Clean : (Grégory Starck) clean of some getattr code, bis.
[shinken.git] / shinken / module.py
blob5404257ee8ee204c23a3fb95adec8412bc0e7bc9
1 #!/usr/bin/env python
2 #Copyright (C) 2009-2010 :
3 # Gabes Jean, naparuba@gmail.com
4 # Gerhard Lausser, Gerhard.Lausser@consol.de
6 #This file is part of Shinken.
8 #Shinken is free software: you can redistribute it and/or modify
9 #it under the terms of the GNU Affero General Public License as published by
10 #the Free Software Foundation, either version 3 of the License, or
11 #(at your option) any later version.
13 #Shinken is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU Affero General Public License for more details.
18 #You should have received a copy of the GNU Affero General Public License
19 #along with Shinken. If not, see <http://www.gnu.org/licenses/>.
21 from item import Item, Items
22 from shinken.property import UnusedProp, BoolProp, IntegerProp, FloatProp, CharProp, StringProp, ListProp
24 class Module(Item):
25 id = 1#0 is always special in database, so we do not take risk here
26 my_type = 'module'
28 properties={'module_name': StringProp(),
29 'module_type': StringProp(),
31 running_properties = {}
33 macros = {}
36 #For debugging purpose only (nice name)
37 def get_name(self):
38 return self.module_name
41 class Modules(Items):
42 name_property = "module_name"
43 inner_class = Module
45 def linkify(self):
46 pass
49 #We look for contacts property in contacts and
50 def explode(self):
51 pass