Enh: (Grégory Starck) still code clean for pyro wrapper in satellitelinks.
[shinken.git] / shinken / brok.py
blobaf75056e8fe5142eb65ed51438fdd048b476853a
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/>.
22 #A Brok is a peace of information exported by Shinken to the Broker.
23 #Broker can do whatever
24 #he wants with it.
26 class Brok:
27 __slots__ = ('__dict__', 'id', 'type', 'data')
28 id = 0
29 my_type = 'brok'
30 def __init__(self, type, data):
31 self.type = type
32 self.id = self.__class__.id
33 self.__class__.id += 1
34 self.data = data
37 def __str__(self):
38 return str(self.__dict__)+'\n'