Added FritzboxPhoneStatusService service and some cosmetic changes.
This commit is contained in:
parent
4cedf535d0
commit
5ca94ec14b
5 changed files with 29 additions and 4 deletions
|
|
@ -34,7 +34,7 @@ from linspector.core.monitors import Monitors
|
|||
|
||||
# i currently only increase the 3rd number because the goal is that 0.19 will become the first
|
||||
# stable version.
|
||||
__version__ = '0.19.27.dev1'
|
||||
__version__ = '0.19.28.dev1'
|
||||
__author__ = 'Johannes Findeisen <you@hanez.org>'
|
||||
|
||||
logger = logging.getLogger('linspector')
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ log_level= debug
|
|||
log_file = ~/code/linspector/linspector/log/linspector.log
|
||||
; number of log files to be kept.
|
||||
log_file_count = 50
|
||||
; log file size in megabytes as float.
|
||||
; log file size in megabytes as int or float.
|
||||
log_file_size = 1.00
|
||||
pid_file = /var/run/user/1000/linspector.pid
|
||||
; plugins separated by ','. no whitespaces allowed. not case sensitive.
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ class DummyService(Service):
|
|||
self.__environment = environment
|
||||
|
||||
def execute(self, **kwargs):
|
||||
log('debug', 'dummy object ' + str(self))
|
||||
log('debug', 'DummyService object ' + str(self))
|
||||
#log('debug', 'dummy object @' + str(self) + str(self.__kwargs['foo']))
|
||||
return
|
||||
|
|
|
|||
25
linspector/services/net/fritzboxphonestatus.py
Normal file
25
linspector/services/net/fritzboxphonestatus.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
"""
|
||||
This file is part of Linspector (https://linspector.org/)
|
||||
Copyright (c) 2022 Johannes Findeisen <you@hanez.org>. All Rights Reserved.
|
||||
See LICENSE (MIT)
|
||||
"""
|
||||
from fritzconnection.lib.fritzstatus import FritzStatus
|
||||
|
||||
from linspector.core.helpers import log
|
||||
from linspector.core.service import Service
|
||||
|
||||
|
||||
def create(configuration, environment):
|
||||
return FritzboxPhoneStatusService(configuration, environment)
|
||||
|
||||
|
||||
class FritzboxPhoneStatusService(Service):
|
||||
|
||||
def __init__(self, configuration, environment):
|
||||
super().__init__(configuration, environment)
|
||||
self.__configuration = configuration
|
||||
self.__environment = environment
|
||||
|
||||
def execute(self, **kwargs):
|
||||
log('debug', 'FritzboxPhoneStatusService object ' + str(self))
|
||||
return
|
||||
|
|
@ -21,5 +21,5 @@ class FritzboxUplinkService(Service):
|
|||
self.__environment = environment
|
||||
|
||||
def execute(self, **kwargs):
|
||||
log('debug', 'fritzboxuplink object ' + str(self))
|
||||
log('debug', 'FritzboxUplinkService object ' + str(self))
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue