Files
OPNexus/backend/app/services/firmware_service.py
T
Julian Boldt e26b26eca6
Release / verify (push) Canceled after 0s
CI / checks (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / backend (push) Canceled after 0s
Release / test (push) Canceled after 0s
Release / publish (backend) (push) Canceled after 0s
Release / publish (frontend) (push) Canceled after 0s
Release / publish (proxy) (push) Canceled after 0s
Release v1.10.1-rc2
Siehe CHANGELOG.md
2026-10-07 09:34:26 +02:00

16 lines
643 B
Python

"""Extracts product_id/product_version from core/firmware/info — that
response also includes a `package` array with hundreds of entries (every
installed and available package), which is discarded here rather than
ever being sent to the frontend."""
from app.models.host import OpnsenseHost
from app.schemas.host import FirmwareInfo
from app.services import opnsense_client
async def get_firmware_info(host: OpnsenseHost) -> FirmwareInfo:
data = await opnsense_client.get_firmware_info(host)
return FirmwareInfo(
product_id=data.get("product_id", "opnsense"),
product_version=data.get("product_version", "?"),
)