finally, minimal config is working :)
This commit is contained in:
parent
0bc9b658f4
commit
3bff0302a7
10 changed files with 14 additions and 11 deletions
|
|
@ -3,14 +3,17 @@ import re
|
|||
|
||||
class Member:
|
||||
def __init__(self, nameid, name="", phone="", comment="", parent="", tasks=None):
|
||||
self.id = id
|
||||
self.id = nameid
|
||||
self.name = name
|
||||
self.phone = phone
|
||||
self.tasks = []
|
||||
self.add_task(tasks)
|
||||
self.comment = comment
|
||||
self.parent = parent
|
||||
|
||||
|
||||
def get_id(self):
|
||||
return self.id
|
||||
|
||||
def add_task(self, task):
|
||||
if task is None:
|
||||
return
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ class FullConfigParser(ConfigParser):
|
|||
|
||||
#replace object pointer
|
||||
id_list_func = lambda hostgroup: hostgroup.get_members()
|
||||
id_get_func = lambda member: member.id
|
||||
id_get_func = lambda member: member.get_id()
|
||||
self.replace_pointer(hostgroups, members, id_list_func, id_get_func)
|
||||
|
||||
id_list_func = lambda service: service.get_periods()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
class Parser:
|
||||
def __init__(self):
|
||||
def __init__(self, **kwargs):
|
||||
pass
|
||||
|
||||
def parse_data(self, data):
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from lib.parsers.parser import Parser
|
|||
|
||||
|
||||
class ShellParser(Parser):
|
||||
def __init__(self):
|
||||
def __init__(self, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from lib.processors.processor import Processor
|
|||
|
||||
|
||||
class MariadbProcessor(Processor):
|
||||
def __init__(self):
|
||||
def __init__(self, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from lib.processors.processor import Processor
|
|||
|
||||
|
||||
class MongodbProcessor(Processor):
|
||||
def __init__(self):
|
||||
def __init__(self, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ The processor class for postprocessing polled data.
|
|||
|
||||
|
||||
class Processor:
|
||||
def __init__(self):
|
||||
def __init__(self, **kwargs):
|
||||
pass
|
||||
|
|
@ -6,7 +6,7 @@ from lib.processors.processor import Processor
|
|||
|
||||
|
||||
class SyslogProcessor(Processor):
|
||||
def __init__(self):
|
||||
def __init__(self, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -51,5 +51,5 @@ class HttpService(Service):
|
|||
#print f.read()
|
||||
|
||||
|
||||
def create(**kwargs):
|
||||
def create(kwargs):
|
||||
return HttpService(**kwargs)
|
||||
|
|
@ -52,5 +52,5 @@ class SnmpgetService(Service):
|
|||
# print('%s = %s' % (name.prettyPrint(), val.prettyPrint()))
|
||||
|
||||
|
||||
def create(kargs):
|
||||
def create(kwargs):
|
||||
return SnmpgetService(**kwargs)
|
||||
Loading…
Add table
Add a link
Reference in a new issue