[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
Sebastien Coavoux
s.coavoux at free.fr
Tue Feb 28 22:15:04 UTC 2012
The following commit has been merged in the debian/master branch:
commit d5b140e1ce0d34a824fc6ee596925eb620ad0b04
Author: Sebastien Coavoux <s.coavoux at free.fr>
Date: Fri Jan 20 19:18:00 2012 +0100
Code Review.
Fixed : typo in comments
Added : licence in files
Personal Note :
*None : few modifications done
Feel free to (dis)agree
diff --git a/shinken/bin.py b/shinken/bin.py
index 48ffeb6..017e8ab 100644
--- a/shinken/bin.py
+++ b/shinken/bin.py
@@ -1,24 +1,25 @@
#!/usr/bin/env python
-#Copyright (C) 2009-2010 :
-# Gabes Jean, naparuba at gmail.com
-# Gerhard Lausser, Gerhard.Lausser at consol.de
-# Gregory Starck, g.starck at gmail.com
-# Hartmut Goebel, h.goebel at goebel-consult.de
+
+# Copyright (C) 2009-2011 :
+# Gabes Jean, naparuba at gmail.com
+# Gerhard Lausser, Gerhard.Lausser at consol.de
+# Gregory Starck, g.starck at gmail.com
+# Hartmut Goebel, h.goebel at goebel-consult.de
#
-#This file is part of Shinken.
+# This file is part of Shinken.
#
-#Shinken is free software: you can redistribute it and/or modify
-#it under the terms of the GNU Affero General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# Shinken is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-#Shinken is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU Affero General Public License for more details.
+# Shinken is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
#
-#You should have received a copy of the GNU Affero General Public License
-#along with Shinken. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Affero General Public License
+# along with Shinken. If not, see <http://www.gnu.org/licenses/>.
"""
diff --git a/shinken/borg.py b/shinken/borg.py
index 17cf5b8..484d2a9 100644
--- a/shinken/borg.py
+++ b/shinken/borg.py
@@ -1,28 +1,28 @@
#!/usr/bin/env python
-#Copyright (C) 2009-2010 :
-# Gabes Jean, naparuba at gmail.com
-# Gerhard Lausser, Gerhard.Lausser at consol.de
-# Gregory Starck, g.starck at gmail.com
-# Hartmut Goebel, h.goebel at goebel-consult.de
+
+# Copyright (C) 2009-2011 :
+# Gabes Jean, naparuba at gmail.com
+# Gerhard Lausser, Gerhard.Lausser at consol.de
+# Gregory Starck, g.starck at gmail.com
+# Hartmut Goebel, h.goebel at goebel-consult.de
#
-#This file is part of Shinken.
+# This file is part of Shinken.
#
-#Shinken is free software: you can redistribute it and/or modify
-#it under the terms of the GNU Affero General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# Shinken is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-#Shinken is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU Affero General Public License for more details.
+# Shinken is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
#
-#You should have received a copy of the GNU Affero General Public License
-#along with Shinken. If not, see <http://www.gnu.org/licenses/>.
-
+# You should have received a copy of the GNU Affero General Public License
+# along with Shinken. If not, see <http://www.gnu.org/licenses/>.
-# here is the new-style Borg (not much more complex then the "old-style")
+""" Here is the new-style Borg (not much more complex then the "old-style")"""
class Borg(object):
__shared_state = {}
def __init__(self):
diff --git a/shinken/brok.py b/shinken/brok.py
index d8b47bf..1c178f0 100644
--- a/shinken/brok.py
+++ b/shinken/brok.py
@@ -1,30 +1,30 @@
#!/usr/bin/env python
-#Copyright (C) 2009-2010 :
-# Gabes Jean, naparuba at gmail.com
-# Gerhard Lausser, Gerhard.Lausser at consol.de
-# Gregory Starck, g.starck at gmail.com
-# Hartmut Goebel, h.goebel at goebel-consult.de
+
+# Copyright (C) 2009-2011 :
+# Gabes Jean, naparuba at gmail.com
+# Gerhard Lausser, Gerhard.Lausser at consol.de
+# Gregory Starck, g.starck at gmail.com
+# Hartmut Goebel, h.goebel at goebel-consult.de
#
-#This file is part of Shinken.
+# This file is part of Shinken.
#
-#Shinken is free software: you can redistribute it and/or modify
-#it under the terms of the GNU Affero General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# Shinken is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-#Shinken is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU Affero General Public License for more details.
+# Shinken is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
#
-#You should have received a copy of the GNU Affero General Public License
-#along with Shinken. If not, see <http://www.gnu.org/licenses/>.
-
+# You should have received a copy of the GNU Affero General Public License
+# along with Shinken. If not, see <http://www.gnu.org/licenses/>.
-#A Brok is a peace of information exported by Shinken to the Broker.
-#Broker can do whatever
-#he wants with it.
+"""A Brok is a piece of information exported by Shinken to the Broker.
+Broker can do whatever he wants with it.
+"""
class Brok:
__slots__ = ('__dict__', 'id', 'type', 'data')
id = 0
diff --git a/shinken/brokerlink.py b/shinken/brokerlink.py
index 823550a..02eb724 100644
--- a/shinken/brokerlink.py
+++ b/shinken/brokerlink.py
@@ -1,29 +1,31 @@
#!/usr/bin/env python
-#Copyright (C) 2009-2010 :
-# Gabes Jean, naparuba at gmail.com
-# Gerhard Lausser, Gerhard.Lausser at consol.de
-# Gregory Starck, g.starck at gmail.com
-# Hartmut Goebel, h.goebel at goebel-consult.de
+
+# Copyright (C) 2009-2011 :
+# Gabes Jean, naparuba at gmail.com
+# Gerhard Lausser, Gerhard.Lausser at consol.de
+# Gregory Starck, g.starck at gmail.com
+# Hartmut Goebel, h.goebel at goebel-consult.de
#
-#This file is part of Shinken.
+# This file is part of Shinken.
#
-#Shinken is free software: you can redistribute it and/or modify
-#it under the terms of the GNU Affero General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# Shinken is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-#Shinken is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU Affero General Public License for more details.
+# Shinken is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
#
-#You should have received a copy of the GNU Affero General Public License
-#along with Shinken. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Affero General Public License
+# along with Shinken. If not, see <http://www.gnu.org/licenses/>.
from shinken.satellitelink import SatelliteLink, SatelliteLinks
from shinken.property import BoolProp, IntegerProp, StringProp, ListProp
+""" TODO : Add some comment about this class for the doc"""
class BrokerLink(SatelliteLink):
id = 0
my_type = 'broker'
@@ -44,6 +46,7 @@ class BrokerLink(SatelliteLink):
+""" TODO : Add some comment about this class for the doc"""
class BrokerLinks(SatelliteLinks):
name_property = "broker_name"
inner_class = BrokerLink
diff --git a/shinken/check.py b/shinken/check.py
index e6d1e29..3abf8cf 100644
--- a/shinken/check.py
+++ b/shinken/check.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python
-# Copyright (C) 2009-2010 :
-# Gabes Jean, naparuba at gmail.com
-# Gerhard Lausser, Gerhard.Lausser at consol.de
-# Gregory Starck, g.starck at gmail.com
-# Hartmut Goebel, h.goebel at goebel-consult.de
+
+# Copyright (C) 2009-2011 :
+# Gabes Jean, naparuba at gmail.com
+# Gerhard Lausser, Gerhard.Lausser at consol.de
+# Gregory Starck, g.starck at gmail.com
+# Hartmut Goebel, h.goebel at goebel-consult.de
#
# This file is part of Shinken.
#
@@ -25,6 +26,7 @@ from shinken.action import Action
from shinken.property import UnusedProp, BoolProp, IntegerProp, FloatProp, CharProp, StringProp, ListProp
from shinken.autoslots import AutoSlots
+""" TODO : Add some comment about this class for the doc"""
class Check(Action):
# AutoSlots create the __slots__ with properties and
# running_properties names
@@ -57,7 +59,7 @@ class Check(Action):
'worker': StringProp(default='none'),
}
- #id = 0 #Is common to Actions
+
def __init__(self, status, command, ref, t_to_go, dep_check=None, id=None, timeout=10,\
poller_tag='None', reactionner_tag='None', env={}, module_type='fork'):
@@ -97,10 +99,10 @@ class Check(Action):
self.internal = False
- #return a copy of the check but just what is important for execution
- #So we remove the ref and all
+ # return a copy of the check but just what is important for execution
+ # So we remove the ref and all
def copy_shell(self):
- #We create a dummy check with nothing in it, just defaults values
+ # We create a dummy check with nothing in it, just defaults values
return self.copy_shell__( Check('', '', '', '', '', id=self.id) )
diff --git a/shinken/commandcall.py b/shinken/commandcall.py
index bacc85b..1e38b4c 100644
--- a/shinken/commandcall.py
+++ b/shinken/commandcall.py
@@ -1,24 +1,25 @@
#!/usr/bin/env python
-#Copyright (C) 2009-2010 :
-# Gabes Jean, naparuba at gmail.com
-# Gerhard Lausser, Gerhard.Lausser at consol.de
-# Gregory Starck, g.starck at gmail.com
-# Hartmut Goebel, h.goebel at goebel-consult.de
+
+# Copyright (C) 2009-2011 :
+# Gabes Jean, naparuba at gmail.com
+# Gerhard Lausser, Gerhard.Lausser at consol.de
+# Gregory Starck, g.starck at gmail.com
+# Hartmut Goebel, h.goebel at goebel-consult.de
#
-#This file is part of Shinken.
+# This file is part of Shinken.
#
-#Shinken is free software: you can redistribute it and/or modify
-#it under the terms of the GNU Affero General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# Shinken is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
#
-#Shinken is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU Affero General Public License for more details.
+# Shinken is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
#
-#You should have received a copy of the GNU Affero General Public License
-#along with Shinken. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Affero General Public License
+# along with Shinken. If not, see <http://www.gnu.org/licenses/>.
from shinken.autoslots import AutoSlots
from shinken.property import StringProp, BoolProp
@@ -29,8 +30,10 @@ from shinken.property import StringProp, BoolProp
class DummyCommandCall(object):
pass
-#This class is use when a service, contact or host define
-#a command with args.
+"""This class is use when a service, contact or host define
+a command with args.
+
+"""
class CommandCall(DummyCommandCall):
# AutoSlots create the __slots__ with properties and
# running_properties names
@@ -66,8 +69,8 @@ class CommandCall(DummyCommandCall):
self.valid = False
self.command = tab[0]
if self.valid:
- #If the host/service do not give an override poller_tag, take
- #the one of the command
+ # If the host/service do not give an override poller_tag, take
+ # the one of the command
self.poller_tag = poller_tag #from host/service
self.reactionner_tag = reactionner_tag
self.module_type = self.command.module_type
@@ -92,7 +95,7 @@ class CommandCall(DummyCommandCall):
- # Call by picle for dataify the coment
+ # Call by pickle for dataify the coment
# because we DO NOT WANT REF in this pickleisation!
def __getstate__(self):
cls = self.__class__
@@ -105,7 +108,7 @@ class CommandCall(DummyCommandCall):
return res
- # Inversed funtion of getstate
+ # Inverted funtion of getstate
def __setstate__(self, state):
cls = self.__class__
# We move during 1.0 to a dict state
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list