added asa module. fixes #44. Version Bump 1.0!!!

This commit is contained in:
Nicholas St. Germain 2018-12-09 21:41:38 -06:00
parent 6c534c63b6
commit ef7f471d58
8 changed files with 113 additions and 21 deletions

View file

@ -20,6 +20,7 @@ from varken.sonarr import SonarrAPI
from varken.tautulli import TautulliAPI
from varken.radarr import RadarrAPI
from varken.ombi import OmbiAPI
from varken.cisco import CiscoAPI
from varken.dbmanager import DBManager
from varken.varkenlogger import VarkenLogger
@ -98,8 +99,14 @@ if __name__ == "__main__":
if server.request_total_counts:
schedule.every(server.request_total_run_seconds).seconds.do(threaded, OMBI.get_total_requests)
if CONFIG.ciscoasa_enabled:
for firewall in CONFIG.ciscoasa_firewalls:
ASA = CiscoAPI(firewall, DBMANAGER)
schedule.every(firewall.get_bandwidth_run_seconds).seconds.do(threaded, ASA.get_bandwidth)
# Run all on startup
SERVICES_ENABLED = [CONFIG.ombi_enabled, CONFIG.radarr_enabled, CONFIG.tautulli_enabled, CONFIG.sonarr_enabled]
SERVICES_ENABLED = [CONFIG.ombi_enabled, CONFIG.radarr_enabled, CONFIG.tautulli_enabled,
CONFIG.sonarr_enabled, CONFIG.ciscoasa_enabled]
if not [enabled for enabled in SERVICES_ENABLED if enabled]:
exit("All services disabled. Exiting")
schedule.run_all()