Skip to content

Commit

Permalink
Merge faf137e into 03fd0ac
Browse files Browse the repository at this point in the history
  • Loading branch information
mohierf committed Sep 13, 2016
2 parents 03fd0ac + faf137e commit 03f118a
Show file tree
Hide file tree
Showing 51 changed files with 1,592 additions and 1,155 deletions.
235 changes: 226 additions & 9 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,10 +1,227 @@
Main developpers:

5c077yP <as@trademob.com>
Alexander Springer <alex.spri@gmail.com>
Alexander Springer <as@trademob.com>
Alexandre Boisvert <alexandre.boisvert.1@gmail.com>
Alexandre Viau <alexandre@alexandreviau.net>
Andreas Karfusehr <frescha@Elephant.(none)>
Andreas Karfusehr <frescha@unitedseed.de>
Andreas Paul <xorpaul@gmail.com>
Andrew McGilvray <amcgilvray@kixeye.com>
Andrus Viik <andrus@a7k.pri.ee>
Arthur Gautier <superbaloo+registrations.github@superbaloo.net>
Arthur Gautier <superbaloo@superbaloo.net>
Bruno Clermont <bruno.clermont@gmail.com>
Charlie Andrews <charlieandrews.cwa@gmail.com>
Charlie Root <root@shinken2.0>
Christian Posch <christian.posch@uibk.ac.at>
Christophe SIMON <christophe.simon@dailymotion.com>
Christophe Simon <geektophe@gmail.com>
Claneys Skyne <claneys.skyne@gmail.com>
DUVAL <electroni-k@hotmail.fr>
DUVAL Kévin <electroni-k@hotmail.fr>
Daniel Hokka Zakrisson <daniel@hozac.com>
Daniel Widerin <daniel@widerin.net>
Danijel Tasov <dt@korn.shell.la>
David Durieux <d.durieux@siprossii.com>



Contributors:



