(20250210) Started working on MikroTik config automation.

This commit is contained in:
2025-02-10 19:35:28 +05:30
parent 95d90e807b
commit 94e5c81087
13 changed files with 789 additions and 836 deletions
+18
View File
@@ -97,6 +97,9 @@ from controllers_v2.finstitutions.trading.paper_trading import PaperTradingContr
# ---
from controllers_v2.finstitutions.payments.all_payments import AllPaymentsController
from controllers_v2.finstitutions.payments.safaricom_mpesa_express import SafaricomMPesaExpressPaymentsController
# ---
from controllers_v2.software.mikrotik.all_mikrotik import AllMikroTikController
from controllers_v2.software.mikrotik.mikrotik_pppoe_1000 import MikroTikPPPoE1000Controller
# To make REST API calls:
import httpx
@@ -557,6 +560,21 @@ async def app_startup(**kwargs):
)
current_app.printer("Finstitutions/Payments (C) ready.")
# Software / Mikrotik:
current_app.mikrotik_controller = AllMikroTikController(
cache = current_app.module_cache,
http_client = current_app.http_client,
alert_url = current_app.script_data["alerts"]["url"],
debug = enable_debugging
)
current_app.mikrotik_pppoe_1000_controller = MikroTikPPPoE1000Controller(
cache = current_app.module_cache,
http_client = current_app.http_client,
alert_url = current_app.script_data["alerts"]["url"],
debug = enable_debugging
)
current_app.printer("Software/MikroTik (C) ready.")
# ┏┓ ┓ ┏┓┓•
# ┃ ┏┓┏┓┏┓┏┓┏╋┏┓┏┓┏ ┏┓┏┓┏┫ ┃ ┃┓┏┓┏┓╋┏
# ┗┛┗┛┛┗┛┗┗ ┗┗┗┛┛ ┛ ┗┻┛┗┗┻ ┗┛┗┗┗ ┛┗┗┛