David GUENAUL <dguenault@monitoring-fr.org>
David GUENAULT <david.guenault@gmail.com>
David GUENAULT <dguenault@monitoring-fr.org>
David GUENAULT <yol@monitoring-fr.org>
David Gil <david.gil.marcos@gmail.com>
David Gil <dgil@a3sec.com>
David Laval <david@laval.me>
David Moreau Simard <dmsimard@iweb.com>
David- <david@actengo.com>
Davide Franco <bacula-dev@dflc.ch>
Davide Franco <dfranco@users.noreply.github.com>
Demelziraptor <demelza@circularvale.com>
Denetariko <denetariko@gmail.com>
Denis Sacchet <denis@rack42.fr>
Dessai.Imrane <dessai.imrane@gmail.com>
DessaiImrane <dessai.imrane@gmail.com>
Driskell <devel@jasonwoods.me.uk>
Durieux David <d.durieux@siprossii.com>
Eric Herot <eric.github@herot.com>
FORLOT Romain <rforlot@yahoo.com>
Florentin Raud <florentin.raud@gmail.com>
Forlot Romain <claneys.skyne@claneys.com>
Forlot Romain <rforlot@yahoo.com>
François Lafont <flafdivers@free.fr>
Fred MOHIER <frederic.mohier@ipmfrance.com>
Frescha <frescha@hydra.(none)>
Frescha <frescha@unitedseed.de>
FrogX <frogx@frogx-HP-625.(none)>
FrogX <frogx@frogx-System-Product-Name.(none)>
Frédéric MOHIER <frederic.mohier@gmail.com>
Frédéric MOHIER <frederic.mohier@ipmfrance.com>
Frédéric Pégé <fred@bbrose.net>
Frédéric Pégé <frederic.pege@devoteam.com>
Frédéric Pégé <frederic.pege@gmail.com>
Frédéric Vachon <fredvac@gmail.com>
GAULUPEAU Jonathan <jo.gaulupeau@gmail.com>
GAULUPEAU Jonathan <jonathan@gaulupeau.fr>
Gabes Jean <naparuba@users.sourceforge.net>
Gabès Jean <naparuba@gmail.com>
Gabès Jean <naparuba@users.sourceforge.net>
Gerhard Lausser <gerhard.lausser@consol.de>
Gerhard Lausser <lausser@shinken-monitoring.(none)>
Grégory Starck <g.starck@gmail.com>
Grégory Starck <greg@brutus.(none)>
Grégory Starck <gregory.starck@savoirfairelinux.com>
Guillaume Bour <guillaume.bour@uperto.com>
Guillaume Bour <guillaume@bour.cc>
H4wkmoon <frederic.pege@gmail.com>
H4wkmoon <frederic.pege@uperto.com>
Hannes Körber <hannes.koerber@gmail.com>
Hartmut Goebel <h.goebel@crazy-compilers.com>
Hartmut Goebel <h.goebel@goebel-consult.de>
Henry Bakker <henry@technoplunk.com>
Hermann.Lauer@iwr.uni-heidelberg.de <Hermann.Lauer@iwr.uni-heidelberg.de>
Httqm <fournet.matthieu@gmail.com>
Hubert <hubert.santuz@gmail.com>
Jan Ulferts <jan.ulferts@xing.com>
Jean <naparuba@users.sourceforge.net>
Jean Gabes <naparuba@gmail.com>
Jean Remond <cfengine@remond.re>
Jean-Charles <jean-charles.delon@matricscom.eu>
Jean-Claude Computing <jeanclaude.computing@gmail.com>
Jean-Maxime LEBLANC <jmax.leblanc@gmail.com>
Joaquim Roy <j.roy@shinken-solutions.com>
Johan Svensson <jsv@one.com>
John Hurliman <jhurliman@jhurliman.org>
Jonathan GAULUPEAU <jonathan@gaulupeau.com>
Konstantin Shalygin <k0ste@cn.ru>
Laurent Ollagnier <laurent.ollagnier@dunordausud.fr>
Laurent Ollagnier <laurent@xenbox.fr>
Litrin Jiang <litrin.jiang@intel.com>
Luke L <lukehasnoname@gmail.com>
Magnus Appelquist <magnus.appelquist@cloudnet.se>
Marc MAURICE <marc-github@pub.positon.org>
Mathias Fussenegger <f.mathias@zignar.net>
Mathieu MD <mathieu.md@gmail.com>
Mathieu Parent <math.parent@gmail.com>
Matthieu Caneill <matthieucan@users.noreply.github.com>
Michael Leinartas <mleinartas@gmail.com>
Mickael FALCK <lastmikoi@gmail.com>
Morkxy <morkxy@gmail.com>
Naparuba <naparuba@gmail.com>
Naparuba <naparuba@users.sourceforge.net>
Nicolas Brisac <nbrisac@oasiswork.fr>
Nicolas DUPEUX <nicolas.dupeux@arkea.com>
Nicolas DUPEUX <nicolas@dupeux.net>
Nicolas Dupeux <nicolas@dupeux.net>
Nicolas Limage <nlimage@online.net>
Nicolas Pichon <nicolas.pichon42@free.fr>
Olivier H <olivier.hanesse@gmail.com>
Olivier Hanesse <olivier.hanesse@gmail.com>
Olivier LI-KIANG-CHEONG <olikiang@phenix.(none)>
Pavel Volkovitskiy <olfway@gmail.com>
Peter Woodman <peter@shortbus.org>
Philippe Pepos Petitclerc <ppeposp@gmail.com>
Philippe Pépos Petitclerc <ppepos@users.noreply.github.com>
Pradeep Jindal <praddyjindal@gmail.com>
Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
Rich Trott <rtrott@gmail.com>
Robin Gloster <robin@loc-com.de>
Romain Forlot <rforlot@yahoo.com>
Romain LE DISEZ <romain.git@ledisez.net>
Romain LE DISEZ <romain.ledisez@ovh.net>
Romain THERRAT <romain42@gmail.com>
Ryan Davis <ryan@acceleration.net>
Rémi SAUVAT <remi.sauvat@inetprocess.com>
Samuel Milette-Lacombe <samuel.milette-lacombe@savoirfairelinux.com>
Sebastien Coavoux <Sebastien.Coavoux@nuance.com>
Sebastien Coavoux <alignak@pyseb.cx>
Sebastien Coavoux <s.coavoux@free.fr>
Sebastien Coavoux <sebastien.coavoux@savoirfairelinux.com>
Sismic <dmonnetbesson@gmail.com>
Sispheor <nico.marcq@gmail.com>
Socketubs <geoffrey@lehee.name>
Squiz <squiz@squiz.confais.org>
Steve Schnepp <steve.schnepp@pwkf.org>
Stéphane Duchesneau <stephane.duchesneau@savoirfairelinux.com>
Sylvain Boureau <s.boureau@shinken-solutions.com>
Sébastein Coavoux <s.coavoux@free.fr>
Sébastien <s.coavoux@free.fr>
Sébastien <sebastien.coavoux@savoirfairelinux.com>
Sébastien Coavoux <Seb-Solon@users.noreply.github.com>
Sébastien Coavoux <s.coavoux@free.fr>
S�bastien Coavoux <s.coavoux@free.fr>
The Gitter Badger <badger@gitter.im>
Thibault Cohen <thibault.cohen@savoirfairelinux.com>
Thibault Cohen <titilambert@gmail.com>
Thibautg16 <thibaut@tgillardeau.com>
Thomas Cellerier <thomas@thce-cryptzone.(none)>
Thomas Meson <zllak@hycik.org>
ThomasWaldmann <tw@waldmann-edv.de>
Tim Adam <tim@s3v.be>
Timo Veith <timo.veith@uni-tuebingen.de>
Valentin Brajon <vbrajon@gmail.com>
Victor Igumnov <victori@fabulously40.com>
Zoran Zaric <zz@zoranzaric.de>
andrewmcgilvray <a.mcgilvray@gmail.com>
anonimoose <anonimoose>
aurelien <aurelien.baudet@swid.fr>
aviau <alexandre.viau@savoirfairelinux.com>
baoboa <baobab874@gmail.com>
brightdroid <phpmyforum@gmail.com>
cedef <cedef@cassio.pe>
chris81 <christian.posch@gmail.com>
claneys <claneys.skyne@claneys.com>
colourmeamused <colourmeamused@noreply.com>
cyrilleJ <cyrjoss@yahoo.fr>
david hannequin <david.hannequin@gmail.com>
david-guenault <dguenault@monitoring-fr.org>
dhannequin <david.hannequin@fullsave.com>
fgth <fsoyer@systea.net>
fhoubart <florent.houbart@gmail.com>
flaf <flafdivers@free.fr>
foomip <nelsondcp@gmail.com>
frescha <frescha@unitedseed.de>
fsoyer <fsoyer@systea.net>
gmat <gmat2k@yahoo.fr>
h4wkmoon <frederic.pege@gmail.com>
hvad <david.hannequin@gmail.com>
itxx00 <itxx00@gmail.com>
jean-francois BUTKIEWICZ <jean-francois.butkiewicz@veosoft.net>
jfbutkiewicz <jean-francois.butkiewicz@veosoft.net>
jmartignago <j.martignago@mairie-villeneuvesurlot.fr>
jmcollongette <jean-michel.collongette@setra-conseil.com>
jogaulupeau <jo.gaulupeau@gmail.com>
k0ste <k0ste@cn.ru>
lafont <francois.lafont@crdp.ac-versailles.fr>
nagios <naparuba@gmail.com>
nagios <naparuba@users.sourceforge.net>
nap <naparuba@gmail.com>
nap <naparuba@users.sourceforge.net>
naparuba <naparuba@gmail.com>
naparuba <naparuba@users.sourceforge.net>
nerocide <jean.mich.c@gmail.com>
ning.xie <ning.xie@qunar.com>
odyssey4me <jesse.pretorius@gmail.com>
olivierHa <olivier.hanesse@gmail.com>
openglx <openglx@StarByte.net>
pydubreucq <pydubreucq@gmail.com>
raphaeltr <raphael.troiano@free.fr>
rasoso <rasoso@users.noreply.github.com>
root <root@centos-6-x86-64.(none)>
root <root@debian.capen.sis>
root <root@debian.localdomain>
root <root@debian6.(none)>
root <root@localhost.localdomain>
root <root@ubs-pc.(none)>
root <root@ubuntu.(none)>
shinken <naparuba@gmail.com>
shinken <naparuba@users.sourceforge.net>
smilingsubnode <florent.houbart@gmail.com>
spil-brensen <boris.rensen@spilgames.com>
system <system@ftp.monitoring-fr.org>
system <system@shinken.(none)>
system <system@ubuntu-11.04>
t0xicCode <xavier.l@t0xic.co.de>
t0xicCode <xavier@openconcept.ca>
thomascellerier <thomascellerier@gmail.com>
xkilian <fmikus@acktomic.com>
yam <yam+github@xenbox.fr>
yol <yol@kvm1085.iojo.net>
yol <yol@kvm613.iojo.net>
2 changes: 1 addition & 1 deletion alignak/daemons/arbiterdaemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ def load_config_file(self): # pylint: disable=R0915
# The conf can be incorrect here if the cut into parts see errors like
# a realm with hosts and not schedulers for it
if not self.conf.conf_is_correct:
self.conf.show_errors()
err = "Configuration is incorrect, sorry, I bail out"
logger.error(err)
self.conf.show_errors()
sys.exit(err)

logger.info('Things look okay - No serious problems were detected '
Expand Down
40 changes: 35 additions & 5 deletions alignak/objects/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,11 @@ def load_params(self, params):
# it's a macro or a useless now param, we don't touch this
val = value
else:
logger.warning("Guessing the property %s type because it is not in "
"%s object properties", key, self.__class__.__name__)
msg = "Guessing the property %s type because it is not in %s object properties" % (
key, self.__class__.__name__
)
self.configuration_warnings.append(msg)
logger.warning(msg)
val = ToGuessProp.pythonize(clean_params[key])

setattr(self, key, val)
Expand Down Expand Up @@ -2107,7 +2110,14 @@ def is_correct(self): # pylint: disable=R0912
cur = getattr(self, obj)
if not cur.is_correct():
valid = False
self.configuration_errors += cur.configuration_errors
logger.error("\t%s conf incorrect!!", obj)
logger.error("\t%s configuration errors: %d, total: %d", obj, len(cur.configuration_errors), len(self.configuration_errors))
if cur.configuration_warnings:
self.configuration_warnings += cur.configuration_warnings
logger.error("\t%s configuration warnings: %d, total: %d", obj,
len(cur.configuration_warnings), len(self.configuration_warnings))

if self.read_config_silent == 0:
logger.info('\tChecked %d %s', len(cur), obj)

Expand All @@ -2122,7 +2132,15 @@ def is_correct(self): # pylint: disable=R0912
logger.info('Checking %s...', obj)
if not cur.is_correct():
valid = False
self.configuration_errors += cur.configuration_errors
logger.error("\t%s conf incorrect!!", obj)
logger.error("\t%s configuration errors: %d, total: %d", obj,
len(cur.configuration_errors), len(self.configuration_errors))
if cur.configuration_warnings:
self.configuration_warnings += cur.configuration_warnings
logger.error("\t%s configuration warnings: %d, total: %d", obj,
len(cur.configuration_warnings), len(self.configuration_warnings))

if self.read_config_silent == 0:
logger.info('\tChecked %d %s', len(cur), obj)

Expand Down Expand Up @@ -2235,12 +2253,24 @@ def add_error(self, txt):
self.conf_is_correct = False

def show_errors(self):
"""Loop over configuration_errors and log them
"""
Loop over configuration warnings and log them as INFO log
Loop over configuration errors and log them as INFO log
Note that the warnings and errors are logged on the fly during the configuration parsing.
It is not necessary to log as WARNING and ERROR in this function which is used as a sum-up
on the end of configuration parsing when an error has been detected.
:return: None
"""
for err in self.configuration_errors:
logger.error(err)
if self.configuration_warnings:
logger.info("Configuration warnings:")
for msg in self.configuration_warnings:
logger.info(msg)
if self.configuration_errors:
logger.info("Configuration errors:")
for msg in self.configuration_errors:
logger.info(msg)

def create_packs(self, nb_packs): # pylint: disable=R0915,R0914,R0912,W0613
"""Create packs of hosts and services (all dependencies are resolved)
Expand Down
15 changes: 6 additions & 9 deletions alignak/objects/contactgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"""
from alignak.objects.itemgroup import Itemgroup, Itemgroups

from alignak.property import StringProp
from alignak.property import StringProp, ListProp
from alignak.log import logger


Expand All @@ -71,6 +71,8 @@ class Contactgroup(Itemgroup):
'uuid': StringProp(default='', fill_brok=['full_status']),
'contactgroup_name': StringProp(fill_brok=['full_status']),
'alias': StringProp(fill_brok=['full_status']),
'contactgroup_members': ListProp(default=[], fill_brok=['full_status'],
merging='join', split_on_coma=True)
})

macros = {
Expand Down Expand Up @@ -101,18 +103,13 @@ def get_name(self):

def get_contactgroup_members(self):
"""
Get contactgroup members
Get list of groups members of this contactgroup
:return: list of hosts
:return: list of contacts
:rtype: list
"""
# TODO: imho a Contactgroup instance should always have defined
# its contactgroup_members attribute, even if it's empty / the empty list.
if hasattr(self, 'contactgroup_members'):
# more over: it should already be in the list form,
# not anymore in the "bare" string from as read
# from configuration (files or db or whatever)
return [m.strip() for m in self.contactgroup_members.split(',')]
return self.contactgroup_members
else:
return []

Expand Down
Loading

0 comments on commit 03f118a

Please sign in to comment.